PP Function module RFC Used the same way in S/4HANA

CSAP_MAT_BOM_READ Display Material BOM

Reads a material BOM with header, items and sub-items for a material, plant, usage and alternative on a given date, like CS03. It is used in reports and outbound interfaces that need one BOM level without exploding the whole structure. For multi-level explosions use CS_BOM_EXPL_MAT_V2 instead, and handle the ERROR exception when no BOM exists.

Function group
CSAP
Remote-enabled (RFC)
Yes
Type
Function module

Importing parameters

ParameterTypeDescriptionRequired
MATERIALCSAP_MBOM-MATNRMaterial numberYes
PLANTCSAP_MBOM-WERKSPlant—
BOM_USAGECSAP_MBOM-STLANBOM usageYes
ALTERNATIVECSAP_MBOM-STLALAlternative BOM—
VALID_FROMCSAP_MBOM-DATUVValid-from date—
VALID_TOCSAP_MBOM-DATUBValid-to date—
CHANGE_NOCSAP_MBOM-AENNRChange number—

Exporting parameters

ParameterTypeDescription
FL_WARNINGCAPIFLAG-FLWARNINGLog contains warnings

Tables parameters

ParameterTypeDescriptionRequired
T_STKOSTKO_API02BOM headers—
T_STPOSTPO_API02BOM items—
T_STPUSTPU_API01BOM sub-items—

Exceptions

  • ERROR — Error occurred (see log)

Call template (ABAP)

A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.

CALL FUNCTION 'CSAP_MAT_BOM_READ'
  EXPORTING
    material = lv_material
    bom_usage = lv_bom_usage
  IMPORTING
    fl_warning = lv_fl_warning
  TABLES
    t_stko = lt_t_stko
    t_stpo = lt_t_stpo
    t_stpu = lt_t_stpu
  EXCEPTIONS
    error = 1
    OTHERS = 2.

Related tables

Can't find the report you need?

We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.

Request a custom report