Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Update Shipment Planning Date and Time using BAPI_SHIPMENT_CHANGE

kirankerudi
Active Participant
0 Kudos

Hello All,


How to update UPTEN and DPTEN fields in Shipment Document using BAPI_SHIPMENT_CHANGE ?

I tried the below method, but it didn't update the fields.

wa_hdrline-time_type =' HDRSTSEPDT'.
        
CONCATENATE wa_shphdr-dpten wa_shphdr-upten INTO g_utc.
         wa_hdrline-time_stamp_utc = g_utc.
         wa_hdrline-time_zone = sy-tzone.
         wa_hdrlineact-time_stamp_utc = ''C'.
         wa_hdrlineact-time_type = 'C'.
         wa_hdrlineact-time_zone = 'C'.
         APPEND wa_hdrline TO it_hdrline.
         APPEND wa_hdrlineact TO it_hdrlineact.

I sent this to BAPI. But ended with the data not being updated.

Help needed.


Thanks & Regards,

Kiran

2 REPLIES 2

Former Member
0 Kudos

Hi,

Which Internal table you are using in the BAPI? It looks like you are using wrong table as the INPUT.

Try using  HEADERDEADLINE table passing this fields along with

TIME_TYPE = ' HDRSTSEPDT' . This is for UPTEN DPTEN. If you need to update any other date paste the screenshot pointing the field from VT01N/VT02N/VT03N.

TIME_STAMP_UTC = Date + time.

Also make sure to issue commit ( BAPI_TRANSACTION_COMMIT ).

If still doesn't work , get back with messages from the RETURN table and code snippet.

R

Former Member
0 Kudos

Kiran,

Do a search for the field UPTEN in the bapi. If you go thru the search results you will find that the data from structures  STAGEDATA and STAGEDATAACTION or  STAGEDEADLINE and  STAGEDEADLINEACTION is actually to update this.

Run a couple of tests with these structures and you should be able to figure out the right structure that needs to be used.

Make sure to use the correct time type in these structures.

For UPTEN/DPTEN, I think it should be STLENDPT. Check the code once in the bapi and confirm.

Thanks,

Vikram.M