SAP Function Modules

CS_BT_BOM_IMPORT SAP Function module







CS_BT_BOM_IMPORT 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 CS_BT_BOM_IMPORT into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM CS_BT_BOM_IMPORT - CS BT BOM IMPORT





CALL FUNCTION 'CS_BT_BOM_IMPORT' "
* EXPORTING
*   eaennr = SPACE              " aenr-aennr
*   estzub = SPACE              " stzub
  TABLES
    tstasb =                    " cs01_stasb_tab
    tstkob =                    " cs01_stkob_tab
    tstpob =                    " cs01_stpob_tab
    tstpub =                    " cs01_stpub_tab
*   tdostb =                    " cs01_dostb_tab
*   teqstb =                    " cs01_eqstb_tab
*   tkdstb =                    " cs01_kdstb_tab
*   tmastb =                    " cs01_mastb_tab
*   tprstb =                    " cs01_prstb_tab
*   tststb =                    " cs01_ststb_tab
*   ttpstb =                    " cs01_tpstb_tab
    .  "  CS_BT_BOM_IMPORT

ABAP code example for Function Module CS_BT_BOM_IMPORT





The ABAP code below is a full code listing to execute function module CS_BT_BOM_IMPORT 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:
it_tstasb  TYPE STANDARD TABLE OF CS01_STASB_TAB,"TABLES PARAM
wa_tstasb  LIKE LINE OF it_tstasb ,
it_tstkob  TYPE STANDARD TABLE OF CS01_STKOB_TAB,"TABLES PARAM
wa_tstkob  LIKE LINE OF it_tstkob ,
it_tstpob  TYPE STANDARD TABLE OF CS01_STPOB_TAB,"TABLES PARAM
wa_tstpob  LIKE LINE OF it_tstpob ,
it_tstpub  TYPE STANDARD TABLE OF CS01_STPUB_TAB,"TABLES PARAM
wa_tstpub  LIKE LINE OF it_tstpub ,
it_tdostb  TYPE STANDARD TABLE OF CS01_DOSTB_TAB,"TABLES PARAM
wa_tdostb  LIKE LINE OF it_tdostb ,
it_teqstb  TYPE STANDARD TABLE OF CS01_EQSTB_TAB,"TABLES PARAM
wa_teqstb  LIKE LINE OF it_teqstb ,
it_tkdstb  TYPE STANDARD TABLE OF CS01_KDSTB_TAB,"TABLES PARAM
wa_tkdstb  LIKE LINE OF it_tkdstb ,
it_tmastb  TYPE STANDARD TABLE OF CS01_MASTB_TAB,"TABLES PARAM
wa_tmastb  LIKE LINE OF it_tmastb ,
it_tprstb  TYPE STANDARD TABLE OF CS01_PRSTB_TAB,"TABLES PARAM
wa_tprstb  LIKE LINE OF it_tprstb ,
it_tststb  TYPE STANDARD TABLE OF CS01_STSTB_TAB,"TABLES PARAM
wa_tststb  LIKE LINE OF it_tststb ,
it_ttpstb  TYPE STANDARD TABLE OF CS01_TPSTB_TAB,"TABLES PARAM
wa_ttpstb  LIKE LINE OF it_ttpstb .


SELECT single AENNR
FROM AENR
INTO @DATA(ld_eaennr).

DATA(ld_estzub) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tstasb to it_tstasb.

"populate fields of struture and append to itab
append wa_tstkob to it_tstkob.

"populate fields of struture and append to itab
append wa_tstpob to it_tstpob.

"populate fields of struture and append to itab
append wa_tstpub to it_tstpub.

"populate fields of struture and append to itab
append wa_tdostb to it_tdostb.

"populate fields of struture and append to itab
append wa_teqstb to it_teqstb.

"populate fields of struture and append to itab
append wa_tkdstb to it_tkdstb.

"populate fields of struture and append to itab
append wa_tmastb to it_tmastb.

"populate fields of struture and append to itab
append wa_tprstb to it_tprstb.

"populate fields of struture and append to itab
append wa_tststb to it_tststb.

"populate fields of struture and append to itab
append wa_ttpstb to it_ttpstb. . CALL FUNCTION 'CS_BT_BOM_IMPORT' * EXPORTING * eaennr = ld_eaennr * estzub = ld_estzub TABLES tstasb = it_tstasb tstkob = it_tstkob tstpob = it_tstpob tstpub = it_tstpub * tdostb = it_tdostb * teqstb = it_teqstb * tkdstb = it_tkdstb * tmastb = it_tmastb * tprstb = it_tprstb * tststb = it_tststb * ttpstb = it_ttpstb . " CS_BT_BOM_IMPORT
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_eaennr  TYPE AENR-AENNR ,
it_tstasb  TYPE STANDARD TABLE OF CS01_STASB_TAB ,
wa_tstasb  LIKE LINE OF it_tstasb,
ld_estzub  TYPE STZUB ,
it_tstkob  TYPE STANDARD TABLE OF CS01_STKOB_TAB ,
wa_tstkob  LIKE LINE OF it_tstkob,
it_tstpob  TYPE STANDARD TABLE OF CS01_STPOB_TAB ,
wa_tstpob  LIKE LINE OF it_tstpob,
it_tstpub  TYPE STANDARD TABLE OF CS01_STPUB_TAB ,
wa_tstpub  LIKE LINE OF it_tstpub,
it_tdostb  TYPE STANDARD TABLE OF CS01_DOSTB_TAB ,
wa_tdostb  LIKE LINE OF it_tdostb,
it_teqstb  TYPE STANDARD TABLE OF CS01_EQSTB_TAB ,
wa_teqstb  LIKE LINE OF it_teqstb,
it_tkdstb  TYPE STANDARD TABLE OF CS01_KDSTB_TAB ,
wa_tkdstb  LIKE LINE OF it_tkdstb,
it_tmastb  TYPE STANDARD TABLE OF CS01_MASTB_TAB ,
wa_tmastb  LIKE LINE OF it_tmastb,
it_tprstb  TYPE STANDARD TABLE OF CS01_PRSTB_TAB ,
wa_tprstb  LIKE LINE OF it_tprstb,
it_tststb  TYPE STANDARD TABLE OF CS01_STSTB_TAB ,
wa_tststb  LIKE LINE OF it_tststb,
it_ttpstb  TYPE STANDARD TABLE OF CS01_TPSTB_TAB ,
wa_ttpstb  LIKE LINE OF it_ttpstb.


SELECT single AENNR
FROM AENR
INTO ld_eaennr.


"populate fields of struture and append to itab
append wa_tstasb to it_tstasb.
ld_estzub = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tstkob to it_tstkob.

"populate fields of struture and append to itab
append wa_tstpob to it_tstpob.

"populate fields of struture and append to itab
append wa_tstpub to it_tstpub.

"populate fields of struture and append to itab
append wa_tdostb to it_tdostb.

"populate fields of struture and append to itab
append wa_teqstb to it_teqstb.

"populate fields of struture and append to itab
append wa_tkdstb to it_tkdstb.

"populate fields of struture and append to itab
append wa_tmastb to it_tmastb.

"populate fields of struture and append to itab
append wa_tprstb to it_tprstb.

"populate fields of struture and append to itab
append wa_tststb to it_tststb.

"populate fields of struture and append to itab
append wa_ttpstb to it_ttpstb.

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