SAP SD_SHIPMENT_HEADER_CARR_CHANGE Function Module for NOTRANSL: Ändern des Dienstleisters im Transportkopf
SD_SHIPMENT_HEADER_CARR_CHANGE is a standard sd shipment header carr 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 Dienstleisters im Transportkopf 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 carr change FM, simply by entering the name SD_SHIPMENT_HEADER_CARR_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_CARR_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_CARR_CHANGE'"NOTRANSL: Ändern des Dienstleisters im Transportkopf.
EXPORTING
I_NEW_TDLNR = "
* I_CPD_ADRNR = "
* I_CPD_ADRDA = "
* OPT_DIALOG = 'X' "
IMPORTING
E_NUMBER_OF_CHANGED_LEGS = "
CHANGING
C_XVTTK = "Shipment header
TABLES
C_XVBPA = "Partner
C_YVBPA = "Partner
C_XVTTS = "Stages
C_YVTTS = "Stages
C_XVBADR = "
C_YVBADR = "
EXCEPTIONS
TDLNR_CHANGE_FAILED = 1
IMPORTING Parameters details for SD_SHIPMENT_HEADER_CARR_CHANGE
I_NEW_TDLNR -
Data type: VTTK-TDLNROptional: No
Call by Reference: No ( called with pass by value option)
I_CPD_ADRNR -
Data type: VBPA-ADRNROptional: Yes
Call by Reference: No ( called with pass by value option)
I_CPD_ADRDA -
Data type: VBPA-ADRDAOptional: Yes
Call by Reference: No ( called with pass by value option)
OPT_DIALOG -
Data type: RV56A-SELKZDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SD_SHIPMENT_HEADER_CARR_CHANGE
E_NUMBER_OF_CHANGED_LEGS -
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for SD_SHIPMENT_HEADER_CARR_CHANGE
C_XVTTK - Shipment header
Data type: VTTKVBOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SD_SHIPMENT_HEADER_CARR_CHANGE
C_XVBPA - Partner
Data type: VBPAVBOptional: No
Call by Reference: No ( called with pass by value option)
C_YVBPA - Partner
Data type: VBPAVBOptional: No
Call by Reference: No ( called with pass by value option)
C_XVTTS - Stages
Data type: VTTSVBOptional: No
Call by Reference: No ( called with pass by value option)
C_YVTTS - Stages
Data type: VTTSVBOptional: No
Call by Reference: No ( called with pass by value option)
C_XVBADR -
Data type: SADRVBOptional: No
Call by Reference: No ( called with pass by value option)
C_YVBADR -
Data type: SADRVBOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
TDLNR_CHANGE_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_CARR_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: | ||||
| lt_c_xvbpa | TYPE STANDARD TABLE OF VBPAVB, " | |||
| lv_c_xvttk | TYPE VTTKVB, " | |||
| lv_i_new_tdlnr | TYPE VTTK-TDLNR, " | |||
| lv_tdlnr_change_failed | TYPE VTTK, " | |||
| lv_e_number_of_changed_legs | TYPE I, " | |||
| lt_c_yvbpa | TYPE STANDARD TABLE OF VBPAVB, " | |||
| lv_i_cpd_adrnr | TYPE VBPA-ADRNR, " | |||
| lt_c_xvtts | TYPE STANDARD TABLE OF VTTSVB, " | |||
| lv_i_cpd_adrda | TYPE VBPA-ADRDA, " | |||
| lt_c_yvtts | TYPE STANDARD TABLE OF VTTSVB, " | |||
| lv_opt_dialog | TYPE RV56A-SELKZ, " 'X' | |||
| lt_c_xvbadr | TYPE STANDARD TABLE OF SADRVB, " | |||
| lt_c_yvbadr | TYPE STANDARD TABLE OF SADRVB. " |
|   CALL FUNCTION 'SD_SHIPMENT_HEADER_CARR_CHANGE' "NOTRANSL: Ändern des Dienstleisters im Transportkopf |
| EXPORTING | ||
| I_NEW_TDLNR | = lv_i_new_tdlnr | |
| I_CPD_ADRNR | = lv_i_cpd_adrnr | |
| I_CPD_ADRDA | = lv_i_cpd_adrda | |
| OPT_DIALOG | = lv_opt_dialog | |
| IMPORTING | ||
| E_NUMBER_OF_CHANGED_LEGS | = lv_e_number_of_changed_legs | |
| CHANGING | ||
| C_XVTTK | = lv_c_xvttk | |
| TABLES | ||
| C_XVBPA | = lt_c_xvbpa | |
| C_YVBPA | = lt_c_yvbpa | |
| C_XVTTS | = lt_c_xvtts | |
| C_YVTTS | = lt_c_yvtts | |
| C_XVBADR | = lt_c_xvbadr | |
| C_YVBADR | = lt_c_yvbadr | |
| EXCEPTIONS | ||
| TDLNR_CHANGE_FAILED = 1 | ||
| . " SD_SHIPMENT_HEADER_CARR_CHANGE | ||
ABAP code using 7.40 inline data declarations to call FM SD_SHIPMENT_HEADER_CARR_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 TDLNR FROM VTTK INTO @DATA(ld_i_new_tdlnr). | ||||
| "SELECT single ADRNR FROM VBPA INTO @DATA(ld_i_cpd_adrnr). | ||||
| "SELECT single ADRDA FROM VBPA INTO @DATA(ld_i_cpd_adrda). | ||||
| "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