SAP DG1N_CHANGE_DOC_WRITE_DETAILS Function Module for NOTRANSL: Schreiben der Änderungsbelege (DG Detail Tabellen)
DG1N_CHANGE_DOC_WRITE_DETAILS is a standard dg1n change doc write details 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: Schreiben der Änderungsbelege (DG Detail Tabellen) 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 dg1n change doc write details FM, simply by entering the name DG1N_CHANGE_DOC_WRITE_DETAILS into the relevant SAP transaction such as SE37 or SE38.
Function Group: DG1N
Program Name: SAPLDG1N
Main Program: SAPLDG1N
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update: 3

Function DG1N_CHANGE_DOC_WRITE_DETAILS 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 'DG1N_CHANGE_DOC_WRITE_DETAILS'"NOTRANSL: Schreiben der Änderungsbelege (DG Detail Tabellen).
EXPORTING
* I_FLG_IN_UPDATE_TASK = ESP1_FALSE "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_AENNR = "Change Number
I_VALDAT = "Key Date
I_CALL_STATUS = "DE-EN-LANG-SWITCH-NO-TRANSLATION
TABLES
* I_PACK_INS_TAB = "EHS: API Structure Packing Requirements
* I_CARR_UPD_TAB = "EHS: API Structure Provisions for Carriage
* I_CARR_DEL_TAB = "EHS: API Structure Provisions for Carriage
* I_CARR_OLD_TAB = "EHS: API Structure Provisions for Carriage
* I_TRAPPR_INS_TAB = "EHS: API Structure for Transport Restrictions
* I_TRAPPR_UPD_TAB = "EHS: API Structure for Transport Restrictions
* I_TRAPPR_DEL_TAB = "EHS: API Structure for Transport Restrictions
* I_TRAPPR_OLD_TAB = "EHS: API Structure for Transport Restrictions
* I_DGREL_INS_TAB = "EHS: API Application Structure for Product Release
* I_DGREL_UPD_TAB = "EHS: API Application Structure for Product Release
* I_DGREL_DEL_TAB = "EHS: API Application Structure for Product Release
* I_PACK_UPD_TAB = "EHS: API Structure Packing Requirements
* I_DGREL_OLD_TAB = "EHS: API Application Structure for Product Release
* I_PACK_DEL_TAB = "EHS: API Structure Packing Requirements
* I_PACK_OLD_TAB = "EHS: API Structure Packing Requirements
* I_SPROV_INS_TAB = "EHS: API Structure Special Provisions
* I_SPROV_UPD_TAB = "EHS: API Structure Special Provisions
* I_SPROV_DEL_TAB = "EHS: API Structure Special Provisions
* I_SPROV_OLD_TAB = "EHS: API Structure Special Provisions
* I_CARR_INS_TAB = "EHS: API Structure Provisions for Carriage
IMPORTING Parameters details for DG1N_CHANGE_DOC_WRITE_DETAILS
I_FLG_IN_UPDATE_TASK - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_AENNR - Change Number
Data type: RCGRHBUF-AENNROptional: Yes
Call by Reference: No ( called with pass by value option)
I_VALDAT - Key Date
Data type: RCGRHBUF-VALFROptional: No
Call by Reference: No ( called with pass by value option)
I_CALL_STATUS - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: DGPD1_CALL_STATUSOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for DG1N_CHANGE_DOC_WRITE_DETAILS
I_PACK_INS_TAB - EHS: API Structure Packing Requirements
Data type: RCBDUAPIPACKOptional: Yes
Call by Reference: Yes
I_CARR_UPD_TAB - EHS: API Structure Provisions for Carriage
Data type: RCBDUAPICARROptional: Yes
Call by Reference: Yes
I_CARR_DEL_TAB - EHS: API Structure Provisions for Carriage
Data type: RCBDUAPICARROptional: Yes
Call by Reference: Yes
I_CARR_OLD_TAB - EHS: API Structure Provisions for Carriage
Data type: RCBDUAPICARROptional: Yes
Call by Reference: Yes
I_TRAPPR_INS_TAB - EHS: API Structure for Transport Restrictions
Data type: RCBDUAPITRAPPROptional: Yes
Call by Reference: Yes
I_TRAPPR_UPD_TAB - EHS: API Structure for Transport Restrictions
Data type: RCBDUAPITRAPPROptional: Yes
Call by Reference: Yes
I_TRAPPR_DEL_TAB - EHS: API Structure for Transport Restrictions
Data type: RCBDUAPITRAPPROptional: Yes
Call by Reference: Yes
I_TRAPPR_OLD_TAB - EHS: API Structure for Transport Restrictions
Data type: RCBDUAPITRAPPROptional: Yes
Call by Reference: Yes
I_DGREL_INS_TAB - EHS: API Application Structure for Product Release
Data type: RCBDUAPIDGRELAPPLOptional: Yes
Call by Reference: Yes
I_DGREL_UPD_TAB - EHS: API Application Structure for Product Release
Data type: RCBDUAPIDGRELAPPLOptional: Yes
Call by Reference: Yes
I_DGREL_DEL_TAB - EHS: API Application Structure for Product Release
Data type: RCBDUAPIDGRELAPPLOptional: Yes
Call by Reference: Yes
I_PACK_UPD_TAB - EHS: API Structure Packing Requirements
Data type: RCBDUAPIPACKOptional: Yes
Call by Reference: Yes
I_DGREL_OLD_TAB - EHS: API Application Structure for Product Release
Data type: RCBDUAPIDGRELAPPLOptional: Yes
Call by Reference: Yes
I_PACK_DEL_TAB - EHS: API Structure Packing Requirements
Data type: RCBDUAPIPACKOptional: Yes
Call by Reference: Yes
I_PACK_OLD_TAB - EHS: API Structure Packing Requirements
Data type: RCBDUAPIPACKOptional: Yes
Call by Reference: Yes
I_SPROV_INS_TAB - EHS: API Structure Special Provisions
Data type: RCBDUAPISPOptional: Yes
Call by Reference: Yes
I_SPROV_UPD_TAB - EHS: API Structure Special Provisions
Data type: RCBDUAPISPOptional: Yes
Call by Reference: Yes
I_SPROV_DEL_TAB - EHS: API Structure Special Provisions
Data type: RCBDUAPISPOptional: Yes
Call by Reference: Yes
I_SPROV_OLD_TAB - EHS: API Structure Special Provisions
Data type: RCBDUAPISPOptional: Yes
Call by Reference: Yes
I_CARR_INS_TAB - EHS: API Structure Provisions for Carriage
Data type: RCBDUAPICARROptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for DG1N_CHANGE_DOC_WRITE_DETAILS 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_i_pack_ins_tab | TYPE STANDARD TABLE OF RCBDUAPIPACK, " | |||
| lv_i_flg_in_update_task | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
| lt_i_carr_upd_tab | TYPE STANDARD TABLE OF RCBDUAPICARR, " | |||
| lt_i_carr_del_tab | TYPE STANDARD TABLE OF RCBDUAPICARR, " | |||
| lt_i_carr_old_tab | TYPE STANDARD TABLE OF RCBDUAPICARR, " | |||
| lt_i_trappr_ins_tab | TYPE STANDARD TABLE OF RCBDUAPITRAPPR, " | |||
| lt_i_trappr_upd_tab | TYPE STANDARD TABLE OF RCBDUAPITRAPPR, " | |||
| lt_i_trappr_del_tab | TYPE STANDARD TABLE OF RCBDUAPITRAPPR, " | |||
| lt_i_trappr_old_tab | TYPE STANDARD TABLE OF RCBDUAPITRAPPR, " | |||
| lt_i_dgrel_ins_tab | TYPE STANDARD TABLE OF RCBDUAPIDGRELAPPL, " | |||
| lt_i_dgrel_upd_tab | TYPE STANDARD TABLE OF RCBDUAPIDGRELAPPL, " | |||
| lt_i_dgrel_del_tab | TYPE STANDARD TABLE OF RCBDUAPIDGRELAPPL, " | |||
| lv_i_aennr | TYPE RCGRHBUF-AENNR, " | |||
| lt_i_pack_upd_tab | TYPE STANDARD TABLE OF RCBDUAPIPACK, " | |||
| lt_i_dgrel_old_tab | TYPE STANDARD TABLE OF RCBDUAPIDGRELAPPL, " | |||
| lv_i_valdat | TYPE RCGRHBUF-VALFR, " | |||
| lt_i_pack_del_tab | TYPE STANDARD TABLE OF RCBDUAPIPACK, " | |||
| lv_i_call_status | TYPE DGPD1_CALL_STATUS, " | |||
| lt_i_pack_old_tab | TYPE STANDARD TABLE OF RCBDUAPIPACK, " | |||
| lt_i_sprov_ins_tab | TYPE STANDARD TABLE OF RCBDUAPISP, " | |||
| lt_i_sprov_upd_tab | TYPE STANDARD TABLE OF RCBDUAPISP, " | |||
| lt_i_sprov_del_tab | TYPE STANDARD TABLE OF RCBDUAPISP, " | |||
| lt_i_sprov_old_tab | TYPE STANDARD TABLE OF RCBDUAPISP, " | |||
| lt_i_carr_ins_tab | TYPE STANDARD TABLE OF RCBDUAPICARR. " |
|   CALL FUNCTION 'DG1N_CHANGE_DOC_WRITE_DETAILS' "NOTRANSL: Schreiben der Änderungsbelege (DG Detail Tabellen) |
| EXPORTING | ||
| I_FLG_IN_UPDATE_TASK | = lv_i_flg_in_update_task | |
| I_AENNR | = lv_i_aennr | |
| I_VALDAT | = lv_i_valdat | |
| I_CALL_STATUS | = lv_i_call_status | |
| TABLES | ||
| I_PACK_INS_TAB | = lt_i_pack_ins_tab | |
| I_CARR_UPD_TAB | = lt_i_carr_upd_tab | |
| I_CARR_DEL_TAB | = lt_i_carr_del_tab | |
| I_CARR_OLD_TAB | = lt_i_carr_old_tab | |
| I_TRAPPR_INS_TAB | = lt_i_trappr_ins_tab | |
| I_TRAPPR_UPD_TAB | = lt_i_trappr_upd_tab | |
| I_TRAPPR_DEL_TAB | = lt_i_trappr_del_tab | |
| I_TRAPPR_OLD_TAB | = lt_i_trappr_old_tab | |
| I_DGREL_INS_TAB | = lt_i_dgrel_ins_tab | |
| I_DGREL_UPD_TAB | = lt_i_dgrel_upd_tab | |
| I_DGREL_DEL_TAB | = lt_i_dgrel_del_tab | |
| I_PACK_UPD_TAB | = lt_i_pack_upd_tab | |
| I_DGREL_OLD_TAB | = lt_i_dgrel_old_tab | |
| I_PACK_DEL_TAB | = lt_i_pack_del_tab | |
| I_PACK_OLD_TAB | = lt_i_pack_old_tab | |
| I_SPROV_INS_TAB | = lt_i_sprov_ins_tab | |
| I_SPROV_UPD_TAB | = lt_i_sprov_upd_tab | |
| I_SPROV_DEL_TAB | = lt_i_sprov_del_tab | |
| I_SPROV_OLD_TAB | = lt_i_sprov_old_tab | |
| I_CARR_INS_TAB | = lt_i_carr_ins_tab | |
| . " DG1N_CHANGE_DOC_WRITE_DETAILS | ||
ABAP code using 7.40 inline data declarations to call FM DG1N_CHANGE_DOC_WRITE_DETAILS
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.| DATA(ld_i_flg_in_update_task) | = ESP1_FALSE. | |||
| "SELECT single AENNR FROM RCGRHBUF INTO @DATA(ld_i_aennr). | ||||
| "SELECT single VALFR FROM RCGRHBUF INTO @DATA(ld_i_valdat). | ||||
Search for further information about these or an SAP related objects