SAP Tables

CSEP_MAT_BOM_READ SAP Function module - APIs for BOMs: Display Material BOM




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


Pattern for FM CSEP_MAT_BOM_READ - CSEP MAT BOM READ
Associated Function Group: CSEP
Released Date: 08.08.2002
CALL FUNCTION 'CSEP_MAT_BOM_READ' "APIs for BOMs: Display Material BOM
  EXPORTING
    material =                  " csap_mbom-matnr  Material
*   plant =                     " csap_mbom-werks  Plant
    bom_usage =                 " csap_mbom-stlan  BOM Usage
*   alternative =               " csap_mbom-stlal  Alternative BOM
*   valid_from =                " csap_mbom-datuv  Valid-From Date
*   valid_to =                  " csap_mbom-datub  Valid-to date
*   change_no =                 " csap_mbom-aennr  Change Number
*   revision_level =            " csap_mbom-revlv  Revision Level
*   fl_doc_links =              " csdata-xfeld  Flag: Read Document Assignments
*   fl_dmu_tmx =                " csdata-xfeld  Flag: Read DMU Transformation Matrices
  IMPORTING
    fl_warning =                " capiflag-flwarning  Log contains warning messages
* TABLES
*   t_stpo =                    " bom_item_api01  BOM Items
*   t_stko =                    " stko_api02    BOM Headers
*   t_dep_data =                " csdep_dat     Object dependencies: basic data
*   t_dep_descr =               " csdep_desc    Object dependencies: description
*   t_dep_order =               " csdep_ord     Object dependencies: sort sequence
*   t_dep_source =              " csdep_sorc    Object dependencies: source code
*   t_dep_doc =                 " csdep_doc     Object dependencies: documentation
*   t_doc_link =                " csdoc_link    Document assignments
*   t_dmu_tmx =                 " csdmu_tmx     DMU Transformation Matrices
  EXCEPTIONS
    ERROR = 1                   "               Terminate processing
    .  "  CSEP_MAT_BOM_READ

ABAP code example for Function Module CSEP_MAT_BOM_READ

The ABAP code below is a full code listing to execute function module CSEP_MAT_BOM_READ 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:
ld_fl_warning   TYPE CAPIFLAG-FLWARNING,
it_t_stpo   TYPE STANDARD TABLE OF BOM_ITEM_API01,"tables param
wa_t_stpo LIKE LINE OF it_t_stpo  ,
it_t_stko   TYPE STANDARD TABLE OF STKO_API02,"tables param
wa_t_stko LIKE LINE OF it_t_stko  ,
it_t_dep_data   TYPE STANDARD TABLE OF CSDEP_DAT,"tables param
wa_t_dep_data LIKE LINE OF it_t_dep_data  ,
it_t_dep_descr   TYPE STANDARD TABLE OF CSDEP_DESC,"tables param
wa_t_dep_descr LIKE LINE OF it_t_dep_descr  ,
it_t_dep_order   TYPE STANDARD TABLE OF CSDEP_ORD,"tables param
wa_t_dep_order LIKE LINE OF it_t_dep_order  ,
it_t_dep_source   TYPE STANDARD TABLE OF CSDEP_SORC,"tables param
wa_t_dep_source LIKE LINE OF it_t_dep_source  ,
it_t_dep_doc   TYPE STANDARD TABLE OF CSDEP_DOC,"tables param
wa_t_dep_doc LIKE LINE OF it_t_dep_doc  ,
it_t_doc_link   TYPE STANDARD TABLE OF CSDOC_LINK,"tables param
wa_t_doc_link LIKE LINE OF it_t_doc_link  ,
it_t_dmu_tmx   TYPE STANDARD TABLE OF CSDMU_TMX,"tables param
wa_t_dmu_tmx LIKE LINE OF it_t_dmu_tmx  .


DATA(ld_material). = 'some text here'

DATA(ld_plant). = 'some text here'

DATA(ld_bom_usage). = 'some text here'

DATA(ld_alternative). = 'some text here'

DATA(ld_valid_from). = 'some text here'

DATA(ld_valid_to). = 'some text here'

DATA(ld_change_no). = 'some text here'

DATA(ld_revision_level). = 'some text here'

DATA(ld_fl_doc_links). = 'some text here'

DATA(ld_fl_dmu_tmx). = 'some text here'

"populate fields of struture and append to itab
append wa_t_stpo to it_t_stpo.

"populate fields of struture and append to itab
append wa_t_stko to it_t_stko.

"populate fields of struture and append to itab
append wa_t_dep_data to it_t_dep_data.

"populate fields of struture and append to itab
append wa_t_dep_descr to it_t_dep_descr.

"populate fields of struture and append to itab
append wa_t_dep_order to it_t_dep_order.

"populate fields of struture and append to itab
append wa_t_dep_source to it_t_dep_source.

"populate fields of struture and append to itab
append wa_t_dep_doc to it_t_dep_doc.

"populate fields of struture and append to itab
append wa_t_doc_link to it_t_doc_link.

"populate fields of struture and append to itab
append wa_t_dmu_tmx to it_t_dmu_tmx.. CALL FUNCTION 'CSEP_MAT_BOM_READ' EXPORTING material = ld_material * plant = ld_plant bom_usage = ld_bom_usage * alternative = ld_alternative * valid_from = ld_valid_from * valid_to = ld_valid_to * change_no = ld_change_no * revision_level = ld_revision_level * fl_doc_links = ld_fl_doc_links * fl_dmu_tmx = ld_fl_dmu_tmx IMPORTING fl_warning = ld_fl_warning * TABLES * t_stpo = it_t_stpo * t_stko = it_t_stko * t_dep_data = it_t_dep_data * t_dep_descr = it_t_dep_descr * t_dep_order = it_t_dep_order * t_dep_source = it_t_dep_source * t_dep_doc = it_t_dep_doc * t_doc_link = it_t_doc_link * t_dmu_tmx = it_t_dmu_tmx EXCEPTIONS ERROR = 1 . " CSEP_MAT_BOM_READ
IF SY-SUBRC EQ 0.   "All OK ELSEIF SY-SUBRC EQ 1. "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_fl_warning TYPE CAPIFLAG-FLWARNING ,
ld_material TYPE CSAP_MBOM-MATNR ,
it_t_stpo TYPE STANDARD TABLE OF BOM_ITEM_API01 ,
wa_t_stpo LIKE LINE OF it_t_stpo,
ld_plant TYPE CSAP_MBOM-WERKS ,
it_t_stko TYPE STANDARD TABLE OF STKO_API02 ,
wa_t_stko LIKE LINE OF it_t_stko,
ld_bom_usage TYPE CSAP_MBOM-STLAN ,
it_t_dep_data TYPE STANDARD TABLE OF CSDEP_DAT ,
wa_t_dep_data LIKE LINE OF it_t_dep_data,
ld_alternative TYPE CSAP_MBOM-STLAL ,
it_t_dep_descr TYPE STANDARD TABLE OF CSDEP_DESC ,
wa_t_dep_descr LIKE LINE OF it_t_dep_descr,
ld_valid_from TYPE CSAP_MBOM-DATUV ,
it_t_dep_order TYPE STANDARD TABLE OF CSDEP_ORD ,
wa_t_dep_order LIKE LINE OF it_t_dep_order,
ld_valid_to TYPE CSAP_MBOM-DATUB ,
it_t_dep_source TYPE STANDARD TABLE OF CSDEP_SORC ,
wa_t_dep_source LIKE LINE OF it_t_dep_source,
ld_change_no TYPE CSAP_MBOM-AENNR ,
it_t_dep_doc TYPE STANDARD TABLE OF CSDEP_DOC ,
wa_t_dep_doc LIKE LINE OF it_t_dep_doc,
ld_revision_level TYPE CSAP_MBOM-REVLV ,
it_t_doc_link TYPE STANDARD TABLE OF CSDOC_LINK ,
wa_t_doc_link LIKE LINE OF it_t_doc_link,
ld_fl_doc_links TYPE CSDATA-XFELD ,
it_t_dmu_tmx TYPE STANDARD TABLE OF CSDMU_TMX ,
wa_t_dmu_tmx LIKE LINE OF it_t_dmu_tmx,
ld_fl_dmu_tmx TYPE CSDATA-XFELD .


ld_fl_warning. = 'some text here'

ld_material. = 'some text here'

"populate fields of struture and append to itab
append wa_t_stpo to it_t_stpo.

ld_plant. = 'some text here'

"populate fields of struture and append to itab
append wa_t_stko to it_t_stko.

ld_bom_usage. = 'some text here'

"populate fields of struture and append to itab
append wa_t_dep_data to it_t_dep_data.

ld_alternative. = 'some text here'

"populate fields of struture and append to itab
append wa_t_dep_descr to it_t_dep_descr.

ld_valid_from. = 'some text here'

"populate fields of struture and append to itab
append wa_t_dep_order to it_t_dep_order.

ld_valid_to. = 'some text here'

"populate fields of struture and append to itab
append wa_t_dep_source to it_t_dep_source.

ld_change_no. = 'some text here'

"populate fields of struture and append to itab
append wa_t_dep_doc to it_t_dep_doc.

ld_revision_level. = 'some text here'

"populate fields of struture and append to itab
append wa_t_doc_link to it_t_doc_link.

ld_fl_doc_links. = 'some text here'

"populate fields of struture and append to itab
append wa_t_dmu_tmx to it_t_dmu_tmx.

ld_fl_dmu_tmx. = 'some text here'.

SAP Documentation for FM CSEP_MAT_BOM_READ


With this module you can display simple bills of material (BOMs).
Displaying BOM groups (for example all variants of a variant BOM) is
...See here for full SAP fm documentati