Skip to Content
0
Sep 10, 2019 at 08:52 AM

Changing the dispatching/org-address on transport stage in vt02n

243 Views Last edit Sep 11, 2019 at 06:18 AM 3 rev

Hello experts!

I'd like to change the adress for a dispatching location within a stage of a transport.

I tried it with the BAPI

BAPI_SHIPMENT_CHANGE in the following manner:

 l_shheader-shipment_num = ls_vttk-tknum.

      "l_shaction-shipment_num = 'C'.

      c_xvtts-adrnad = '0000036872'.

      ls_stage-org_addr = '0000036872'.

      "ls_stage-stage_cat = c_xvtts-tstyp.

      "ls_stage-org_point = c_xvtts-tknota.

      ls_stage-org_shipp_dpmnt = i_xvttp-vstel.

      "ls_stage-org_plant = '0028'.

      "ls_stage-org_cust = c_xvtts-kunnz.

      "ls_stage-org_suppl = '0000801844'.



      "ls_stage-dest_dlv_num

      APPEND ls_stage TO lt_stage.

      ls_stageact-org_addr = 'C'.


      CALL FUNCTION 'BAPI_SHIPMENT_CHANGE'

        EXPORTING

          headerdata       = l_shheader

          headerdataaction = l_shaction

        TABLES

          stagedata        = lt_stage

          stagedataaction  = lt_stageact

          return           = lt_return.



      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

        EXPORTING

          wait = abap_true.

It's running through and says at the end - no change needed.

I thought, if I'm going to change the adress-id it will automatically pull the correct address data.

Please support!

Thanks!

Andreas