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
| Parameter | Type | Description | Required |
|---|---|---|---|
| MATERIAL | CSAP_MBOM-MATNR | Material number | Yes |
| PLANT | CSAP_MBOM-WERKS | Plant | — |
| BOM_USAGE | CSAP_MBOM-STLAN | BOM usage | Yes |
| 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 | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| FL_WARNING | CAPIFLAG-FLWARNING | Log contains warnings |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| T_STKO | STKO_API02 | BOM headers | — |
| T_STPO | STPO_API02 | BOM items | — |
| T_STPU | STPU_API01 | BOM 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.