Ansicht
Dokumentation

EXIT_SAPLV56F_012 - Shipment Processing: Activities for Setting a Status, Time 2

EXIT_SAPLV56F_012 - Shipment Processing: Activities for Setting a Status, Time 2

Vendor Master (General Section)   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

You use this function module to include your user-defined activities that take place when you set a status in the shipment header.

The function module is called up in shipment processing (for example, creating a shipment, VT01, or changing a shipment, VT02) whenever one of the statuses in the shipment header is changed.

At this point, depending on the pushbutton you pressed, different
function modules will be called up:
'SD_SHIPMENT_STATUS_PLANNED' for status 'planned'
'SD_SHIPMENT_STATUS_REGISTRATED' for status 'checked-in'
'SD_SHIPMENT_STATUS_LOAD_END' for status 'Load end'
'SD_SHIPMENT_STATUS_LOAD_START' for status 'Load start'
'SD_SHIPMENT_STATUS_COMPLETION' for status 'Completion'
'SD_SHIPMENT_STATUS_SHIPM_END' for status 'Shipment end'
'SD_SHIPMENT_STATUS_SHIPM_START' for status 'Shipment start'

In each of these function modules, this function module is called up if the status ' ' (blank, space) changes to X or vice versa.

This function module is called up at time 2, that is, AFTER the standard check (for example, authorization check for setting the status) and AFTER the actual activities of the standard version (for example, copying the delivery data from the deliveries into the shipment if the status is set to 'planned'), This time is therefore suitable for being able to influence the results of the standard even at a later time.

See also the customer function EXIT_SAPLV56F_0011: This function module is called up BEFORE the activities in the standard. It can therefore be used to execute a check as to whether the activities can at all be executed.

The IMPORT parameter I_STATUS tells for which status to be set this customer function is called:
I_STATUS = '1' bei Status 'Planned'
I_STATUS = '2' bei Status 'Registered'
I_STATUS = '3' bei Status 'Load end'
I_STATUS = '4' bei Status 'Load start'
I_STATUS = '5' bei Status 'Completion'
I_STATUS = '6' bei Status 'Shipment end'
I_STATUS = '7' bei Status 'Shipment start'

In this user exit, you need to react in different ways, depending on this value. Also, the reaction must depend on whether the status is set or reset. You can find this information in the workarea C_XVTTK, which still contains the old value for the respective status. The query within the user exit could therefore be as follows:

CASE I_STATUS.
* Status 'Planned'
WHEN '1'.
IF C_XVTTK-STDIS IS INITIAL. "Status is set
....
ELSE. "Status is reset
....
ENDIF.

* Status 'Registered'
WHEN '2'.
IF C_XVTTK-STREG IS INITIAL. "Status is set
....
ELSE. "Status is reset
....
ENDIF.

* Status 'Load start'
WHEN '3'.
IF C_XVTTK-STLBG IS INITIAL. "Status is set
....
ELSE. "Status is reset
....
ENDIF.

* Status 'Load end'
WHEN '4'.
IF C_XVTTK-STLAD IS INITIAL. "Status is set
....
ELSE. "Status is reset
....
ENDIF.

* Status 'Completion'
WHEN '5'.
IF C_XVTTK-STABF IS INITIAL. "Status is set
....
ELSE. "Status is reset
....
ENDIF.

* Status 'Shipment start'
WHEN '6'.
IF C_XVTTK-STTBG IS INITIAL. "Status is set
....
ELSE. "Status is reset
....
ENDIF.

* Status 'Shipment end'
WHEN '7'.
IF C_XVTTK-STTEN IS INITIAL. "Status is set
....
ELSE. "Status is reset
....
ENDIF.

ENDCASE.

If this function module returns a SY-SUBRC <> 0, the respective status is not changed. In this case, the exception 'ERROR' must be initiated.

Notes

Further information





Parameters

C_XVBADR
C_XVBPA
C_XVTSP
C_XVTTK
C_XVTTP
C_XVTTS
C_YVBPA
C_YVTSP
C_YVTTP
C_YVTTS
I_NEW_STATUS_DATE
I_NEW_STATUS_TIME
I_STATUS
I_TVTK
I_XTRLK
I_XTRLP
OPT_DIALOG

Exceptions

ERROR

Function Group

XV56

rdisp/max_wprun_time - Maximum work process run time   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 4898 Date: 20240523 Time: 051620     sap01-206 ( 75 ms )