SAP Function Modules

EXIT_SAPMC29M_001 SAP Function module - BOM; Material Where-Used List







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

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


Pattern for FM EXIT_SAPMC29M_001 - EXIT SAPMC29M 001





CALL FUNCTION 'EXIT_SAPMC29M_001' "BOM; Material Where-Used List
  EXPORTING
    datub =                     " rc29l-datub   Date 'Valid to'
    datuv =                     " rc29l-datuv   Date 'Valid from'
    matnr =                     " rc29l-matnr   Material
*   postp = SPACE               " rc29l-postp   Item category
*   werks = SPACE               " rc29l-werks   Plant
*   mclmt =                     " stzu-stuez    Maximum number of counters in a BOM
*   mnstl =                     " stzu-stlnr    Bill of Material
*   mxstl =                     " stzu-stlnr    Bill of Material
*   i_rc29l =                   " rc29l         BOM Display input/output table
*   i_rc29n =                   " rc29n         EATAB BOMs - initial screens
*   i_rc29p =                   " rc29p         EATAB BOM Items
*   delflag_schgt =             " csdata-xfeld  Checkbox field
*   delflag_sanka =             " csdata-xfeld  Checkbox field
  IMPORTING
    no_dialog =                 " csdata-xfeld
  TABLES
    wultb =                     " stpov         Where-Used List Table (Items)
*   equicat =                   " cscequi       Assembly Groups Table: Equipment
*   kndcat =                    " cscknd        Assembly Groups Table: Sales Orders
*   matcat =                    " cscmat        Assembly Groups Table: Materials
*   stdcat =                    " cscstd        Assembly Groups Table: Standard Objects
*   tplcat =                    " csctpl        Assembly Groups Table: Technical Centers
*   prjcat =                    " cscprj        Assembly Groups Table: Projects
    t_indextab =                " indextab
    .  "  EXIT_SAPMC29M_001

ABAP code example for Function Module EXIT_SAPMC29M_001

The ABAP code below is a full code listing to execute function module EXIT_SAPMC29M_001 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_no_dialog  TYPE CSDATA-XFELD ,
it_wultb  TYPE STANDARD TABLE OF STPOV,"TABLES PARAM
wa_wultb  LIKE LINE OF it_wultb ,
it_equicat  TYPE STANDARD TABLE OF CSCEQUI,"TABLES PARAM
wa_equicat  LIKE LINE OF it_equicat ,
it_kndcat  TYPE STANDARD TABLE OF CSCKND,"TABLES PARAM
wa_kndcat  LIKE LINE OF it_kndcat ,
it_matcat  TYPE STANDARD TABLE OF CSCMAT,"TABLES PARAM
wa_matcat  LIKE LINE OF it_matcat ,
it_stdcat  TYPE STANDARD TABLE OF CSCSTD,"TABLES PARAM
wa_stdcat  LIKE LINE OF it_stdcat ,
it_tplcat  TYPE STANDARD TABLE OF CSCTPL,"TABLES PARAM
wa_tplcat  LIKE LINE OF it_tplcat ,
it_prjcat  TYPE STANDARD TABLE OF CSCPRJ,"TABLES PARAM
wa_prjcat  LIKE LINE OF it_prjcat ,
it_t_indextab  TYPE STANDARD TABLE OF INDEXTAB,"TABLES PARAM
wa_t_indextab  LIKE LINE OF it_t_indextab .


DATA(ld_datub) = 20190818

DATA(ld_datuv) = 20190818

DATA(ld_matnr) = some text here

DATA(ld_postp) = some text here

DATA(ld_werks) = some text here

SELECT single STUEZ
FROM STZU
INTO @DATA(ld_mclmt).


SELECT single STLNR
FROM STZU
INTO @DATA(ld_mnstl).


SELECT single STLNR
FROM STZU
INTO @DATA(ld_mxstl).

DATA(ld_i_rc29l) = 'Check type of data required'.
DATA(ld_i_rc29n) = 'Check type of data required'.
DATA(ld_i_rc29p) = 'Check type of data required'.

DATA(ld_delflag_schgt) = some text here

DATA(ld_delflag_sanka) = some text here

"populate fields of struture and append to itab
append wa_wultb to it_wultb.

"populate fields of struture and append to itab
append wa_equicat to it_equicat.

"populate fields of struture and append to itab
append wa_kndcat to it_kndcat.

"populate fields of struture and append to itab
append wa_matcat to it_matcat.

"populate fields of struture and append to itab
append wa_stdcat to it_stdcat.

"populate fields of struture and append to itab
append wa_tplcat to it_tplcat.

"populate fields of struture and append to itab
append wa_prjcat to it_prjcat.

"populate fields of struture and append to itab
append wa_t_indextab to it_t_indextab. . CALL FUNCTION 'EXIT_SAPMC29M_001' EXPORTING datub = ld_datub datuv = ld_datuv matnr = ld_matnr * postp = ld_postp * werks = ld_werks * mclmt = ld_mclmt * mnstl = ld_mnstl * mxstl = ld_mxstl * i_rc29l = ld_i_rc29l * i_rc29n = ld_i_rc29n * i_rc29p = ld_i_rc29p * delflag_schgt = ld_delflag_schgt * delflag_sanka = ld_delflag_sanka IMPORTING no_dialog = ld_no_dialog TABLES wultb = it_wultb * equicat = it_equicat * kndcat = it_kndcat * matcat = it_matcat * stdcat = it_stdcat * tplcat = it_tplcat * prjcat = it_prjcat t_indextab = it_t_indextab . " EXIT_SAPMC29M_001
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_no_dialog  TYPE CSDATA-XFELD ,
ld_datub  TYPE RC29L-DATUB ,
it_wultb  TYPE STANDARD TABLE OF STPOV ,
wa_wultb  LIKE LINE OF it_wultb,
ld_datuv  TYPE RC29L-DATUV ,
it_equicat  TYPE STANDARD TABLE OF CSCEQUI ,
wa_equicat  LIKE LINE OF it_equicat,
ld_matnr  TYPE RC29L-MATNR ,
it_kndcat  TYPE STANDARD TABLE OF CSCKND ,
wa_kndcat  LIKE LINE OF it_kndcat,
ld_postp  TYPE RC29L-POSTP ,
it_matcat  TYPE STANDARD TABLE OF CSCMAT ,
wa_matcat  LIKE LINE OF it_matcat,
ld_werks  TYPE RC29L-WERKS ,
it_stdcat  TYPE STANDARD TABLE OF CSCSTD ,
wa_stdcat  LIKE LINE OF it_stdcat,
ld_mclmt  TYPE STZU-STUEZ ,
it_tplcat  TYPE STANDARD TABLE OF CSCTPL ,
wa_tplcat  LIKE LINE OF it_tplcat,
ld_mnstl  TYPE STZU-STLNR ,
it_prjcat  TYPE STANDARD TABLE OF CSCPRJ ,
wa_prjcat  LIKE LINE OF it_prjcat,
ld_mxstl  TYPE STZU-STLNR ,
it_t_indextab  TYPE STANDARD TABLE OF INDEXTAB ,
wa_t_indextab  LIKE LINE OF it_t_indextab,
ld_i_rc29l  TYPE RC29L ,
ld_i_rc29n  TYPE RC29N ,
ld_i_rc29p  TYPE RC29P ,
ld_delflag_schgt  TYPE CSDATA-XFELD ,
ld_delflag_sanka  TYPE CSDATA-XFELD .


ld_datub = 20190818

"populate fields of struture and append to itab
append wa_wultb to it_wultb.

ld_datuv = 20190818

"populate fields of struture and append to itab
append wa_equicat to it_equicat.

ld_matnr = some text here

"populate fields of struture and append to itab
append wa_kndcat to it_kndcat.

ld_postp = some text here

"populate fields of struture and append to itab
append wa_matcat to it_matcat.

ld_werks = some text here

"populate fields of struture and append to itab
append wa_stdcat to it_stdcat.

SELECT single STUEZ
FROM STZU
INTO ld_mclmt.


"populate fields of struture and append to itab
append wa_tplcat to it_tplcat.

SELECT single STLNR
FROM STZU
INTO ld_mnstl.


"populate fields of struture and append to itab
append wa_prjcat to it_prjcat.

SELECT single STLNR
FROM STZU
INTO ld_mxstl.


"populate fields of struture and append to itab
append wa_t_indextab to it_t_indextab.
ld_i_rc29l = 'Check type of data required'.
ld_i_rc29n = 'Check type of data required'.
ld_i_rc29p = 'Check type of data required'.

ld_delflag_schgt = some text here

ld_delflag_sanka = some text here

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