SAP CSEP_MAT_BOM_SELECT Function Module for API Bills of Material: Select BOM(s)
CSEP_MAT_BOM_SELECT is a standard csep mat bom select SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for API Bills of Material: Select BOM(s) processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for csep mat bom select FM, simply by entering the name CSEP_MAT_BOM_SELECT into the relevant SAP transaction such as SE37 or SE38.
Function Group: CSEP
Program Name: SAPLCSEP
Main Program:
Appliation area: C
Release date: 08-Aug-2002
Mode(Normal, Remote etc): Remote-Enabled
Update:
Function CSEP_MAT_BOM_SELECT pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'CSEP_MAT_BOM_SELECT'"API Bills of Material: Select BOM(s).
EXPORTING
MATERIAL = "Material
* PLANT = '* ' "Plant
* BOM_USAGE = "BOM Usage
* FL_MATERIAL_CHECK = 'X' "Check material existence
* FL_FOREIGN_KEY_CHECK = 'X' "Check external key
TABLES
T_BOM_HEADER = "Header Information
T_BOM_HEADER_REV = "Header Information Depending on Revision Status
EXCEPTIONS
ERROR = 1
IMPORTING Parameters details for CSEP_MAT_BOM_SELECT
MATERIAL - Material
Data type: CSAP_MBOM-MATNROptional: No
Call by Reference: No ( called with pass by value option)
PLANT - Plant
Data type: CSAP_MBOM-WERKSDefault: '* '
Optional: Yes
Call by Reference: No ( called with pass by value option)
BOM_USAGE - BOM Usage
Data type: CSAP_MBOM-STLANOptional: Yes
Call by Reference: No ( called with pass by value option)
FL_MATERIAL_CHECK - Check material existence
Data type: CSDATA-XFELDDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
FL_FOREIGN_KEY_CHECK - Check external key
Data type: CSDATA-XFELDDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CSEP_MAT_BOM_SELECT
T_BOM_HEADER - Header Information
Data type: BOM_HEADER_API01Optional: No
Call by Reference: Yes
T_BOM_HEADER_REV - Header Information Depending on Revision Status
Data type: BOM_HEADER_API01Optional: No
Call by Reference: Yes
EXCEPTIONS details
ERROR - Terminate processing
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CSEP_MAT_BOM_SELECT Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.DATA: | ||||
lv_error | TYPE STRING, " | |||
lv_material | TYPE CSAP_MBOM-MATNR, " | |||
lt_t_bom_header | TYPE STANDARD TABLE OF BOM_HEADER_API01, " | |||
lv_plant | TYPE CSAP_MBOM-WERKS, " '* ' | |||
lt_t_bom_header_rev | TYPE STANDARD TABLE OF BOM_HEADER_API01, " | |||
lv_bom_usage | TYPE CSAP_MBOM-STLAN, " | |||
lv_fl_material_check | TYPE CSDATA-XFELD, " 'X' | |||
lv_fl_foreign_key_check | TYPE CSDATA-XFELD. " 'X' |
  CALL FUNCTION 'CSEP_MAT_BOM_SELECT' "API Bills of Material: Select BOM(s) |
EXPORTING | ||
MATERIAL | = lv_material | |
PLANT | = lv_plant | |
BOM_USAGE | = lv_bom_usage | |
FL_MATERIAL_CHECK | = lv_fl_material_check | |
FL_FOREIGN_KEY_CHECK | = lv_fl_foreign_key_check | |
TABLES | ||
T_BOM_HEADER | = lt_t_bom_header | |
T_BOM_HEADER_REV | = lt_t_bom_header_rev | |
EXCEPTIONS | ||
ERROR = 1 | ||
. " CSEP_MAT_BOM_SELECT |
ABAP code using 7.40 inline data declarations to call FM CSEP_MAT_BOM_SELECT
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8."SELECT single MATNR FROM CSAP_MBOM INTO @DATA(ld_material). | ||||
"SELECT single WERKS FROM CSAP_MBOM INTO @DATA(ld_plant). | ||||
DATA(ld_plant) | = '* '. | |||
"SELECT single STLAN FROM CSAP_MBOM INTO @DATA(ld_bom_usage). | ||||
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_fl_material_check). | ||||
DATA(ld_fl_material_check) | = 'X'. | |||
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_fl_foreign_key_check). | ||||
DATA(ld_fl_foreign_key_check) | = 'X'. | |||
Search for further information about these or an SAP related objects