cancel
Showing results for 
Search instead for 
Did you mean: 

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

haemma83
Active Participant
0 Kudos
312

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

Accepted Solutions (0)

Answers (4)

Answers (4)

haemma83
Active Participant
0 Kudos

I managed now to perform the change. However the value won't be persisted.

haemma83
Active Participant
0 Kudos

Any ideas? Examples? Thanks

haemma83
Active Participant
0 Kudos

In the meantime I added this - but it changes nothing:

ls_stageact-org_addr = 'C'.
append ls_stageact to lt_stageact.
former_member259807
Active Participant
0 Kudos

Hi,

you do not append to lt_stageact, so this table will be empty on call BAPI_SHIPMENT_CHANGE.

reg,

bob