SAP SD_ADD_ITEMS_FROM_DLI Function Module for NOTRANSL: Position zu einem Dynamischen Beleg hinzufügen
SD_ADD_ITEMS_FROM_DLI is a standard sd add items from dli 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: Position zu einem Dynamischen Beleg hinzufügen 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 add items from dli FM, simply by entering the name SD_ADD_ITEMS_FROM_DLI into the relevant SAP transaction such as SE37 or SE38.
Function Group: V46H
Program Name: SAPLV46H
Main Program: SAPLV46H
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SD_ADD_ITEMS_FROM_DLI 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_ADD_ITEMS_FROM_DLI'"NOTRANSL: Position zu einem Dynamischen Beleg hinzufügen.
EXPORTING
* I_SDSM_MAIN_ITEM = "
* I_XKONV_DETERMINE = ' ' "
* I_AGFLG = ' ' "Creating a quotation
* I_AGEXI = ' ' "Quotation exists
IMPORTING
E_SDSM_MAIN_ITEM = "
TABLES
* FVBPAKOM = "Communication Fields for Maintaining Partners in Doc.Header
* FSDSM_DLI = "Table with Item Information
* FXKONV = "Conditions (Transaction Data)
* FKOMK = "Communication Header for Pricing
* FKOMP = "Communication Item for Pricing
* FSDSM_MAIN_ITEM = "Main Item for Generating Sales Documents from Dynamic Items
EXCEPTIONS
NO_DOCUMENT_IN_BUFFER = 1 INCONSISTENT_IMPORT_PARAMETERS = 2 ERROR_OCCURRED = 3
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLV46H_001 Customer Function When Creating Item
EXIT_SAPLV46H_002 Customer Function for Partner Changes
IMPORTING Parameters details for SD_ADD_ITEMS_FROM_DLI
I_SDSM_MAIN_ITEM -
Data type: SDSM_MAIN_ITEMOptional: Yes
Call by Reference: No ( called with pass by value option)
I_XKONV_DETERMINE -
Data type: BOOLE_DDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_AGFLG - Creating a quotation
Data type: AGFLGDefault: SPACE
Optional: Yes
Call by Reference: Yes
I_AGEXI - Quotation exists
Data type: AGEXIDefault: SPACE
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for SD_ADD_ITEMS_FROM_DLI
E_SDSM_MAIN_ITEM -
Data type: SDSM_MAIN_ITEMOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SD_ADD_ITEMS_FROM_DLI
FVBPAKOM - Communication Fields for Maintaining Partners in Doc.Header
Data type: VBPAKOMOptional: Yes
Call by Reference: Yes
FSDSM_DLI - Table with Item Information
Data type: SDSM_DLIOptional: Yes
Call by Reference: Yes
FXKONV - Conditions (Transaction Data)
Data type: KONVOptional: Yes
Call by Reference: Yes
FKOMK - Communication Header for Pricing
Data type: KOMKOptional: Yes
Call by Reference: Yes
FKOMP - Communication Item for Pricing
Data type: KOMPOptional: Yes
Call by Reference: Yes
FSDSM_MAIN_ITEM - Main Item for Generating Sales Documents from Dynamic Items
Data type: SDSM_MAIN_ITEMOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_DOCUMENT_IN_BUFFER -
Data type:Optional: No
Call by Reference: Yes
INCONSISTENT_IMPORT_PARAMETERS -
Data type:Optional: No
Call by Reference: Yes
ERROR_OCCURRED - An error occurred during creation
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for SD_ADD_ITEMS_FROM_DLI 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_fvbpakom | TYPE STANDARD TABLE OF VBPAKOM, " | |||
| lv_e_sdsm_main_item | TYPE SDSM_MAIN_ITEM, " | |||
| lv_i_sdsm_main_item | TYPE SDSM_MAIN_ITEM, " | |||
| lv_no_document_in_buffer | TYPE SDSM_MAIN_ITEM, " | |||
| lt_fsdsm_dli | TYPE STANDARD TABLE OF SDSM_DLI, " | |||
| lv_i_xkonv_determine | TYPE BOOLE_D, " SPACE | |||
| lv_inconsistent_import_parameters | TYPE BOOLE_D, " | |||
| lt_fxkonv | TYPE STANDARD TABLE OF KONV, " | |||
| lv_i_agflg | TYPE AGFLG, " SPACE | |||
| lv_error_occurred | TYPE AGFLG, " | |||
| lt_fkomk | TYPE STANDARD TABLE OF KOMK, " | |||
| lv_i_agexi | TYPE AGEXI, " SPACE | |||
| lt_fkomp | TYPE STANDARD TABLE OF KOMP, " | |||
| lt_fsdsm_main_item | TYPE STANDARD TABLE OF SDSM_MAIN_ITEM. " |
|   CALL FUNCTION 'SD_ADD_ITEMS_FROM_DLI' "NOTRANSL: Position zu einem Dynamischen Beleg hinzufügen |
| EXPORTING | ||
| I_SDSM_MAIN_ITEM | = lv_i_sdsm_main_item | |
| I_XKONV_DETERMINE | = lv_i_xkonv_determine | |
| I_AGFLG | = lv_i_agflg | |
| I_AGEXI | = lv_i_agexi | |
| IMPORTING | ||
| E_SDSM_MAIN_ITEM | = lv_e_sdsm_main_item | |
| TABLES | ||
| FVBPAKOM | = lt_fvbpakom | |
| FSDSM_DLI | = lt_fsdsm_dli | |
| FXKONV | = lt_fxkonv | |
| FKOMK | = lt_fkomk | |
| FKOMP | = lt_fkomp | |
| FSDSM_MAIN_ITEM | = lt_fsdsm_main_item | |
| EXCEPTIONS | ||
| NO_DOCUMENT_IN_BUFFER = 1 | ||
| INCONSISTENT_IMPORT_PARAMETERS = 2 | ||
| ERROR_OCCURRED = 3 | ||
| . " SD_ADD_ITEMS_FROM_DLI | ||
ABAP code using 7.40 inline data declarations to call FM SD_ADD_ITEMS_FROM_DLI
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_xkonv_determine) | = ' '. | |||
| DATA(ld_i_agflg) | = ' '. | |||
| DATA(ld_i_agexi) | = ' '. | |||
Search for further information about these or an SAP related objects