Ansicht
Dokumentation

EXIT_SAPLV56F_010 - Shipment Processing: Copying Delivery Data to Shipment Document

EXIT_SAPLV56F_010 - Shipment Processing: Copying Delivery Data to Shipment Document

rdisp/max_wprun_time - Maximum work process run time   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module lets you copy delivery data to the shipment document.

In Customizing for the shipment type, you can specify that the route and forwarding agent (if unique) should be copied from the deliveries to the shipment.

This is done during shipment processing (Create shipment, VT01, or Change shipment, VT02) if the status "Planned" is set in the shipment header.

At that time, the system calls the function module 'SD_SHIPMENT_COPY_DELIVERY_DATA', which copies the route and the forwarding agent from the deliveries depending on your Customizing settings.

The function module is called immediately after that. Here you can copy additional data from the deliveries to the shipment document (such as the shipping conditions).

Example

You might copy the data as follows:



data:
begin of l_last_data,
vsbed like vttk-vsbed, "Versandbedingung/Shipping condition
* .... "Weitere Daten/Further data
end of l_last_data,
begin of l_is_not_identical,
vsbed like rv56a-selkz, "Versandbedingung/Shipping condition
* .... "Weitere Daten/Further data
end of l_is_not_identical,
l_start_tabix like sy-tabix,
l_tabix like sy-tabix.


*****************************************************************
* Daten aus den Lieferungen analysieren
* Analyse Data from deliveries
*****************************************************************
clear: l_last_data, l_is_not_identical.
read table i_xvttp with key tknum = c_xvttk-tknum
binary search.
l_start_tabix = sy-tabix.
if sy-subrc = 0.
loop at i_xvttp from l_start_tabix.
l_tabix = sy-tabix.
if i_xvttp-tknum ne c_xvttk-tknum. exit. endif.
read table i_xtrlk with key vbeln = i_xvttp-vbeln
binary search.
if sy-subrc = 0.
* Versandbedingung/Shipping condition
if l_is_not_identical-vsbed is initial and
not i_xtrlk-vsbed is initial. "ignore initial entries
if l_tabix = l_start_tabix.
l_last_data-vsbed = i_xtrlk-vsbed.
else.
if l_last_data-vsbed ne i_xtrlk-vsbed.
l_is_not_identical-vsbed = 'X'.
endif.
endif.
endif.
* weitere Daten/Further data
* ....
endif.
endloop.
endif.

******************************************************
* Sind die Daten in allen Lieferungen gleich ?
* Nur in diesem Fall kopieren !
* Are data identical in all deliveries ?
* Copy only in this case !
******************************************************
* Versandbedingung/Shipping condition
if l_is_not_identical-vsbed is initial.
c_xvttk-vsbed = l_last_data-vsbed.
endif.
* Weitere Daten/Further data
* ....

Notes

Further information





Parameters

C_XVBADR
C_XVBPA
C_XVTSP
C_XVTTK
C_XVTTS
C_YVBPA
C_YVTSP
C_YVTTS
I_TVTK
I_XTRLK
I_XTRLP
I_XVTTP

Exceptions

Function Group

XV56

Vendor Master (General Section)   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 3522 Date: 20240523 Time: 065553     sap01-206 ( 43 ms )