SAP BOM_SELECT_NEXT_DATA Function Module for NOTRANSL: SFA-Extraktor (BOM) : Blockweise Datenselektion
BOM_SELECT_NEXT_DATA is a standard bom select next data 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: SFA-Extraktor (BOM) : Blockweise Datenselektion 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 bom select next data FM, simply by entering the name BOM_SELECT_NEXT_DATA into the relevant SAP transaction such as SE37 or SE38.
Function Group: CSFA
Program Name: SAPLCSFA
Main Program: SAPLCSFA
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function BOM_SELECT_NEXT_DATA 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 'BOM_SELECT_NEXT_DATA'"NOTRANSL: SFA-Extraktor (BOM) : Blockweise Datenselektion.
IMPORTING
LASTBLOCK = "
STATUS = "
COMPLETE_RECORD_NUMBER = "
COMPLETE_BLOCK_NUMBER = "
OUT_BOM = "
TABLES
* OUT_MAST = "
* OUT_STKO = "
* OUT_STAS = "
* OUT_STPO = "
* OUT_DOST = "
* OUT_EQST = "
* OUT_KDST = "
* OUT_PRST = "
* OUT_STST = "
* OUT_TPST = "
* OUT_CLST = "
* OUT_STZU = "
EXCEPTIONS
STATUS_ERROR = 1 WRONG_ID_KEYS = 2 NEXT_ID_ERROR = 3 LASTBLOCK_SENT = 4 COND_ERROR = 5
EXPORTING Parameters details for BOM_SELECT_NEXT_DATA
LASTBLOCK -
Data type: DATATYPE-CHAR0001Optional: No
Call by Reference: No ( called with pass by value option)
STATUS -
Data type: DATATYPE-INTEGER1Optional: No
Call by Reference: No ( called with pass by value option)
COMPLETE_RECORD_NUMBER -
Data type: DATATYPE-INTEGER4Optional: No
Call by Reference: No ( called with pass by value option)
COMPLETE_BLOCK_NUMBER -
Data type: DATATYPE-INTEGER4Optional: No
Call by Reference: No ( called with pass by value option)
OUT_BOM -
Data type: CSFA_BOM_DATA_TABOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BOM_SELECT_NEXT_DATA
OUT_MAST -
Data type: MASTOptional: Yes
Call by Reference: No ( called with pass by value option)
OUT_STKO -
Data type: STKOOptional: Yes
Call by Reference: No ( called with pass by value option)
OUT_STAS -
Data type: STASOptional: Yes
Call by Reference: No ( called with pass by value option)
OUT_STPO -
Data type: STPOOptional: Yes
Call by Reference: No ( called with pass by value option)
OUT_DOST -
Data type: DOSTOptional: Yes
Call by Reference: No ( called with pass by value option)
OUT_EQST -
Data type: EQSTOptional: Yes
Call by Reference: No ( called with pass by value option)
OUT_KDST -
Data type: KDSTOptional: Yes
Call by Reference: No ( called with pass by value option)
OUT_PRST -
Data type: PRSTOptional: Yes
Call by Reference: No ( called with pass by value option)
OUT_STST -
Data type: STSTOptional: Yes
Call by Reference: No ( called with pass by value option)
OUT_TPST -
Data type: TPSTOptional: Yes
Call by Reference: No ( called with pass by value option)
OUT_CLST -
Data type: CLSTOptional: Yes
Call by Reference: No ( called with pass by value option)
OUT_STZU -
Data type: STZUOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
STATUS_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_ID_KEYS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NEXT_ID_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LASTBLOCK_SENT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
COND_ERROR - Error in the selection criteria
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BOM_SELECT_NEXT_DATA 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: | ||||
| lt_out_mast | TYPE STANDARD TABLE OF MAST, " | |||
| lv_lastblock | TYPE DATATYPE-CHAR0001, " | |||
| lv_status_error | TYPE DATATYPE, " | |||
| lt_out_stko | TYPE STANDARD TABLE OF STKO, " | |||
| lt_out_stas | TYPE STANDARD TABLE OF STAS, " | |||
| lt_out_stpo | TYPE STANDARD TABLE OF STPO, " | |||
| lv_status | TYPE DATATYPE-INTEGER1, " | |||
| lt_out_dost | TYPE STANDARD TABLE OF DOST, " | |||
| lv_wrong_id_keys | TYPE DOST, " | |||
| lt_out_eqst | TYPE STANDARD TABLE OF EQST, " | |||
| lv_next_id_error | TYPE EQST, " | |||
| lv_complete_record_number | TYPE DATATYPE-INTEGER4, " | |||
| lt_out_kdst | TYPE STANDARD TABLE OF KDST, " | |||
| lv_lastblock_sent | TYPE KDST, " | |||
| lv_complete_block_number | TYPE DATATYPE-INTEGER4, " | |||
| lv_out_bom | TYPE CSFA_BOM_DATA_TAB, " | |||
| lt_out_prst | TYPE STANDARD TABLE OF PRST, " | |||
| lv_cond_error | TYPE PRST, " | |||
| lt_out_stst | TYPE STANDARD TABLE OF STST, " | |||
| lt_out_tpst | TYPE STANDARD TABLE OF TPST, " | |||
| lt_out_clst | TYPE STANDARD TABLE OF CLST, " | |||
| lt_out_stzu | TYPE STANDARD TABLE OF STZU. " |
|   CALL FUNCTION 'BOM_SELECT_NEXT_DATA' "NOTRANSL: SFA-Extraktor (BOM) : Blockweise Datenselektion |
| IMPORTING | ||
| LASTBLOCK | = lv_lastblock | |
| STATUS | = lv_status | |
| COMPLETE_RECORD_NUMBER | = lv_complete_record_number | |
| COMPLETE_BLOCK_NUMBER | = lv_complete_block_number | |
| OUT_BOM | = lv_out_bom | |
| TABLES | ||
| OUT_MAST | = lt_out_mast | |
| OUT_STKO | = lt_out_stko | |
| OUT_STAS | = lt_out_stas | |
| OUT_STPO | = lt_out_stpo | |
| OUT_DOST | = lt_out_dost | |
| OUT_EQST | = lt_out_eqst | |
| OUT_KDST | = lt_out_kdst | |
| OUT_PRST | = lt_out_prst | |
| OUT_STST | = lt_out_stst | |
| OUT_TPST | = lt_out_tpst | |
| OUT_CLST | = lt_out_clst | |
| OUT_STZU | = lt_out_stzu | |
| EXCEPTIONS | ||
| STATUS_ERROR = 1 | ||
| WRONG_ID_KEYS = 2 | ||
| NEXT_ID_ERROR = 3 | ||
| LASTBLOCK_SENT = 4 | ||
| COND_ERROR = 5 | ||
| . " BOM_SELECT_NEXT_DATA | ||
ABAP code using 7.40 inline data declarations to call FM BOM_SELECT_NEXT_DATA
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 CHAR0001 FROM DATATYPE INTO @DATA(ld_lastblock). | ||||
| "SELECT single INTEGER1 FROM DATATYPE INTO @DATA(ld_status). | ||||
| "SELECT single INTEGER4 FROM DATATYPE INTO @DATA(ld_complete_record_number). | ||||
| "SELECT single INTEGER4 FROM DATATYPE INTO @DATA(ld_complete_block_number). | ||||
Search for further information about these or an SAP related objects