Ansicht
Dokumentation

EXIT_SAPLV56S_001 - Shipment Processing: Leg Determination

EXIT_SAPLV56S_001 - Shipment Processing: Leg Determination

Vendor Master (General Section)   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module allows you to carry out a self-defined leg determination.

The function is called up at the following times:

Create shipment (transaction VT01) or Change shipment (VT02):
If the status "planned" is set for the general header data, or if the button "Leg determination" is selected on the overview of the stage, the function module 'SD_SHIPMENT_LEG_DETERMINATION' is called up.

In this function module, first the standard function is called up (that is generated according to the leg determination type and other import parameter legs) and then this customer function is called up.

This user exit can therefore be used in two different ways:

  1. Customer-defined leg determination (in Customizing for shipping types, leg determination is to be switched off: leg determination = ' ')
  2. Modification of the legs generated by leg determination (for example, to enter the dates for the start and finish of the shipment on this leg, to add or delete new legs, to change the sequence, etc.).

Example

For example, a specific stage can always be added on after leg determination (for example, because a certain custom agent always carries out tasks at the border).

This could be realized, for example, in the following way:

data:
l_xvtts_new like vttsvb.


l_xvtts_new-tstyp = '3'. "Border crossing point
l_xvtts_new-elupd = '1'. "Automatic stage
l_xvtts_new-knota = 'NNNNNNNNNN'. "node
l_xvtts_new-tdlnr = 'XXXXXXX'. "customs-agent

call function 'SD_SHIPMENT_STAGE_CHECK'
exporting
i_xvtts = l_xvtts_new
exceptions
others = 1.

if sy-subrc = 0.
call function 'SD_SHIPMENT_STAGE_APPEND'
exporting
i_tknum = i_vttk_tknum
i_xvtts_new = l_xvtts_new
tables
c_xvtts = c_xvtts
c_yvtts = c_yvtts
c_xvtsp = c_xvtsp
c_yvtsp = c_yvtsp
c_xvbpa = c_xvbpa
c_yvbpa = c_yvbpa
c_xvbadr = c_xvbadr
i_xvttp_new = i_xvttp
exceptions
stage_not_successfully_created = 1
others = 2.
endif.
clear sy-subrc.

Notes

Further information





Parameters

C_XVBADR
C_XVBPA
C_XVTSP
C_XVTTS
C_YVBPA
C_YVTSP
C_YVTTS
I_DEPARTURE
I_DEPARTURE_SEQUENCE
I_DESTINATION
I_SPOPLIST
I_VTTK_ABFER
I_VTTK_LAUFK
I_VTTK_STERM
I_VTTK_TDLNR
I_VTTK_TKNUM
I_VTTK_VSANL
I_VTTK_VSART
I_VTTK_VSAVL
I_XTRLK
I_XVTTP
OPT_DIALOG

Exceptions

ERROR

Function Group

XV56

General Material Data   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 3355 Date: 20240523 Time: 045024     sap01-206 ( 47 ms )