ABAP-VL02N修改交货单外部标识BAPI
在创建交货单时调用的BAPI是BAPI_DELIVERYPROCESSING_EXEC,里面虽然也有交货单外部标识的字段, 但是我在创建的时候赋值了,交货单创建成功后发现交货单外部标识并没有写进去, 所以我在交货单创建成功之后再调用WS_DELIVERY_UPDATE去修改交货单的外部标识
1 DATA: gs_vbkok TYPE vbkok, 2 lt_prot TYPE STANDARD TABLE OF prott. 3 gs_vbkok-vbeln_vl = gv_jiaohuo ."交货单号 4 gs_vbkok-lifex = gv_docno . 5 6 CALL FUNCTION 'WS_DELIVERY_UPDATE' 7 EXPORTING 8 vbkok_wa = gs_vbkok 9 * SYNCHRON = ' ' 10 * NO_MESSAGES_UPDATE = ' ' 11 * COMMIT = ' ' 12 delivery = gv_jiaohuo 13 * UPDATE_PICKING = ' ' 14 * NICHT_SPERREN = ' ' 15 * IF_CONFIRM_CENTRAL = ' ' 16 * IF_WMPP = ' ' 17 * IF_GET_DELIVERY_BUFFERED = ' ' 18 * IF_NO_GENERIC_SYSTEM_SERVICE = ' ' 19 * IF_DATABASE_UPDATE = '1' 20 * IF_NO_INIT = ' ' 21 * IF_NO_READ = ' ' 22 * IF_ERROR_MESSAGES_SEND_0 = 'X' 23 * IF_NO_BUFFER_REFRESH = ' ' 24 * IT_PARTNER_UPDATE = 25 * IT_SERNR_UPDATE = 26 * IF_NO_REMOTE_CHG = ' ' 27 * IF_NO_MES_UPD_PACK = ' ' 28 * IF_LATE_DELIVERY_UPD = ' ' 29 * IF_SIMULATE = ' ' 30 * G_SHPMT_AUFRUFER = 31 * IMPORTING 32 * EF_ERROR_ANY_0 = 33 * EF_ERROR_IN_ITEM_DELETION_0 = 34 * EF_ERROR_IN_POD_UPDATE_0 = 35 * EF_ERROR_IN_INTERFACE_0 = 36 * EF_ERROR_IN_GOODS_ISSUE_0 = 37 * EF_ERROR_IN_FINAL_CHECK_0 = 38 * EF_ERROR_PARTNER_UPDATE = 39 * EF_ERROR_SERNR_UPDATE = 40 TABLES 41 * VBPOK_TAB = 42 prot = lt_prot 43 * VERKO_TAB = 44 * VERPO_TAB = 45 * VBSUPCON_TAB = 46 * IT_VERPO_SERNR = 47 * IT_PACKING = 48 * IT_PACKING_SERNR = 49 * IT_REPACK = 50 * IT_HANDLING_UNITS = 51 * IT_OBJECTS = 52 * ET_CREATED_HUS = 53 * TVPOD_TAB = 54 * IT_TMSTMP = 55 * IT_BAPIADDR1 = 56 * IT_TEXTL = 57 * IT_TEXTH = 58 * IT_AAC_ITEM_BLOCK = 59 * IT_HU_HEADER_EPC = 60 * IT_HU_ITEMS_EPC = 61 * SERNR_TAB = 62 * IT_HURES = 63 . 64 IF lt_prot IS NOT INITIAL. 65 66 CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'. 67 68 ELSE. 69 70 CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' 71 EXPORTING 72 wait = 'X'. 73 74 ENDIF.