SAP Function Modules

EXIT_SAPLV56U_001 SAP Function module - Checking of Shipments for Changes







EXIT_SAPLV56U_001 is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name EXIT_SAPLV56U_001 into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: XV56
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM EXIT_SAPLV56U_001 - EXIT SAPLV56U 001





CALL FUNCTION 'EXIT_SAPLV56U_001' "Checking of Shipments for Changes
* EXPORTING
*   i_bldgr = SPACE             " t185-bldgr    Screen Group
*   i_trtyp = SPACE             " t180-trtyp    Transaction Type
  TABLES
    i_xvttk =                   " vttkvb        Shipment Headers (Current)
    i_yvttk =                   " vttkvb        Shipment Headers (Old)
    i_xvttp =                   " vttpvb        Shipment Items (Current)
    i_yvttp =                   " vttpvb        Shipment Items (Old)
    i_xvtts =                   " vttsvb        Shipment Stages (Current)
    i_yvtts =                   " vttsvb        Shipment Stages (Old)
    i_xvtsp =                   " vtspvb        Assignment Stage/Item (Old)
    i_yvtsp =                   " vtspvb        Assignments Stage/Item (Current)
  EXCEPTIONS
    DATA_CHANGED = 1            "               Data was changed
    .  "  EXIT_SAPLV56U_001

ABAP code example for Function Module EXIT_SAPLV56U_001





The ABAP code below is a full code listing to execute function module EXIT_SAPLV56U_001 including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
it_i_xvttk  TYPE STANDARD TABLE OF VTTKVB,"TABLES PARAM
wa_i_xvttk  LIKE LINE OF it_i_xvttk ,
it_i_yvttk  TYPE STANDARD TABLE OF VTTKVB,"TABLES PARAM
wa_i_yvttk  LIKE LINE OF it_i_yvttk ,
it_i_xvttp  TYPE STANDARD TABLE OF VTTPVB,"TABLES PARAM
wa_i_xvttp  LIKE LINE OF it_i_xvttp ,
it_i_yvttp  TYPE STANDARD TABLE OF VTTPVB,"TABLES PARAM
wa_i_yvttp  LIKE LINE OF it_i_yvttp ,
it_i_xvtts  TYPE STANDARD TABLE OF VTTSVB,"TABLES PARAM
wa_i_xvtts  LIKE LINE OF it_i_xvtts ,
it_i_yvtts  TYPE STANDARD TABLE OF VTTSVB,"TABLES PARAM
wa_i_yvtts  LIKE LINE OF it_i_yvtts ,
it_i_xvtsp  TYPE STANDARD TABLE OF VTSPVB,"TABLES PARAM
wa_i_xvtsp  LIKE LINE OF it_i_xvtsp ,
it_i_yvtsp  TYPE STANDARD TABLE OF VTSPVB,"TABLES PARAM
wa_i_yvtsp  LIKE LINE OF it_i_yvtsp .


SELECT single BLDGR
FROM T185
INTO @DATA(ld_i_bldgr).


SELECT single TRTYP
FROM T180
INTO @DATA(ld_i_trtyp).


"populate fields of struture and append to itab
append wa_i_xvttk to it_i_xvttk.

"populate fields of struture and append to itab
append wa_i_yvttk to it_i_yvttk.

"populate fields of struture and append to itab
append wa_i_xvttp to it_i_xvttp.

"populate fields of struture and append to itab
append wa_i_yvttp to it_i_yvttp.

"populate fields of struture and append to itab
append wa_i_xvtts to it_i_xvtts.

"populate fields of struture and append to itab
append wa_i_yvtts to it_i_yvtts.

"populate fields of struture and append to itab
append wa_i_xvtsp to it_i_xvtsp.

"populate fields of struture and append to itab
append wa_i_yvtsp to it_i_yvtsp. . CALL FUNCTION 'EXIT_SAPLV56U_001' * EXPORTING * i_bldgr = ld_i_bldgr * i_trtyp = ld_i_trtyp TABLES i_xvttk = it_i_xvttk i_yvttk = it_i_yvttk i_xvttp = it_i_xvttp i_yvttp = it_i_yvttp i_xvtts = it_i_xvtts i_yvtts = it_i_yvtts i_xvtsp = it_i_xvtsp i_yvtsp = it_i_yvtsp EXCEPTIONS DATA_CHANGED = 1 . " EXIT_SAPLV56U_001
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_i_bldgr  TYPE T185-BLDGR ,
it_i_xvttk  TYPE STANDARD TABLE OF VTTKVB ,
wa_i_xvttk  LIKE LINE OF it_i_xvttk,
ld_i_trtyp  TYPE T180-TRTYP ,
it_i_yvttk  TYPE STANDARD TABLE OF VTTKVB ,
wa_i_yvttk  LIKE LINE OF it_i_yvttk,
it_i_xvttp  TYPE STANDARD TABLE OF VTTPVB ,
wa_i_xvttp  LIKE LINE OF it_i_xvttp,
it_i_yvttp  TYPE STANDARD TABLE OF VTTPVB ,
wa_i_yvttp  LIKE LINE OF it_i_yvttp,
it_i_xvtts  TYPE STANDARD TABLE OF VTTSVB ,
wa_i_xvtts  LIKE LINE OF it_i_xvtts,
it_i_yvtts  TYPE STANDARD TABLE OF VTTSVB ,
wa_i_yvtts  LIKE LINE OF it_i_yvtts,
it_i_xvtsp  TYPE STANDARD TABLE OF VTSPVB ,
wa_i_xvtsp  LIKE LINE OF it_i_xvtsp,
it_i_yvtsp  TYPE STANDARD TABLE OF VTSPVB ,
wa_i_yvtsp  LIKE LINE OF it_i_yvtsp.


SELECT single BLDGR
FROM T185
INTO ld_i_bldgr.


"populate fields of struture and append to itab
append wa_i_xvttk to it_i_xvttk.

SELECT single TRTYP
FROM T180
INTO ld_i_trtyp.


"populate fields of struture and append to itab
append wa_i_yvttk to it_i_yvttk.

"populate fields of struture and append to itab
append wa_i_xvttp to it_i_xvttp.

"populate fields of struture and append to itab
append wa_i_yvttp to it_i_yvttp.

"populate fields of struture and append to itab
append wa_i_xvtts to it_i_xvtts.

"populate fields of struture and append to itab
append wa_i_yvtts to it_i_yvtts.

"populate fields of struture and append to itab
append wa_i_xvtsp to it_i_xvtsp.

"populate fields of struture and append to itab
append wa_i_yvtsp to it_i_yvtsp.

SAP Documentation for FM EXIT_SAPLV56U_001


When you save or leave the transaction after processing a shipment, the system checks whether you have made changes and displays a message ...See here for full SAP fm documentation












Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name EXIT_SAPLV56U_001 or its description.