SAP CS_BT_TPSTB_READ Function Module for NOTRANSL: Belegstrukturen TPSTB und STZUB für Stücklistentransaktionen auf
CS_BT_TPSTB_READ is a standard cs bt tpstb 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 TPSTB 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 tpstb read FM, simply by entering the name CS_BT_TPSTB_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_TPSTB_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_TPSTB_READ'"NOTRANSL: Belegstrukturen TPSTB und STZUB für Stücklistentransaktionen auf.
EXPORTING
* ESTLAL = ' ' "
* ESTLAN = ' ' "
* ESTLNR = ' ' "
* ETPLNR = ' ' "
ETRTYP = "
* EWERKS = ' ' "
IMPORTING
ASTLAL = "
ASTZUB = "
STZU_LOCK_USER = "
STZU_LOCK_SYST = "
STZU_LOCK_UNAME = "
EXCEPTIONS
STZU_NRFD = 1 TPST_FOUND = 2 TPST_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_TPSTB_READ
ESTLAL -
Data type: TPST-STLALDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ESTLAN -
Data type: TPST-STLANDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ESTLNR -
Data type: TPST-STLNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ETPLNR -
Data type: TPST-TPLNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ETRTYP -
Data type: TCS05-TRTYPOptional: No
Call by Reference: No ( called with pass by value option)
EWERKS -
Data type: TPST-WERKSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CS_BT_TPSTB_READ
ASTLAL -
Data type: STKO-STLALOptional: No
Call by Reference: No ( called with pass by value option)
ASTZUB -
Data type: STZUBOptional: No
Call by Reference: No ( called with pass by value option)
STZU_LOCK_USER -
Data type: CSDATA-XFELDOptional: No
Call by Reference: No ( called with pass by value option)
STZU_LOCK_SYST -
Data type: CSDATA-XFELDOptional: No
Call by Reference: No ( called with pass by value option)
STZU_LOCK_UNAME -
Data type: SY-UNAMEOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
STZU_NRFD - No BOM found for BOM number
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TPST_FOUND - Allocation for selection criteria already exists
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TPST_NRFD - No allocation found for selection criteria
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_TPSTB_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_estlal | TYPE TPST-STLAL, " SPACE | |||
| lv_stzu_nrfd | TYPE TPST, " | |||
| lv_astzub | TYPE STZUB, " | |||
| lv_estlan | TYPE TPST-STLAN, " SPACE | |||
| lv_tpst_found | TYPE TPST, " | |||
| lv_estlnr | TYPE TPST-STLNR, " SPACE | |||
| lv_tpst_nrfd | TYPE TPST, " | |||
| lv_stzu_lock_user | TYPE CSDATA-XFELD, " | |||
| lv_etplnr | TYPE TPST-TPLNR, " SPACE | |||
| lv_stlal_found | TYPE TPST, " | |||
| lv_stzu_lock_syst | TYPE CSDATA-XFELD, " | |||
| lv_etrtyp | TYPE TCS05-TRTYP, " | |||
| lv_stlal_not_found | TYPE TCS05, " | |||
| lv_stzu_lock_uname | TYPE SY-UNAME, " | |||
| lv_ewerks | TYPE TPST-WERKS. " SPACE |
|   CALL FUNCTION 'CS_BT_TPSTB_READ' "NOTRANSL: Belegstrukturen TPSTB und STZUB für Stücklistentransaktionen auf |
| EXPORTING | ||
| ESTLAL | = lv_estlal | |
| ESTLAN | = lv_estlan | |
| ESTLNR | = lv_estlnr | |
| ETPLNR | = lv_etplnr | |
| ETRTYP | = lv_etrtyp | |
| EWERKS | = lv_ewerks | |
| 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 | ||
| STZU_NRFD = 1 | ||
| TPST_FOUND = 2 | ||
| TPST_NRFD = 3 | ||
| STLAL_FOUND = 4 | ||
| STLAL_NOT_FOUND = 5 | ||
| . " CS_BT_TPSTB_READ | ||
ABAP code using 7.40 inline data declarations to call FM CS_BT_TPSTB_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 STLAL FROM TPST INTO @DATA(ld_estlal). | ||||
| DATA(ld_estlal) | = ' '. | |||
| "SELECT single STLAN FROM TPST INTO @DATA(ld_estlan). | ||||
| DATA(ld_estlan) | = ' '. | |||
| "SELECT single STLNR FROM TPST INTO @DATA(ld_estlnr). | ||||
| DATA(ld_estlnr) | = ' '. | |||
| "SELECT single XFELD FROM CSDATA INTO @DATA(ld_stzu_lock_user). | ||||
| "SELECT single TPLNR FROM TPST INTO @DATA(ld_etplnr). | ||||
| DATA(ld_etplnr) | = ' '. | |||
| "SELECT single XFELD FROM CSDATA INTO @DATA(ld_stzu_lock_syst). | ||||
| "SELECT single TRTYP FROM TCS05 INTO @DATA(ld_etrtyp). | ||||
| "SELECT single UNAME FROM SY INTO @DATA(ld_stzu_lock_uname). | ||||
| "SELECT single WERKS FROM TPST INTO @DATA(ld_ewerks). | ||||
| DATA(ld_ewerks) | = ' '. | |||
Search for further information about these or an SAP related objects