07-06-2021 11:10 AM
Hello Experts,
I have written one driven program to update this shipment status in database as well as in the VT02N.
Here I am attaching my code please correct me if anything is wrong.
DATA: w_headerdata TYPE bapishipmentheader,
w_headerdataaction TYPE bapishipmentheaderaction,
w_transport LIKE bapishipmentids-shipmentnum.
DATA: t_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: t_itemdata LIKE bapishipmentitem OCCURS 0 WITH HEADER LINE,
ld_CV_DATE TYPE DATUM ,
ld_CV_TIME TYPE UZEIT,
t_itemdataaction LIKE bapishipmentitemaction OCCURS 0 WITH HEADER LINE.
DATA: l_transporte TYPE vbeln_nach,
l_error TYPE c LENGTH 1.
DATA return.
w_headerdata-SHIPMENT_NUM = '1200012352'.
w_headerdata-STATUS_PLAN = 'X'.
w_headerdataaction-STATUS_PLAN = 'C'.
CALL FUNCTION 'BAPI_SHIPMENT_CHANGE'
EXPORTING
headerdata = w_headerdata
headerdataaction = w_headerdataaction
return = t_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = abap_true.
07-06-2021 11:11 AM
Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend you to read this overview Community Q&A, and to take our Q&A tutorial . With these tips you'll be able to prepare questions that draw responses from our members.
The more details you provide, the more likely it is that members will be able to answer your question.
Should you wish, you can revise your question by selecting Actions, then Edit.
By adding a Picture to your profile you encourage readers to respond.