SAP CSAP_MAT_BOM_ITEM_SELECT Function Module for NOTRANSL: API Stücklisten: Positionen einer Materialstückliste selektieren
CSAP_MAT_BOM_ITEM_SELECT is a standard csap mat bom item 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 NOTRANSL: API Stücklisten: Positionen einer Materialstückliste selektieren 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 csap mat bom item select FM, simply by entering the name CSAP_MAT_BOM_ITEM_SELECT into the relevant SAP transaction such as SE37 or SE38.
Function Group: CSAP
Program Name: SAPLCSAP
Main Program: SAPLCSAP
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function CSAP_MAT_BOM_ITEM_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 'CSAP_MAT_BOM_ITEM_SELECT'"NOTRANSL: API Stücklisten: Positionen einer Materialstückliste selektieren.
EXPORTING
* I_STPO = "BOM item data
* MATERIAL = "Material
* PLANT = "Plant
* BOM_USAGE = "BOM usage
* ALTERNATIVE = "Alternative BOM
* VALID_FROM = "Valid-from date
* VALID_TO = "Valid-to date
* FL_MATERIAL_CHECK = 'X' "Check material existence
* FL_FOREIGN_KEY_CHECK = 'X' "Check external key
IMPORTING
FL_WARNING = "Log contains warning messages
TABLES
T_STPO = "BOM items
EXCEPTIONS
ERROR = 1
IMPORTING Parameters details for CSAP_MAT_BOM_ITEM_SELECT
I_STPO - BOM item data
Data type: STPO_API02Optional: Yes
Call by Reference: No ( called with pass by value option)
MATERIAL - Material
Data type: CSAP_MBOM-MATNROptional: Yes
Call by Reference: No ( called with pass by value option)
PLANT - Plant
Data type: CSAP_MBOM-WERKSOptional: 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)
ALTERNATIVE - Alternative BOM
Data type: CSAP_MBOM-STLALOptional: Yes
Call by Reference: No ( called with pass by value option)
VALID_FROM - Valid-from date
Data type: CSAP_MBOM-DATUVOptional: Yes
Call by Reference: No ( called with pass by value option)
VALID_TO - Valid-to date
Data type: CSAP_MBOM-DATUBOptional: 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)
EXPORTING Parameters details for CSAP_MAT_BOM_ITEM_SELECT
FL_WARNING - Log contains warning messages
Data type: CAPIFLAG-FLWARNINGOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CSAP_MAT_BOM_ITEM_SELECT
T_STPO - BOM items
Data type: STPO_API02Optional: No
Call by Reference: No ( called with pass by value option)
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 CSAP_MAT_BOM_ITEM_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_i_stpo | TYPE STPO_API02, " | |||
lt_t_stpo | TYPE STANDARD TABLE OF STPO_API02, " | |||
lv_fl_warning | TYPE CAPIFLAG-FLWARNING, " | |||
lv_material | TYPE CSAP_MBOM-MATNR, " | |||
lv_plant | TYPE CSAP_MBOM-WERKS, " | |||
lv_bom_usage | TYPE CSAP_MBOM-STLAN, " | |||
lv_alternative | TYPE CSAP_MBOM-STLAL, " | |||
lv_valid_from | TYPE CSAP_MBOM-DATUV, " | |||
lv_valid_to | TYPE CSAP_MBOM-DATUB, " | |||
lv_fl_material_check | TYPE CSDATA-XFELD, " 'X' | |||
lv_fl_foreign_key_check | TYPE CSDATA-XFELD. " 'X' |
  CALL FUNCTION 'CSAP_MAT_BOM_ITEM_SELECT' "NOTRANSL: API Stücklisten: Positionen einer Materialstückliste selektieren |
EXPORTING | ||
I_STPO | = lv_i_stpo | |
MATERIAL | = lv_material | |
PLANT | = lv_plant | |
BOM_USAGE | = lv_bom_usage | |
ALTERNATIVE | = lv_alternative | |
VALID_FROM | = lv_valid_from | |
VALID_TO | = lv_valid_to | |
FL_MATERIAL_CHECK | = lv_fl_material_check | |
FL_FOREIGN_KEY_CHECK | = lv_fl_foreign_key_check | |
IMPORTING | ||
FL_WARNING | = lv_fl_warning | |
TABLES | ||
T_STPO | = lt_t_stpo | |
EXCEPTIONS | ||
ERROR = 1 | ||
. " CSAP_MAT_BOM_ITEM_SELECT |
ABAP code using 7.40 inline data declarations to call FM CSAP_MAT_BOM_ITEM_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 FLWARNING FROM CAPIFLAG INTO @DATA(ld_fl_warning). | ||||
"SELECT single MATNR FROM CSAP_MBOM INTO @DATA(ld_material). | ||||
"SELECT single WERKS FROM CSAP_MBOM INTO @DATA(ld_plant). | ||||
"SELECT single STLAN FROM CSAP_MBOM INTO @DATA(ld_bom_usage). | ||||
"SELECT single STLAL FROM CSAP_MBOM INTO @DATA(ld_alternative). | ||||
"SELECT single DATUV FROM CSAP_MBOM INTO @DATA(ld_valid_from). | ||||
"SELECT single DATUB FROM CSAP_MBOM INTO @DATA(ld_valid_to). | ||||
"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