SAP Tables

BAPI_MATERIAL_BOM_GROUP_CREATE SAP Function module - Creation of a Material BOM Group




BAPI_MATERIAL_BOM_GROUP_CREATEis a standard SAP function module available within R/3 SAPsystems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import/export parameters, exceptions etc as well as any documentation contributions specific to the object. See here to view full function module documentation and code listing, simply by entering the name BAPI_MATERIAL_BOM_GROUP_CREATE into the relevant SAP transaction such as SE37 or SE80.

Contribute (Add Comments)
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BAPI_MATERIAL_BOM_GROUP_CREATE or its description.


Pattern for FM BAPI_MATERIAL_BOM_GROUP_CREATE - BAPI MATERIAL BOM GROUP CREATE
Associated Function Group: CPCC_BUS1080
Released Date: 04.02.2000
CALL FUNCTION 'BAPI_MATERIAL_BOM_GROUP_CREATE' "Creation of a Material BOM Group
* EXPORTING
*   testrun = SPACE             " bapiflag      Switch to Simulation Session for Write BAPIs
*   all_error = SPACE           " xflag         Output All Errors
  TABLES
    bomgroup =                  " bapi1080_bgr_c  BOM group CREATE-/CHANGE BAPI material BOM
    variants =                  " bapi1080_bom_c  Alternative/Variant CREATE-/CHANGE BAPI Material BOM
*   items =                     " bapi1080_itm_c  Components CREATE-/CHANGE BAPI Material BOM
*   subitems =                  " bapi1080_sui_c  Sub item CREATE-/CHANGE BAPI Material BOM
    materialrelations =         " bapi1080_mbm_c  Material assignment CREATE-/CHANGE BAPI Material BOM
*   itemassignments =           " bapi1080_rel_itm_bom_c  Assignments CREATE-/CHANGE BAPI ITM/BOM material BOMs
*   subitemassignments =        " bapi1080_rel_sui_itm_c  Assignments CREATE-/CHANGE BAPI SUI/ITM Mat.BOMs
*   texts =                     " bapi1080_txt_c  Long text line: CREATE-/CHANGE BAPI for material BOMs
    return =                    " bapiret2      Return parameter
    .  "  BAPI_MATERIAL_BOM_GROUP_CREATE

ABAP code example for Function Module BAPI_MATERIAL_BOM_GROUP_CREATE

The ABAP code below is a full code listing to execute function module BAPI_MATERIAL_BOM_GROUP_CREATE including all data declarations. The code uses the latest in-line data declaration syntax but I have included an abap code snipet at the end to show how declarations would look using the original method of declaring data variables up front. 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).
DATA:
it_bomgroup   TYPE STANDARD TABLE OF BAPI1080_BGR_C,"tables param
wa_bomgroup LIKE LINE OF it_bomgroup  ,
it_variants   TYPE STANDARD TABLE OF BAPI1080_BOM_C,"tables param
wa_variants LIKE LINE OF it_variants  ,
it_items   TYPE STANDARD TABLE OF BAPI1080_ITM_C,"tables param
wa_items LIKE LINE OF it_items  ,
it_subitems   TYPE STANDARD TABLE OF BAPI1080_SUI_C,"tables param
wa_subitems LIKE LINE OF it_subitems  ,
it_materialrelations   TYPE STANDARD TABLE OF BAPI1080_MBM_C,"tables param
wa_materialrelations LIKE LINE OF it_materialrelations  ,
it_itemassignments   TYPE STANDARD TABLE OF BAPI1080_REL_ITM_BOM_C,"tables param
wa_itemassignments LIKE LINE OF it_itemassignments  ,
it_subitemassignments   TYPE STANDARD TABLE OF BAPI1080_REL_SUI_ITM_C,"tables param
wa_subitemassignments LIKE LINE OF it_subitemassignments  ,
it_texts   TYPE STANDARD TABLE OF BAPI1080_TXT_C,"tables param
wa_texts LIKE LINE OF it_texts  ,
it_return   TYPE STANDARD TABLE OF BAPIRET2,"tables param
wa_return LIKE LINE OF it_return  .

DATA(ld_testrun) = 'Check type of data required'.
DATA(ld_all_error) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_bomgroup to it_bomgroup.

"populate fields of struture and append to itab
append wa_variants to it_variants.

"populate fields of struture and append to itab
append wa_items to it_items.

"populate fields of struture and append to itab
append wa_subitems to it_subitems.

"populate fields of struture and append to itab
append wa_materialrelations to it_materialrelations.

"populate fields of struture and append to itab
append wa_itemassignments to it_itemassignments.

"populate fields of struture and append to itab
append wa_subitemassignments to it_subitemassignments.

"populate fields of struture and append to itab
append wa_texts to it_texts.

"populate fields of struture and append to itab
append wa_return to it_return.. CALL FUNCTION 'BAPI_MATERIAL_BOM_GROUP_CREATE' * EXPORTING * testrun = ld_testrun * all_error = ld_all_error TABLES bomgroup = it_bomgroup variants = it_variants * items = it_items * subitems = it_subitems materialrelations = it_materialrelations * itemassignments = it_itemassignments * subitemassignments = it_subitemassignments * texts = it_texts return = it_return . " BAPI_MATERIAL_BOM_GROUP_CREATE
IF SY-SUBRC EQ 0.   "All OK ENDIF.

ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
ld_testrun TYPE BAPIFLAG ,
it_bomgroup TYPE STANDARD TABLE OF BAPI1080_BGR_C ,
wa_bomgroup LIKE LINE OF it_bomgroup,
ld_all_error TYPE XFLAG ,
it_variants TYPE STANDARD TABLE OF BAPI1080_BOM_C ,
wa_variants LIKE LINE OF it_variants,
it_items TYPE STANDARD TABLE OF BAPI1080_ITM_C ,
wa_items LIKE LINE OF it_items,
it_subitems TYPE STANDARD TABLE OF BAPI1080_SUI_C ,
wa_subitems LIKE LINE OF it_subitems,
it_materialrelations TYPE STANDARD TABLE OF BAPI1080_MBM_C ,
wa_materialrelations LIKE LINE OF it_materialrelations,
it_itemassignments TYPE STANDARD TABLE OF BAPI1080_REL_ITM_BOM_C ,
wa_itemassignments LIKE LINE OF it_itemassignments,
it_subitemassignments TYPE STANDARD TABLE OF BAPI1080_REL_SUI_ITM_C ,
wa_subitemassignments LIKE LINE OF it_subitemassignments,
it_texts TYPE STANDARD TABLE OF BAPI1080_TXT_C ,
wa_texts LIKE LINE OF it_texts,
it_return TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return LIKE LINE OF it_return.

ld_testrun = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_bomgroup to it_bomgroup.
ld_all_error = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_variants to it_variants.

"populate fields of struture and append to itab
append wa_items to it_items.

"populate fields of struture and append to itab
append wa_subitems to it_subitems.

"populate fields of struture and append to itab
append wa_materialrelations to it_materialrelations.

"populate fields of struture and append to itab
append wa_itemassignments to it_itemassignments.

"populate fields of struture and append to itab
append wa_subitemassignments to it_subitemassignments.

"populate fields of struture and append to itab
append wa_texts to it_texts.

"populate fields of struture and append to itab
append wa_return to it_return..

SAP Documentation for FM BAPI_MATERIAL_BOM_GROUP_CREATE


In extreme case, the entire BOM group can be transferred, that means
  • All variants of a variant BOM or alternatives of a multiple BOM ...See here for full SAP fm documentation