Skip to Content

Update Shipment Planning Date and Time using BAPI_SHIPMENT_CHANGE

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jun 05, 2015 at 03:10 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 05, 2015 at 03:18 PM

    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

    Add comment
    10|10000 characters needed characters exceeded