SAP Function Modules

BOM_POST_V2_CUS SAP Function module







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

Associated Function Group: CSVB
Released Date: Not Released
Processing type: Start of update delayed (Start Delayed)
update module start delayed settings


Pattern for FM BOM_POST_V2_CUS - BOM POST V2 CUS





CALL FUNCTION 'BOM_POST_V2_CUS' "
  EXPORTING
    eaennr =                    " aenr-aennr
    estlal =                    " mast-stlal
    estzub =                    " stzub         Central data document line
*   flg_ml =                    " csdata-xfeld
  TABLES
    tkdstb =                    " kdstb
    tstasb =                    " stasb
*   tstkob =                    " stkob
    tstpob =                    " stpob
    okdstb =                    " kdstb
*   ostkob =                    " stkob
*   ostpob =                    " stpob
    .  "  BOM_POST_V2_CUS

ABAP code example for Function Module BOM_POST_V2_CUS





The ABAP code below is a full code listing to execute function module BOM_POST_V2_CUS 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_tkdstb  TYPE STANDARD TABLE OF KDSTB,"TABLES PARAM
wa_tkdstb  LIKE LINE OF it_tkdstb ,
it_tstasb  TYPE STANDARD TABLE OF STASB,"TABLES PARAM
wa_tstasb  LIKE LINE OF it_tstasb ,
it_tstkob  TYPE STANDARD TABLE OF STKOB,"TABLES PARAM
wa_tstkob  LIKE LINE OF it_tstkob ,
it_tstpob  TYPE STANDARD TABLE OF STPOB,"TABLES PARAM
wa_tstpob  LIKE LINE OF it_tstpob ,
it_okdstb  TYPE STANDARD TABLE OF KDSTB,"TABLES PARAM
wa_okdstb  LIKE LINE OF it_okdstb ,
it_ostkob  TYPE STANDARD TABLE OF STKOB,"TABLES PARAM
wa_ostkob  LIKE LINE OF it_ostkob ,
it_ostpob  TYPE STANDARD TABLE OF STPOB,"TABLES PARAM
wa_ostpob  LIKE LINE OF it_ostpob .


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


SELECT single STLAL
FROM MAST
INTO @DATA(ld_estlal).

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

DATA(ld_flg_ml) = some text here

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

"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_okdstb to it_okdstb.

"populate fields of struture and append to itab
append wa_ostkob to it_ostkob.

"populate fields of struture and append to itab
append wa_ostpob to it_ostpob. . CALL FUNCTION 'BOM_POST_V2_CUS' EXPORTING eaennr = ld_eaennr estlal = ld_estlal estzub = ld_estzub * flg_ml = ld_flg_ml TABLES tkdstb = it_tkdstb tstasb = it_tstasb * tstkob = it_tstkob tstpob = it_tstpob okdstb = it_okdstb * ostkob = it_ostkob * ostpob = it_ostpob . " BOM_POST_V2_CUS
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_tkdstb  TYPE STANDARD TABLE OF KDSTB ,
wa_tkdstb  LIKE LINE OF it_tkdstb,
ld_estlal  TYPE MAST-STLAL ,
it_tstasb  TYPE STANDARD TABLE OF STASB ,
wa_tstasb  LIKE LINE OF it_tstasb,
ld_estzub  TYPE STZUB ,
it_tstkob  TYPE STANDARD TABLE OF STKOB ,
wa_tstkob  LIKE LINE OF it_tstkob,
ld_flg_ml  TYPE CSDATA-XFELD ,
it_tstpob  TYPE STANDARD TABLE OF STPOB ,
wa_tstpob  LIKE LINE OF it_tstpob,
it_okdstb  TYPE STANDARD TABLE OF KDSTB ,
wa_okdstb  LIKE LINE OF it_okdstb,
it_ostkob  TYPE STANDARD TABLE OF STKOB ,
wa_ostkob  LIKE LINE OF it_ostkob,
it_ostpob  TYPE STANDARD TABLE OF STPOB ,
wa_ostpob  LIKE LINE OF it_ostpob.


SELECT single AENNR
FROM AENR
INTO ld_eaennr.


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

SELECT single STLAL
FROM MAST
INTO ld_estlal.


"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.

ld_flg_ml = some text here

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

"populate fields of struture and append to itab
append wa_okdstb to it_okdstb.

"populate fields of struture and append to itab
append wa_ostkob to it_ostkob.

"populate fields of struture and append to itab
append wa_ostpob to it_ostpob.

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