SAP EASYDMS70_DOC_BOM_CREATE Function Module for Create Document Structure
EASYDMS70_DOC_BOM_CREATE is a standard easydms70 doc bom create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create Document Structure 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 easydms70 doc bom create FM, simply by entering the name EASYDMS70_DOC_BOM_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: EASYDMS70
Program Name: SAPLEASYDMS70
Main Program: SAPLEASYDMS70
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function EASYDMS70_DOC_BOM_CREATE 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 'EASYDMS70_DOC_BOM_CREATE'"Create Document Structure.
EXPORTING
DOCUMENT = "Document number
* FL_COMMIT_AND_WAIT = ' ' "Commit work and wait
* FL_CAD = ' ' "Single-Character Flag
* FL_DEFAULT_VALUES = 'X' "Checkbox
* FL_RECURSIVE = ' ' "Checkbox
DOC_TYPE = "Document Type
* DOC_PART = "Document part
* DOC_VERS = "Document version
* VALID_FROM = "Valid-From Date (BTCI)
* CHANGE_NO = "Change Number
* REVISION_LEVEL = "Revision level
I_STKO = "API BOM Header Structure: Fields that can be Changed
* FL_NO_CHANGE_DOC = ' ' "Switch off change documents
IMPORTING
FL_WARNING = "API log contains warning messages
ES_RETURN = "Return Parameter
TABLES
T_STPO = "BOM items
T_LTX_LINE = "Stücklisten- und Positionslangtexte
IMPORTING Parameters details for EASYDMS70_DOC_BOM_CREATE
DOCUMENT - Document number
Data type: CSAP_DBOM-DOKNROptional: No
Call by Reference: No ( called with pass by value option)
FL_COMMIT_AND_WAIT - Commit work and wait
Data type: CAPIFLAG-COMM_WAITDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FL_CAD - Single-Character Flag
Data type: CSDATA-CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FL_DEFAULT_VALUES - Checkbox
Data type: CSDATA-XFELDDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
FL_RECURSIVE - Checkbox
Data type: CSDATA-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DOC_TYPE - Document Type
Data type: CSAP_DBOM-DOKAROptional: No
Call by Reference: No ( called with pass by value option)
DOC_PART - Document part
Data type: CSAP_DBOM-DOKTLOptional: Yes
Call by Reference: No ( called with pass by value option)
DOC_VERS - Document version
Data type: CSAP_DBOM-DOKVROptional: Yes
Call by Reference: No ( called with pass by value option)
VALID_FROM - Valid-From Date (BTCI)
Data type: CSAP_DBOM-DATUVOptional: Yes
Call by Reference: No ( called with pass by value option)
CHANGE_NO - Change Number
Data type: CSAP_DBOM-AENNROptional: Yes
Call by Reference: No ( called with pass by value option)
REVISION_LEVEL - Revision level
Data type: CSAP_DBOM-REVLVOptional: Yes
Call by Reference: No ( called with pass by value option)
I_STKO - API BOM Header Structure: Fields that can be Changed
Data type: STKO_API01Optional: No
Call by Reference: No ( called with pass by value option)
FL_NO_CHANGE_DOC - Switch off change documents
Data type: CAPIFLAG-NO_CHG_DOCDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for EASYDMS70_DOC_BOM_CREATE
FL_WARNING - API log contains warning messages
Data type: CAPIFLAG-FLWARNINGOptional: No
Call by Reference: No ( called with pass by value option)
ES_RETURN - Return Parameter
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for EASYDMS70_DOC_BOM_CREATE
T_STPO - BOM items
Data type: STPO_API01Optional: No
Call by Reference: Yes
T_LTX_LINE - Stücklisten- und Positionslangtexte
Data type: CSLTX_LINEOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for EASYDMS70_DOC_BOM_CREATE 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_t_stpo | TYPE STANDARD TABLE OF STPO_API01, " | |||
| lv_document | TYPE CSAP_DBOM-DOKNR, " | |||
| lv_fl_warning | TYPE CAPIFLAG-FLWARNING, " | |||
| lv_fl_commit_and_wait | TYPE CAPIFLAG-COMM_WAIT, " SPACE | |||
| lv_fl_cad | TYPE CSDATA-CHAR1, " SPACE | |||
| lv_fl_default_values | TYPE CSDATA-XFELD, " 'X' | |||
| lv_fl_recursive | TYPE CSDATA-XFELD, " SPACE | |||
| lv_doc_type | TYPE CSAP_DBOM-DOKAR, " | |||
| lv_es_return | TYPE BAPIRET2, " | |||
| lt_t_ltx_line | TYPE STANDARD TABLE OF CSLTX_LINE, " | |||
| lv_doc_part | TYPE CSAP_DBOM-DOKTL, " | |||
| lv_doc_vers | TYPE CSAP_DBOM-DOKVR, " | |||
| lv_valid_from | TYPE CSAP_DBOM-DATUV, " | |||
| lv_change_no | TYPE CSAP_DBOM-AENNR, " | |||
| lv_revision_level | TYPE CSAP_DBOM-REVLV, " | |||
| lv_i_stko | TYPE STKO_API01, " | |||
| lv_fl_no_change_doc | TYPE CAPIFLAG-NO_CHG_DOC. " SPACE |
|   CALL FUNCTION 'EASYDMS70_DOC_BOM_CREATE' "Create Document Structure |
| EXPORTING | ||
| DOCUMENT | = lv_document | |
| FL_COMMIT_AND_WAIT | = lv_fl_commit_and_wait | |
| FL_CAD | = lv_fl_cad | |
| FL_DEFAULT_VALUES | = lv_fl_default_values | |
| FL_RECURSIVE | = lv_fl_recursive | |
| DOC_TYPE | = lv_doc_type | |
| DOC_PART | = lv_doc_part | |
| DOC_VERS | = lv_doc_vers | |
| VALID_FROM | = lv_valid_from | |
| CHANGE_NO | = lv_change_no | |
| REVISION_LEVEL | = lv_revision_level | |
| I_STKO | = lv_i_stko | |
| FL_NO_CHANGE_DOC | = lv_fl_no_change_doc | |
| IMPORTING | ||
| FL_WARNING | = lv_fl_warning | |
| ES_RETURN | = lv_es_return | |
| TABLES | ||
| T_STPO | = lt_t_stpo | |
| T_LTX_LINE | = lt_t_ltx_line | |
| . " EASYDMS70_DOC_BOM_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM EASYDMS70_DOC_BOM_CREATE
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 DOKNR FROM CSAP_DBOM INTO @DATA(ld_document). | ||||
| "SELECT single FLWARNING FROM CAPIFLAG INTO @DATA(ld_fl_warning). | ||||
| "SELECT single COMM_WAIT FROM CAPIFLAG INTO @DATA(ld_fl_commit_and_wait). | ||||
| DATA(ld_fl_commit_and_wait) | = ' '. | |||
| "SELECT single CHAR1 FROM CSDATA INTO @DATA(ld_fl_cad). | ||||
| DATA(ld_fl_cad) | = ' '. | |||
| "SELECT single XFELD FROM CSDATA INTO @DATA(ld_fl_default_values). | ||||
| DATA(ld_fl_default_values) | = 'X'. | |||
| "SELECT single XFELD FROM CSDATA INTO @DATA(ld_fl_recursive). | ||||
| DATA(ld_fl_recursive) | = ' '. | |||
| "SELECT single DOKAR FROM CSAP_DBOM INTO @DATA(ld_doc_type). | ||||
| "SELECT single DOKTL FROM CSAP_DBOM INTO @DATA(ld_doc_part). | ||||
| "SELECT single DOKVR FROM CSAP_DBOM INTO @DATA(ld_doc_vers). | ||||
| "SELECT single DATUV FROM CSAP_DBOM INTO @DATA(ld_valid_from). | ||||
| "SELECT single AENNR FROM CSAP_DBOM INTO @DATA(ld_change_no). | ||||
| "SELECT single REVLV FROM CSAP_DBOM INTO @DATA(ld_revision_level). | ||||
| "SELECT single NO_CHG_DOC FROM CAPIFLAG INTO @DATA(ld_fl_no_change_doc). | ||||
| DATA(ld_fl_no_change_doc) | = ' '. | |||
Search for further information about these or an SAP related objects