SAP CS_BT_PRSTB_READ Function Module for NOTRANSL: Belegstrukturen PRSTB und STZUB für Stücklistentransaktionen auf
CS_BT_PRSTB_READ is a standard cs bt prstb read 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: Belegstrukturen PRSTB und STZUB für Stücklistentransaktionen auf 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 bt prstb read FM, simply by entering the name CS_BT_PRSTB_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: CSBT
Program Name: SAPLCSBT
Main Program: SAPLCSBT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CS_BT_PRSTB_READ 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_BT_PRSTB_READ'"NOTRANSL: Belegstrukturen PRSTB und STZUB für Stücklistentransaktionen auf.
EXPORTING
* EMATNR = ' ' "Material Number
* ESTLAL = ' ' "Alternative BOM
* ESTLNR = ' ' "Bill of material
ETRTYP = "Transaction type
* EPSPNR = ' ' "Work breakdown structure element (WBS element)
* EWERKS = ' ' "Plant
* ESTLAN = ' ' "BOM Usage
IMPORTING
ASTLAL = "Alternative BOM
ASTZUB = "Permanent BOM data
STZU_LOCK_USER = "Checkbox
STZU_LOCK_SYST = "Checkbox
STZU_LOCK_UNAME = "User Name
EXCEPTIONS
PRST_FOUND = 1 PRST_NRFD = 2 STZU_NRFD = 3 STLAL_FOUND = 4 STLAL_NOT_FOUND = 5
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLCSBT_001 Order BOM (Knowledge Based): Set Status at Fix
IMPORTING Parameters details for CS_BT_PRSTB_READ
EMATNR - Material Number
Data type: PRST-MATNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ESTLAL - Alternative BOM
Data type: PRST-STLALDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ESTLNR - Bill of material
Data type: PRST-STLNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ETRTYP - Transaction type
Data type: TCS05-TRTYPOptional: No
Call by Reference: No ( called with pass by value option)
EPSPNR - Work breakdown structure element (WBS element)
Data type: PRST-PSPNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EWERKS - Plant
Data type: PRST-WERKSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ESTLAN - BOM Usage
Data type: PRST-STLANDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CS_BT_PRSTB_READ
ASTLAL - Alternative BOM
Data type: STKO-STLALOptional: No
Call by Reference: No ( called with pass by value option)
ASTZUB - Permanent BOM data
Data type: STZUBOptional: No
Call by Reference: No ( called with pass by value option)
STZU_LOCK_USER - Checkbox
Data type: CSDATA-XFELDOptional: No
Call by Reference: No ( called with pass by value option)
STZU_LOCK_SYST - Checkbox
Data type: CSDATA-XFELDOptional: No
Call by Reference: No ( called with pass by value option)
STZU_LOCK_UNAME - User Name
Data type: SY-UNAMEOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
PRST_FOUND - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PRST_NRFD - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
STZU_NRFD - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
STLAL_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
STLAL_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CS_BT_PRSTB_READ 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_astlal | TYPE STKO-STLAL, " | |||
| lv_ematnr | TYPE PRST-MATNR, " SPACE | |||
| lv_prst_found | TYPE PRST, " | |||
| lv_astzub | TYPE STZUB, " | |||
| lv_estlal | TYPE PRST-STLAL, " SPACE | |||
| lv_prst_nrfd | TYPE PRST, " | |||
| lv_estlnr | TYPE PRST-STLNR, " SPACE | |||
| lv_stzu_nrfd | TYPE PRST, " | |||
| lv_stzu_lock_user | TYPE CSDATA-XFELD, " | |||
| lv_etrtyp | TYPE TCS05-TRTYP, " | |||
| lv_stlal_found | TYPE TCS05, " | |||
| lv_stzu_lock_syst | TYPE CSDATA-XFELD, " | |||
| lv_epspnr | TYPE PRST-PSPNR, " SPACE | |||
| lv_stlal_not_found | TYPE PRST, " | |||
| lv_stzu_lock_uname | TYPE SY-UNAME, " | |||
| lv_ewerks | TYPE PRST-WERKS, " SPACE | |||
| lv_estlan | TYPE PRST-STLAN. " SPACE |
|   CALL FUNCTION 'CS_BT_PRSTB_READ' "NOTRANSL: Belegstrukturen PRSTB und STZUB für Stücklistentransaktionen auf |
| EXPORTING | ||
| EMATNR | = lv_ematnr | |
| ESTLAL | = lv_estlal | |
| ESTLNR | = lv_estlnr | |
| ETRTYP | = lv_etrtyp | |
| EPSPNR | = lv_epspnr | |
| EWERKS | = lv_ewerks | |
| ESTLAN | = lv_estlan | |
| IMPORTING | ||
| ASTLAL | = lv_astlal | |
| ASTZUB | = lv_astzub | |
| STZU_LOCK_USER | = lv_stzu_lock_user | |
| STZU_LOCK_SYST | = lv_stzu_lock_syst | |
| STZU_LOCK_UNAME | = lv_stzu_lock_uname | |
| EXCEPTIONS | ||
| PRST_FOUND = 1 | ||
| PRST_NRFD = 2 | ||
| STZU_NRFD = 3 | ||
| STLAL_FOUND = 4 | ||
| STLAL_NOT_FOUND = 5 | ||
| . " CS_BT_PRSTB_READ | ||
ABAP code using 7.40 inline data declarations to call FM CS_BT_PRSTB_READ
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 STLAL FROM STKO INTO @DATA(ld_astlal). | ||||
| "SELECT single MATNR FROM PRST INTO @DATA(ld_ematnr). | ||||
| DATA(ld_ematnr) | = ' '. | |||
| "SELECT single STLAL FROM PRST INTO @DATA(ld_estlal). | ||||
| DATA(ld_estlal) | = ' '. | |||
| "SELECT single STLNR FROM PRST INTO @DATA(ld_estlnr). | ||||
| DATA(ld_estlnr) | = ' '. | |||
| "SELECT single XFELD FROM CSDATA INTO @DATA(ld_stzu_lock_user). | ||||
| "SELECT single TRTYP FROM TCS05 INTO @DATA(ld_etrtyp). | ||||
| "SELECT single XFELD FROM CSDATA INTO @DATA(ld_stzu_lock_syst). | ||||
| "SELECT single PSPNR FROM PRST INTO @DATA(ld_epspnr). | ||||
| DATA(ld_epspnr) | = ' '. | |||
| "SELECT single UNAME FROM SY INTO @DATA(ld_stzu_lock_uname). | ||||
| "SELECT single WERKS FROM PRST INTO @DATA(ld_ewerks). | ||||
| DATA(ld_ewerks) | = ' '. | |||
| "SELECT single STLAN FROM PRST INTO @DATA(ld_estlan). | ||||
| DATA(ld_estlan) | = ' '. | |||
Search for further information about these or an SAP related objects