SAP Function Modules

Share |

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

CSEP_MAT_BOM_READ is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below are the pattern details for this FM showing its interface including any import, export parameters etc and for your convenience any standard documentation available. All this information and more can be viewed if you enter the function module name CSEP_MAT_BOM_READ into the relevant SAP transaction such as SE37 or SE80.

Within the comments section below there is also an opportunity for you 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

SAP Documentation for FM CSEP_MAT_BOM_READ


FUNCTIONALITY

With this module you can display simple bills of material (BOMs).
Displaying BOM groups (for example all variants of a variant BOM) is
not possible at this time.

(Transaction CS03)

Limitations:
  • Long texts are not displayed.

  • Subitems are not displayed.

  • Batch classification of BOM items is not displayed.

  • Currently you can only display one alternative or one variant. This means that if you do not specify an alternative to the module CSAP_MAT_BOM_READ the system assumes that it should display the alternative '01'.



  • EXAMPLE

    *---- BOM header data table
    data: begin of tstk2 occurs 0.
    include structure stko_api02.
    data: end of tstk2.
    *---- BOM item table
    data: begin of tstp2 occurs 0.
    include structure stpo_api02.
    data: end of tstp2.

    *---- Object dependency table:
    * Basis data
    data: begin of tdep_data occurs 0.
    include structure csdep_data.
    data: end of tdep_data.
    * Description
    data: begin of tdep_descr occurs 0.
    include structure csdep_descr.
    data: end of tdep_descr.
    * Source
    data: begin of tdep_source occurs 0.
    include structure csdep_source.
    data: end of tdep_source.
    * Order
    data: begin of tdep_order occurs 0.
    include structure csdep_order.
    data: end of tdep_order.
    * Documentation
    data: begin of tdep_doc occurs 0.
    include structure csdep_doc.
    data: end of tdep_doc.

    data: flg_warning like capiflag-flwarning.


    *- Open database profile
    call function 'CALO_INIT_API'
    exceptions
    log_object_not_found = 1
    log_sub_object_not_found = 2
    other_error = 3
    others = 4.


    *- Display material BOM
    call function 'CSAP_MAT_BOM_READ'
    exporting
    material = 'MAT100'
    plant = '0001'
    bom_usage = '1'
    valid_from = '20.12.1996'
    * valid_to "Optional entry
    importing
    fl_warning = flg_warning
    tables
    t_stko = tstk2
    t_stpo = tstp2
    t_dep_data = tdep_data
    t_dep_descr = tdep_descr
    t_dep_source = tdep_source
    t_dep_order = tdep_order
    t_dep_doc = tdep_doc
    exceptions
    error = 1.

    if sy-subrc eq 1.
    *---- Error occurred (BOM cannot be displayed)
    * Evaluate log
    endif.
    if flg_warning eq 'X'.
    *---- Evaluate log. This contains information, warnings and
    * success messages
    Endif.
    Documentation extract taken from SAP system, Copyright (c) SAP AG






    Terms of Service     Contact Us     Privacy Policy     Useful SAP related sites