ABAP-VL02N修改交货单外部标识
作者:互联网
在创建交货单时调用的BAPI是BAPI_DELIVERYPROCESSING_EXEC,里面虽然也有交货单外部标识的字段,但是我在创建的时候赋值了,交货单创建成功后发现交货单外部标识并没有写进去,所以我在交货单创建成功之后再调用WS_DELIVERY_UPDATE去修改交货单的外部标识
DATA: gs_vbkok TYPE vbkok,
lt_prot TYPE STANDARD TABLE OF prott.
gs_vbkok-vbeln_vl = gv_jiaohuo ."交货单号
gs_vbkok-lifex = gv_docno . "交货单的外部标识
CALL FUNCTION 'WS_DELIVERY_UPDATE'
EXPORTING
vbkok_wa = gs_vbkok
* SYNCHRON = ' '
* NO_MESSAGES_UPDATE = ' '
* COMMIT = ' '
delivery = gv_jiaohuo
* UPDATE_PICKING = ' '
* NICHT_SPERREN = ' '
* IF_CONFIRM_CENTRAL = ' '
* IF_WMPP = ' '
* IF_GET_DELIVERY_BUFFERED = ' '
* IF_NO_GENERIC_SYSTEM_SERVICE = ' '
* IF_DATABASE_UPDATE = '1'
* IF_NO_INIT = ' '
* IF_NO_READ = ' '
* IF_ERROR_MESSAGES_SEND_0 = 'X'
* IF_NO_BUFFER_REFRESH = ' '
* IT_PARTNER_UPDATE =
* IT_SERNR_UPDATE =
* IF_NO_REMOTE_CHG = ' '
* IF_NO_MES_UPD_PACK = ' '
* IF_LATE_DELIVERY_UPD = ' '
* IF_SIMULATE = ' '
* G_SHPMT_AUFRUFER =
* IMPORTING
* EF_ERROR_ANY_0 =
* EF_ERROR_IN_ITEM_DELETION_0 =
* EF_ERROR_IN_POD_UPDATE_0 =
* EF_ERROR_IN_INTERFACE_0 =
* EF_ERROR_IN_GOODS_ISSUE_0 =
* EF_ERROR_IN_FINAL_CHECK_0 =
* EF_ERROR_PARTNER_UPDATE =
* EF_ERROR_SERNR_UPDATE =
TABLES
* VBPOK_TAB =
prot = lt_prot
* VERKO_TAB =
* VERPO_TAB =
* VBSUPCON_TAB =
* IT_VERPO_SERNR =
* IT_PACKING =
* IT_PACKING_SERNR =
* IT_REPACK =
* IT_HANDLING_UNITS =
* IT_OBJECTS =
* ET_CREATED_HUS =
* TVPOD_TAB =
* IT_TMSTMP =
* IT_BAPIADDR1 =
* IT_TEXTL =
* IT_TEXTH =
* IT_AAC_ITEM_BLOCK =
* IT_HU_HEADER_EPC =
* IT_HU_ITEMS_EPC =
* SERNR_TAB =
* IT_HURES =
.
IF lt_prot IS NOT INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
标签:vbkok,NO,EF,UPDATE,ABAP,交货单,ERROR,VL02N 来源: https://www.cnblogs.com/TigerMan/p/16206829.html