SAP MASTER_IDOC_CREATE_BOMDOC Function Module for NOTRANSL: ALE Ausgangsverarbeitung Dokumentstückliste
MASTER_IDOC_CREATE_BOMDOC is a standard master idoc create bomdoc 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: ALE Ausgangsverarbeitung Dokumentstückliste 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 master idoc create bomdoc FM, simply by entering the name MASTER_IDOC_CREATE_BOMDOC into the relevant SAP transaction such as SE37 or SE38.
Function Group: CSDS
Program Name: SAPLCSDS
Main Program: SAPLCSDS
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MASTER_IDOC_CREATE_BOMDOC 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 'MASTER_IDOC_CREATE_BOMDOC'"NOTRANSL: ALE Ausgangsverarbeitung Dokumentstückliste.
EXPORTING
DOC_NUMBER = "Document number
* DLOCK_IGNORE = ' ' "Ignore Distribution Lock
* SMD_TOOL = ' ' "
* MESSAGE_TYPE = C_MESTYP_BOMDOC "Message Type
DOC_TYPE = "Document type
* DOC_PART = "Document part
* DOC_VERSION = "Document version
* DATUV = SY-DATUM "Valid-from date (local)
* ALE_DATUV = "Valid-from date for target system
* ALE_AENNR = "Change number for target system
* RCVPRN = "Target system
* MESCOD = "Message Variant
IMPORTING
CREATED_COMM_IDOCS = "Number of Generated IDocs
TABLES
* EX_COMMIDOC_CTRL = "Control Record (IDoc)
EXCEPTIONS
GENERAL_BOM_FAILURE = 1 NO_BOM_FOUND = 2 GENERAL_ALE_FAILURE = 3 DISTRIBUTION_LOCK = 4 CUSTOMER_ERROR = 5
IMPORTING Parameters details for MASTER_IDOC_CREATE_BOMDOC
DOC_NUMBER - Document number
Data type: DOST-DOKNROptional: No
Call by Reference: No ( called with pass by value option)
DLOCK_IGNORE - Ignore Distribution Lock
Data type: MCDOK-DLOCK_IGNOREDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SMD_TOOL -
Data type: CHAR0001Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MESSAGE_TYPE - Message Type
Data type: TBDME-MESTYPDefault: C_MESTYP_BOMDOC
Optional: Yes
Call by Reference: No ( called with pass by value option)
DOC_TYPE - Document type
Data type: DOST-DOKAROptional: No
Call by Reference: No ( called with pass by value option)
DOC_PART - Document part
Data type: DOST-DOKTLOptional: Yes
Call by Reference: No ( called with pass by value option)
DOC_VERSION - Document version
Data type: DOST-DOKVROptional: Yes
Call by Reference: No ( called with pass by value option)
DATUV - Valid-from date (local)
Data type: STKOB-DATUVDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
ALE_DATUV - Valid-from date for target system
Data type: STKOB-DATUVOptional: Yes
Call by Reference: No ( called with pass by value option)
ALE_AENNR - Change number for target system
Data type: AENR-AENNROptional: Yes
Call by Reference: No ( called with pass by value option)
RCVPRN - Target system
Data type: BDALEDC-RCVPRNOptional: Yes
Call by Reference: No ( called with pass by value option)
MESCOD - Message Variant
Data type: EDIDC-MESCODOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MASTER_IDOC_CREATE_BOMDOC
CREATED_COMM_IDOCS - Number of Generated IDocs
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MASTER_IDOC_CREATE_BOMDOC
EX_COMMIDOC_CTRL - Control Record (IDoc)
Data type: EDIDCOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
GENERAL_BOM_FAILURE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_BOM_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
GENERAL_ALE_FAILURE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DISTRIBUTION_LOCK -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CUSTOMER_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for MASTER_IDOC_CREATE_BOMDOC 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_doc_number | TYPE DOST-DOKNR, " | |||
| lt_ex_commidoc_ctrl | TYPE STANDARD TABLE OF EDIDC, " | |||
| lv_created_comm_idocs | TYPE SY-TABIX, " | |||
| lv_general_bom_failure | TYPE SY, " | |||
| lv_dlock_ignore | TYPE MCDOK-DLOCK_IGNORE, " SPACE | |||
| lv_smd_tool | TYPE CHAR0001, " SPACE | |||
| lv_message_type | TYPE TBDME-MESTYP, " C_MESTYP_BOMDOC | |||
| lv_doc_type | TYPE DOST-DOKAR, " | |||
| lv_no_bom_found | TYPE DOST, " | |||
| lv_doc_part | TYPE DOST-DOKTL, " | |||
| lv_general_ale_failure | TYPE DOST, " | |||
| lv_doc_version | TYPE DOST-DOKVR, " | |||
| lv_distribution_lock | TYPE DOST, " | |||
| lv_datuv | TYPE STKOB-DATUV, " SY-DATUM | |||
| lv_customer_error | TYPE STKOB, " | |||
| lv_ale_datuv | TYPE STKOB-DATUV, " | |||
| lv_ale_aennr | TYPE AENR-AENNR, " | |||
| lv_rcvprn | TYPE BDALEDC-RCVPRN, " | |||
| lv_mescod | TYPE EDIDC-MESCOD. " |
|   CALL FUNCTION 'MASTER_IDOC_CREATE_BOMDOC' "NOTRANSL: ALE Ausgangsverarbeitung Dokumentstückliste |
| EXPORTING | ||
| DOC_NUMBER | = lv_doc_number | |
| DLOCK_IGNORE | = lv_dlock_ignore | |
| SMD_TOOL | = lv_smd_tool | |
| MESSAGE_TYPE | = lv_message_type | |
| DOC_TYPE | = lv_doc_type | |
| DOC_PART | = lv_doc_part | |
| DOC_VERSION | = lv_doc_version | |
| DATUV | = lv_datuv | |
| ALE_DATUV | = lv_ale_datuv | |
| ALE_AENNR | = lv_ale_aennr | |
| RCVPRN | = lv_rcvprn | |
| MESCOD | = lv_mescod | |
| IMPORTING | ||
| CREATED_COMM_IDOCS | = lv_created_comm_idocs | |
| TABLES | ||
| EX_COMMIDOC_CTRL | = lt_ex_commidoc_ctrl | |
| EXCEPTIONS | ||
| GENERAL_BOM_FAILURE = 1 | ||
| NO_BOM_FOUND = 2 | ||
| GENERAL_ALE_FAILURE = 3 | ||
| DISTRIBUTION_LOCK = 4 | ||
| CUSTOMER_ERROR = 5 | ||
| . " MASTER_IDOC_CREATE_BOMDOC | ||
ABAP code using 7.40 inline data declarations to call FM MASTER_IDOC_CREATE_BOMDOC
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 DOST INTO @DATA(ld_doc_number). | ||||
| "SELECT single TABIX FROM SY INTO @DATA(ld_created_comm_idocs). | ||||
| "SELECT single DLOCK_IGNORE FROM MCDOK INTO @DATA(ld_dlock_ignore). | ||||
| DATA(ld_dlock_ignore) | = ' '. | |||
| DATA(ld_smd_tool) | = ' '. | |||
| "SELECT single MESTYP FROM TBDME INTO @DATA(ld_message_type). | ||||
| DATA(ld_message_type) | = C_MESTYP_BOMDOC. | |||
| "SELECT single DOKAR FROM DOST INTO @DATA(ld_doc_type). | ||||
| "SELECT single DOKTL FROM DOST INTO @DATA(ld_doc_part). | ||||
| "SELECT single DOKVR FROM DOST INTO @DATA(ld_doc_version). | ||||
| "SELECT single DATUV FROM STKOB INTO @DATA(ld_datuv). | ||||
| DATA(ld_datuv) | = SY-DATUM. | |||
| "SELECT single DATUV FROM STKOB INTO @DATA(ld_ale_datuv). | ||||
| "SELECT single AENNR FROM AENR INTO @DATA(ld_ale_aennr). | ||||
| "SELECT single RCVPRN FROM BDALEDC INTO @DATA(ld_rcvprn). | ||||
| "SELECT single MESCOD FROM EDIDC INTO @DATA(ld_mescod). | ||||
Search for further information about these or an SAP related objects