SAP BAPI_MATERIAL_BOM_GROUP_CREATE Function Module for Creation of a Material BOM Group









BAPI_MATERIAL_BOM_GROUP_CREATE is a standard bapi material bom group 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 Creation of a Material BOM Group 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 bapi material bom group create FM, simply by entering the name BAPI_MATERIAL_BOM_GROUP_CREATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: CPCC_BUS1080
Program Name: SAPLCPCC_BUS1080
Main Program: SAPLCPCC_BUS1080
Appliation area:
Release date: 04-Feb-2000
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_MATERIAL_BOM_GROUP_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 'BAPI_MATERIAL_BOM_GROUP_CREATE'"Creation of a Material BOM Group
EXPORTING
* TESTRUN = ' ' "Switch to Simulation Session for Write BAPIs
* ALL_ERROR = ' ' "Output All Errors

TABLES
BOMGROUP = "BOM group CREATE-/CHANGE BAPI material BOM
VARIANTS = "Alternative/Variant CREATE-/CHANGE BAPI Material BOM
* ITEMS = "Components CREATE-/CHANGE BAPI Material BOM
* SUBITEMS = "Sub item CREATE-/CHANGE BAPI Material BOM
MATERIALRELATIONS = "Material assignment CREATE-/CHANGE BAPI Material BOM
* ITEMASSIGNMENTS = "Assignments CREATE-/CHANGE BAPI ITM/BOM material BOMs
* SUBITEMASSIGNMENTS = "Assignments CREATE-/CHANGE BAPI SUI/ITM Mat.BOMs
* TEXTS = "Long text line: CREATE-/CHANGE BAPI for material BOMs
RETURN = "Return parameter
.



IMPORTING Parameters details for BAPI_MATERIAL_BOM_GROUP_CREATE

TESTRUN - Switch to Simulation Session for Write BAPIs

Data type: BAPIFLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ALL_ERROR - Output All Errors

Data type: XFLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for BAPI_MATERIAL_BOM_GROUP_CREATE

BOMGROUP - BOM group CREATE-/CHANGE BAPI material BOM

Data type: BAPI1080_BGR_C
Optional: No
Call by Reference: Yes

VARIANTS - Alternative/Variant CREATE-/CHANGE BAPI Material BOM

Data type: BAPI1080_BOM_C
Optional: No
Call by Reference: Yes

ITEMS - Components CREATE-/CHANGE BAPI Material BOM

Data type: BAPI1080_ITM_C
Optional: Yes
Call by Reference: Yes

SUBITEMS - Sub item CREATE-/CHANGE BAPI Material BOM

Data type: BAPI1080_SUI_C
Optional: Yes
Call by Reference: Yes

MATERIALRELATIONS - Material assignment CREATE-/CHANGE BAPI Material BOM

Data type: BAPI1080_MBM_C
Optional: No
Call by Reference: Yes

ITEMASSIGNMENTS - Assignments CREATE-/CHANGE BAPI ITM/BOM material BOMs

Data type: BAPI1080_REL_ITM_BOM_C
Optional: Yes
Call by Reference: Yes

SUBITEMASSIGNMENTS - Assignments CREATE-/CHANGE BAPI SUI/ITM Mat.BOMs

Data type: BAPI1080_REL_SUI_ITM_C
Optional: Yes
Call by Reference: Yes

TEXTS - Long text line: CREATE-/CHANGE BAPI for material BOMs

Data type: BAPI1080_TXT_C
Optional: Yes
Call by Reference: Yes

RETURN - Return parameter

Data type: BAPIRET2
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for BAPI_MATERIAL_BOM_GROUP_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:
lv_testrun  TYPE BAPIFLAG, "   SPACE
lt_bomgroup  TYPE STANDARD TABLE OF BAPI1080_BGR_C, "   
lt_variants  TYPE STANDARD TABLE OF BAPI1080_BOM_C, "   
lv_all_error  TYPE XFLAG, "   SPACE
lt_items  TYPE STANDARD TABLE OF BAPI1080_ITM_C, "   
lt_subitems  TYPE STANDARD TABLE OF BAPI1080_SUI_C, "   
lt_materialrelations  TYPE STANDARD TABLE OF BAPI1080_MBM_C, "   
lt_itemassignments  TYPE STANDARD TABLE OF BAPI1080_REL_ITM_BOM_C, "   
lt_subitemassignments  TYPE STANDARD TABLE OF BAPI1080_REL_SUI_ITM_C, "   
lt_texts  TYPE STANDARD TABLE OF BAPI1080_TXT_C, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2. "   

  CALL FUNCTION 'BAPI_MATERIAL_BOM_GROUP_CREATE'  "Creation of a Material BOM Group
    EXPORTING
         TESTRUN = lv_testrun
         ALL_ERROR = lv_all_error
    TABLES
         BOMGROUP = lt_bomgroup
         VARIANTS = lt_variants
         ITEMS = lt_items
         SUBITEMS = lt_subitems
         MATERIALRELATIONS = lt_materialrelations
         ITEMASSIGNMENTS = lt_itemassignments
         SUBITEMASSIGNMENTS = lt_subitemassignments
         TEXTS = lt_texts
         RETURN = lt_return
. " BAPI_MATERIAL_BOM_GROUP_CREATE




ABAP code using 7.40 inline data declarations to call FM BAPI_MATERIAL_BOM_GROUP_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.

DATA(ld_testrun) = ' '.
 
 
 
DATA(ld_all_error) = ' '.
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!