SAP SD_SHIPMENT_HEADER_CHANGE Function Module for NOTRANSL: Ändern des Transportkopfes mit allen abhängigen Funktionen









SD_SHIPMENT_HEADER_CHANGE is a standard sd shipment header change SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Ändern des Transportkopfes mit allen abhängigen Funktionen processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for sd shipment header change FM, simply by entering the name SD_SHIPMENT_HEADER_CHANGE into the relevant SAP transaction such as SE37 or SE38.

Function Group: V56H
Program Name: SAPLV56H
Main Program: SAPLV56H
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SD_SHIPMENT_HEADER_CHANGE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'SD_SHIPMENT_HEADER_CHANGE'"NOTRANSL: Ändern des Transportkopfes mit allen abhängigen Funktionen
EXPORTING
* I_TVTK = "Shipment type
* I_DESTINATION = "Destination point during leg determination for preliminary leg
* I_DEPARTURE = "Poing of departure during leg determination for subsequent leg
* OPT_DIALOG = 'X' "Carry out online for itinerary ?

IMPORTING
E_SERV_AGENT_FROM_DELIVERY = "Service agent copied from delivery
E_ROUTE_FROM_DELIVERY = "Route copied from delivery
E_LEG_DETERMINATION_DONE = "Leg determination carried out
E_NUMBER_OF_CHANGED_LEGS = "Number of changed legs

CHANGING
C_XVTTK_NEW = "New shipment header (may be changed again)

TABLES
C_XVTTK = "Shipment header
C_YVBPA = "Partners
C_XVBADR = "Addresses
C_YVBADR = "Addresses
I_XTRLK = "Delivery headers
I_XTRLP = "Delivery items
* I_DEPARTURE_SEQUENCE = "Itinerary
* I_XVTFA = "
* I_YVTFA = "
C_YVTTK = "Shipment header
C_XVTTP = "Shipment items
C_YVTTP = "Shipment items
C_XVTTS = "Stages
C_YVTTS = "Stages
C_XVTSP = "Assign stage/item
C_YVTSP = "Assign stage/item
C_XVBPA = "Partners

EXCEPTIONS
INVALID_CHANGE = 1 STATUS_SHIPMENT_END_FAILED = 10 ROUTE_INSERT_FAILED = 2 TDLNR_INSERT_FAILED = 3 STATUS_PLANNED_FAILED = 4 STATUS_REGISTRATED_FAILED = 5 STATUS_LOADING_START_FAILED = 6 STATUS_LOADING_END_FAILED = 7 STATUS_COMPLETION_FAILED = 8 STATUS_SHIPMENT_START_FAILED = 9
.



IMPORTING Parameters details for SD_SHIPMENT_HEADER_CHANGE

I_TVTK - Shipment type

Data type: TVTK
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DESTINATION - Destination point during leg determination for preliminary leg

Data type: LOC_DEST
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DEPARTURE - Poing of departure during leg determination for subsequent leg

Data type: LOC_DEPT
Optional: Yes
Call by Reference: No ( called with pass by value option)

OPT_DIALOG - Carry out online for itinerary ?

Data type: RV56A-SELKZ
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for SD_SHIPMENT_HEADER_CHANGE

E_SERV_AGENT_FROM_DELIVERY - Service agent copied from delivery

Data type: RV56A-SELKZ
Optional: No
Call by Reference: No ( called with pass by value option)

E_ROUTE_FROM_DELIVERY - Route copied from delivery

Data type: RV56A-SELKZ
Optional: No
Call by Reference: No ( called with pass by value option)

E_LEG_DETERMINATION_DONE - Leg determination carried out

Data type: RV56A-SELKZ
Optional: No
Call by Reference: No ( called with pass by value option)

E_NUMBER_OF_CHANGED_LEGS - Number of changed legs

Data type: I
Optional: No
Call by Reference: No ( called with pass by value option)

CHANGING Parameters details for SD_SHIPMENT_HEADER_CHANGE

C_XVTTK_NEW - New shipment header (may be changed again)

Data type: VTTKVB
Optional: No
Call by Reference: Yes

TABLES Parameters details for SD_SHIPMENT_HEADER_CHANGE

C_XVTTK - Shipment header

Data type: VTTKVB
Optional: No
Call by Reference: No ( called with pass by value option)

C_YVBPA - Partners

Data type: VBPAVB
Optional: No
Call by Reference: No ( called with pass by value option)

C_XVBADR - Addresses

Data type: SADRVB
Optional: No
Call by Reference: No ( called with pass by value option)

C_YVBADR - Addresses

Data type: SADRVB
Optional: No
Call by Reference: No ( called with pass by value option)

I_XTRLK - Delivery headers

Data type: VTRLK
Optional: No
Call by Reference: No ( called with pass by value option)

I_XTRLP - Delivery items

Data type: VTRLP
Optional: No
Call by Reference: No ( called with pass by value option)

I_DEPARTURE_SEQUENCE - Itinerary

Data type: VTTSLKA
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_XVTFA -

Data type: VTFAVB
Optional: Yes
Call by Reference: Yes

I_YVTFA -

Data type: VTFAVB
Optional: Yes
Call by Reference: Yes

C_YVTTK - Shipment header

Data type: VTTKVB
Optional: No
Call by Reference: No ( called with pass by value option)

C_XVTTP - Shipment items

Data type: VTTPVB
Optional: No
Call by Reference: No ( called with pass by value option)

C_YVTTP - Shipment items

Data type: VTTPVB
Optional: No
Call by Reference: No ( called with pass by value option)

C_XVTTS - Stages

Data type: VTTSVB
Optional: No
Call by Reference: No ( called with pass by value option)

C_YVTTS - Stages

Data type: VTTSVB
Optional: No
Call by Reference: No ( called with pass by value option)

C_XVTSP - Assign stage/item

Data type: VTSPVB
Optional: No
Call by Reference: No ( called with pass by value option)

C_YVTSP - Assign stage/item

Data type: VTSPVB
Optional: No
Call by Reference: No ( called with pass by value option)

C_XVBPA - Partners

Data type: VBPAVB
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

INVALID_CHANGE - Invalid change

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

STATUS_SHIPMENT_END_FAILED - setting status 'shipment end' failed

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ROUTE_INSERT_FAILED - Adding the route failed

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TDLNR_INSERT_FAILED - Adding service agent failed

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

STATUS_PLANNED_FAILED - setting status 'planned' failed

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

STATUS_REGISTRATED_FAILED - setting status 'registered' failed

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

STATUS_LOADING_START_FAILED - setting status 'start loading' failed

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

STATUS_LOADING_END_FAILED - setting status 'end loading' failed

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

STATUS_COMPLETION_FAILED - Setting 'transportation processing' status failed

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

STATUS_SHIPMENT_START_FAILED - setting status 'shipment start' failed

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for SD_SHIPMENT_HEADER_CHANGE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_i_tvtk  TYPE TVTK, "   
lt_c_xvttk  TYPE STANDARD TABLE OF VTTKVB, "   
lv_c_xvttk_new  TYPE VTTKVB, "   
lv_invalid_change  TYPE VTTKVB, "   
lv_e_serv_agent_from_delivery  TYPE RV56A-SELKZ, "   
lt_c_yvbpa  TYPE STANDARD TABLE OF VBPAVB, "   
lv_status_shipment_end_failed  TYPE VBPAVB, "   
lt_c_xvbadr  TYPE STANDARD TABLE OF SADRVB, "   
lt_c_yvbadr  TYPE STANDARD TABLE OF SADRVB, "   
lt_i_xtrlk  TYPE STANDARD TABLE OF VTRLK, "   
lt_i_xtrlp  TYPE STANDARD TABLE OF VTRLP, "   
lt_i_departure_sequence  TYPE STANDARD TABLE OF VTTSLKA, "   
lt_i_xvtfa  TYPE STANDARD TABLE OF VTFAVB, "   
lt_i_yvtfa  TYPE STANDARD TABLE OF VTFAVB, "   
lt_c_yvttk  TYPE STANDARD TABLE OF VTTKVB, "   
lv_i_destination  TYPE LOC_DEST, "   
lv_route_insert_failed  TYPE LOC_DEST, "   
lv_e_route_from_delivery  TYPE RV56A-SELKZ, "   
lt_c_xvttp  TYPE STANDARD TABLE OF VTTPVB, "   
lv_i_departure  TYPE LOC_DEPT, "   
lv_tdlnr_insert_failed  TYPE LOC_DEPT, "   
lv_e_leg_determination_done  TYPE RV56A-SELKZ, "   
lt_c_yvttp  TYPE STANDARD TABLE OF VTTPVB, "   
lv_opt_dialog  TYPE RV56A-SELKZ, "   'X'
lv_status_planned_failed  TYPE RV56A, "   
lv_e_number_of_changed_legs  TYPE I, "   
lt_c_xvtts  TYPE STANDARD TABLE OF VTTSVB, "   
lv_status_registrated_failed  TYPE VTTSVB, "   
lt_c_yvtts  TYPE STANDARD TABLE OF VTTSVB, "   
lv_status_loading_start_failed  TYPE VTTSVB, "   
lt_c_xvtsp  TYPE STANDARD TABLE OF VTSPVB, "   
lv_status_loading_end_failed  TYPE VTSPVB, "   
lt_c_yvtsp  TYPE STANDARD TABLE OF VTSPVB, "   
lv_status_completion_failed  TYPE VTSPVB, "   
lt_c_xvbpa  TYPE STANDARD TABLE OF VBPAVB, "   
lv_status_shipment_start_failed  TYPE VBPAVB. "   

  CALL FUNCTION 'SD_SHIPMENT_HEADER_CHANGE'  "NOTRANSL: Ändern des Transportkopfes mit allen abhängigen Funktionen
    EXPORTING
         I_TVTK = lv_i_tvtk
         I_DESTINATION = lv_i_destination
         I_DEPARTURE = lv_i_departure
         OPT_DIALOG = lv_opt_dialog
    IMPORTING
         E_SERV_AGENT_FROM_DELIVERY = lv_e_serv_agent_from_delivery
         E_ROUTE_FROM_DELIVERY = lv_e_route_from_delivery
         E_LEG_DETERMINATION_DONE = lv_e_leg_determination_done
         E_NUMBER_OF_CHANGED_LEGS = lv_e_number_of_changed_legs
    CHANGING
         C_XVTTK_NEW = lv_c_xvttk_new
    TABLES
         C_XVTTK = lt_c_xvttk
         C_YVBPA = lt_c_yvbpa
         C_XVBADR = lt_c_xvbadr
         C_YVBADR = lt_c_yvbadr
         I_XTRLK = lt_i_xtrlk
         I_XTRLP = lt_i_xtrlp
         I_DEPARTURE_SEQUENCE = lt_i_departure_sequence
         I_XVTFA = lt_i_xvtfa
         I_YVTFA = lt_i_yvtfa
         C_YVTTK = lt_c_yvttk
         C_XVTTP = lt_c_xvttp
         C_YVTTP = lt_c_yvttp
         C_XVTTS = lt_c_xvtts
         C_YVTTS = lt_c_yvtts
         C_XVTSP = lt_c_xvtsp
         C_YVTSP = lt_c_yvtsp
         C_XVBPA = lt_c_xvbpa
    EXCEPTIONS
        INVALID_CHANGE = 1
        STATUS_SHIPMENT_END_FAILED = 10
        ROUTE_INSERT_FAILED = 2
        TDLNR_INSERT_FAILED = 3
        STATUS_PLANNED_FAILED = 4
        STATUS_REGISTRATED_FAILED = 5
        STATUS_LOADING_START_FAILED = 6
        STATUS_LOADING_END_FAILED = 7
        STATUS_COMPLETION_FAILED = 8
        STATUS_SHIPMENT_START_FAILED = 9
. " SD_SHIPMENT_HEADER_CHANGE




ABAP code using 7.40 inline data declarations to call FM SD_SHIPMENT_HEADER_CHANGE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
 
"SELECT single SELKZ FROM RV56A INTO @DATA(ld_e_serv_agent_from_delivery).
 
 
 
 
 
 
 
 
 
 
 
 
 
"SELECT single SELKZ FROM RV56A INTO @DATA(ld_e_route_from_delivery).
 
 
 
 
"SELECT single SELKZ FROM RV56A INTO @DATA(ld_e_leg_determination_done).
 
 
"SELECT single SELKZ FROM RV56A INTO @DATA(ld_opt_dialog).
DATA(ld_opt_dialog) = 'X'.
 
 
 
 
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!