SAP CS_BOMHEADERS_GET_MAT Function Module for NOTRANSL: Stücklisten Zuordnungs- und Kopfdaten im Gültigkeitzeitraum
CS_BOMHEADERS_GET_MAT is a standard cs bomheaders get mat 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: Stücklisten Zuordnungs- und Kopfdaten im Gültigkeitzeitraum 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 cs bomheaders get mat FM, simply by entering the name CS_BOMHEADERS_GET_MAT into the relevant SAP transaction such as SE37 or SE38.
Function Group: CSS3
Program Name: SAPLCSS3
Main Program: SAPLCSS3
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CS_BOMHEADERS_GET_MAT 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 'CS_BOMHEADERS_GET_MAT'"NOTRANSL: Stücklisten Zuordnungs- und Kopfdaten im Gültigkeitzeitraum.
EXPORTING
* CAPID = ' ' "CIM application ID
* CSLID = ' ' "CIM selection ID
* DATUB = 00000000 "Valid-To Date
* DATUV = 00000000 "Valid-From Date
* MATNR = ' ' "Material
* STLAL = ' ' "Alternative BOM
* STLAN = ' ' "BOM usage
* WERKS = ' ' "Plant
TABLES
MASTB_WA = "Work area MAST document
STKOB_WA = "Work area STKO document
STZUB_WA = "Work area STZU document
EXCEPTIONS
CALL_INVALID = 1 NO_RECORD_FOUND = 2
IMPORTING Parameters details for CS_BOMHEADERS_GET_MAT
CAPID - CIM application ID
Data type: TC04-CAPIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CSLID - CIM selection ID
Data type: TCS41-CSLIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATUB - Valid-To Date
Data type: STKO-DATUVDefault: 00000000
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATUV - Valid-From Date
Data type: STKO-DATUVDefault: 00000000
Optional: Yes
Call by Reference: No ( called with pass by value option)
MATNR - Material
Data type: MARA-MATNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
STLAL - Alternative BOM
Data type: STKO-STLALDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
STLAN - BOM usage
Data type: STZU-STLANDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WERKS - Plant
Data type: MARC-WERKSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CS_BOMHEADERS_GET_MAT
MASTB_WA - Work area MAST document
Data type: CS01_MASTB_TABOptional: No
Call by Reference: No ( called with pass by value option)
STKOB_WA - Work area STKO document
Data type: CS01_STKOB_TABOptional: No
Call by Reference: No ( called with pass by value option)
STZUB_WA - Work area STZU document
Data type: CS01_STZUB_TABOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CALL_INVALID - invalid function call
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_RECORD_FOUND - Record does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CS_BOMHEADERS_GET_MAT 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_capid | TYPE TC04-CAPID, " SPACE | |||
| lt_mastb_wa | TYPE STANDARD TABLE OF CS01_MASTB_TAB, " | |||
| lv_call_invalid | TYPE CS01_MASTB_TAB, " | |||
| lv_cslid | TYPE TCS41-CSLID, " SPACE | |||
| lt_stkob_wa | TYPE STANDARD TABLE OF CS01_STKOB_TAB, " | |||
| lv_no_record_found | TYPE CS01_STKOB_TAB, " | |||
| lv_datub | TYPE STKO-DATUV, " 00000000 | |||
| lt_stzub_wa | TYPE STANDARD TABLE OF CS01_STZUB_TAB, " | |||
| lv_datuv | TYPE STKO-DATUV, " 00000000 | |||
| lv_matnr | TYPE MARA-MATNR, " SPACE | |||
| lv_stlal | TYPE STKO-STLAL, " SPACE | |||
| lv_stlan | TYPE STZU-STLAN, " SPACE | |||
| lv_werks | TYPE MARC-WERKS. " SPACE |
|   CALL FUNCTION 'CS_BOMHEADERS_GET_MAT' "NOTRANSL: Stücklisten Zuordnungs- und Kopfdaten im Gültigkeitzeitraum |
| EXPORTING | ||
| CAPID | = lv_capid | |
| CSLID | = lv_cslid | |
| DATUB | = lv_datub | |
| DATUV | = lv_datuv | |
| MATNR | = lv_matnr | |
| STLAL | = lv_stlal | |
| STLAN | = lv_stlan | |
| WERKS | = lv_werks | |
| TABLES | ||
| MASTB_WA | = lt_mastb_wa | |
| STKOB_WA | = lt_stkob_wa | |
| STZUB_WA | = lt_stzub_wa | |
| EXCEPTIONS | ||
| CALL_INVALID = 1 | ||
| NO_RECORD_FOUND = 2 | ||
| . " CS_BOMHEADERS_GET_MAT | ||
ABAP code using 7.40 inline data declarations to call FM CS_BOMHEADERS_GET_MAT
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 CAPID FROM TC04 INTO @DATA(ld_capid). | ||||
| DATA(ld_capid) | = ' '. | |||
| "SELECT single CSLID FROM TCS41 INTO @DATA(ld_cslid). | ||||
| DATA(ld_cslid) | = ' '. | |||
| "SELECT single DATUV FROM STKO INTO @DATA(ld_datub). | ||||
| DATA(ld_datub) | = 00000000. | |||
| "SELECT single DATUV FROM STKO INTO @DATA(ld_datuv). | ||||
| DATA(ld_datuv) | = 00000000. | |||
| "SELECT single MATNR FROM MARA INTO @DATA(ld_matnr). | ||||
| DATA(ld_matnr) | = ' '. | |||
| "SELECT single STLAL FROM STKO INTO @DATA(ld_stlal). | ||||
| DATA(ld_stlal) | = ' '. | |||
| "SELECT single STLAN FROM STZU INTO @DATA(ld_stlan). | ||||
| DATA(ld_stlan) | = ' '. | |||
| "SELECT single WERKS FROM MARC INTO @DATA(ld_werks). | ||||
| DATA(ld_werks) | = ' '. | |||
Search for further information about these or an SAP related objects