SAP Function Modules

BOM_INSTALL SAP Function module







BOM_INSTALL is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name BOM_INSTALL into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: IPW5
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM BOM_INSTALL - BOM INSTALL





CALL FUNCTION 'BOM_INSTALL' "
  EXPORTING
    iv_simulation =             " char1
*   iv_no_gm = SPACE            " xfeld         No Material Movement
*   iv_no_check = SPACE         " xfeld
    iv_matnr =                  " matnr         Material Number
*   iv_funcid =                 " ccm_funcid    FID (Function Identifier)
    iv_quant =                  " erfmg         Quantity in Unit of Entry
    iv_qunit =                  " erfme         Unit of Entry
    iv_hequi =                  " hequi         Superordinate Equipment
    iv_hplnt =                  " werks_d
    iv_bomus =                  " stlan         BOM Usage
  IMPORTING
    es_bom_item =               " stpob
* CHANGING
*   cs_ipw4_com =               " ipw4_com      Commun. Structure for Equipment Install/Dismantle Trans.
*   ct_loghndl =                " bal_t_logh    Application Log: Log Handle Table
*   cs_goodsmvt_header =        " bapi2017_gm_head_01
*   cs_goodsmvt_item =          " bapi2017_gm_item_create
*   cs_goodsmvt_code =          " bapi2017_gm_code  MMIM: New Key Assignment GM_CODE to Transaction of Inv. Mgmt
*   cs_hequi =                  " v_equi
  EXCEPTIONS
    MAT_NOTFOUND = 1            "
    LOG_ERROR = 2               "
    BOM_UPD_ERROR = 3           "
    LOCK_ERROR = 4              "
    CHK_ERROR_INST = 5          "
    .  "  BOM_INSTALL

ABAP code example for Function Module BOM_INSTALL





The ABAP code below is a full code listing to execute function module BOM_INSTALL including all data declarations. The code uses 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 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:
ld_es_bom_item  TYPE STPOB .

DATA(ld_cs_ipw4_com) = 'Check type of data required'.
DATA(ld_ct_loghndl) = 'Check type of data required'.
DATA(ld_cs_goodsmvt_header) = 'Check type of data required'.
DATA(ld_cs_goodsmvt_item) = 'Check type of data required'.
DATA(ld_cs_goodsmvt_code) = 'Check type of data required'.
DATA(ld_cs_hequi) = 'Check type of data required'.
DATA(ld_iv_simulation) = 'Check type of data required'.
DATA(ld_iv_no_gm) = 'Check type of data required'.
DATA(ld_iv_no_check) = 'Check type of data required'.
DATA(ld_iv_matnr) = 'Check type of data required'.
DATA(ld_iv_funcid) = 'Check type of data required'.
DATA(ld_iv_quant) = 'Check type of data required'.
DATA(ld_iv_qunit) = 'Check type of data required'.
DATA(ld_iv_hequi) = 'Check type of data required'.
DATA(ld_iv_hplnt) = 'Check type of data required'.
DATA(ld_iv_bomus) = 'Check type of data required'. . CALL FUNCTION 'BOM_INSTALL' EXPORTING iv_simulation = ld_iv_simulation * iv_no_gm = ld_iv_no_gm * iv_no_check = ld_iv_no_check iv_matnr = ld_iv_matnr * iv_funcid = ld_iv_funcid iv_quant = ld_iv_quant iv_qunit = ld_iv_qunit iv_hequi = ld_iv_hequi iv_hplnt = ld_iv_hplnt iv_bomus = ld_iv_bomus IMPORTING es_bom_item = ld_es_bom_item * CHANGING * cs_ipw4_com = ld_cs_ipw4_com * ct_loghndl = ld_ct_loghndl * cs_goodsmvt_header = ld_cs_goodsmvt_header * cs_goodsmvt_item = ld_cs_goodsmvt_item * cs_goodsmvt_code = ld_cs_goodsmvt_code * cs_hequi = ld_cs_hequi EXCEPTIONS MAT_NOTFOUND = 1 LOG_ERROR = 2 BOM_UPD_ERROR = 3 LOCK_ERROR = 4 CHK_ERROR_INST = 5 . " BOM_INSTALL
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here 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_cs_ipw4_com  TYPE IPW4_COM ,
ld_es_bom_item  TYPE STPOB ,
ld_iv_simulation  TYPE CHAR1 ,
ld_ct_loghndl  TYPE BAL_T_LOGH ,
ld_iv_no_gm  TYPE XFELD ,
ld_cs_goodsmvt_header  TYPE BAPI2017_GM_HEAD_01 ,
ld_iv_no_check  TYPE XFELD ,
ld_iv_matnr  TYPE MATNR ,
ld_cs_goodsmvt_item  TYPE BAPI2017_GM_ITEM_CREATE ,
ld_iv_funcid  TYPE CCM_FUNCID ,
ld_cs_goodsmvt_code  TYPE BAPI2017_GM_CODE ,
ld_iv_quant  TYPE ERFMG ,
ld_cs_hequi  TYPE V_EQUI ,
ld_iv_qunit  TYPE ERFME ,
ld_iv_hequi  TYPE HEQUI ,
ld_iv_hplnt  TYPE WERKS_D ,
ld_iv_bomus  TYPE STLAN .

ld_cs_ipw4_com = 'Check type of data required'.
ld_iv_simulation = 'Check type of data required'.
ld_ct_loghndl = 'Check type of data required'.
ld_iv_no_gm = 'Check type of data required'.
ld_cs_goodsmvt_header = 'Check type of data required'.
ld_iv_no_check = 'Check type of data required'.
ld_iv_matnr = 'Check type of data required'.
ld_cs_goodsmvt_item = 'Check type of data required'.
ld_iv_funcid = 'Check type of data required'.
ld_cs_goodsmvt_code = 'Check type of data required'.
ld_iv_quant = 'Check type of data required'.
ld_cs_hequi = 'Check type of data required'.
ld_iv_qunit = 'Check type of data required'.
ld_iv_hequi = 'Check type of data required'.
ld_iv_hplnt = 'Check type of data required'.
ld_iv_bomus = 'Check type of data required'.

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 BOM_INSTALL or its description.