SAP VENDOR_SELECT_NEXT_DATA Function Module for Component for block by block reading of the vendor master data









VENDOR_SELECT_NEXT_DATA is a standard vendor 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 Component for block by block reading of the vendor master data 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 vendor select next data FM, simply by entering the name VENDOR_SELECT_NEXT_DATA into the relevant SAP transaction such as SE37 or SE38.

Function Group: WYSE
Program Name: SAPLWYSE
Main Program: SAPLWYSE
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function VENDOR_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 'VENDOR_SELECT_NEXT_DATA'"Component for block by block reading of the vendor master data
IMPORTING
LASTBLOCK = "Last data block has been issued
COMPLETE_RECORD_NUMBER = "Number of processed vendors
COMPLETE_BLOCK_NUMBER = "Number of blocks necessary for the processing

TABLES
* OUT_LFA1_TAB = "Found LFA1 data
* OUT_KNVK_TAB = "Found KNVK data
* OUT_LFB1_TAB = "Found LFB1 data
* OUT_LFM1_TAB = "Found LFM1 data
* OUT_LFBK_TAB = "Found LFBK data
* OUT_LFAS_TAB = "Found LFAS data
* OUT_LFAT_TAB = "Found LFAT data
* OUT_LFB5_TAB = "Found LFB5 data
* OUT_LFBW_TAB = "Found LFBW data
* OUT_WYT3_TAB = "Found WYT3 data

EXCEPTIONS
FUNCTION_MISSING = 1 FUNCTION_CALL_FAILED = 2
.



EXPORTING Parameters details for VENDOR_SELECT_NEXT_DATA

LASTBLOCK - Last data block has been issued

Data type: SEL_FIELDS-READ_FLAG
Optional: No
Call by Reference: No ( called with pass by value option)

COMPLETE_RECORD_NUMBER - Number of processed vendors

Data type: SEL_FIELDS-MAX_LIFNR
Optional: No
Call by Reference: No ( called with pass by value option)

COMPLETE_BLOCK_NUMBER - Number of blocks necessary for the processing

Data type: SEL_FIELDS-MAX_LIFNR
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for VENDOR_SELECT_NEXT_DATA

OUT_LFA1_TAB - Found LFA1 data

Data type: LFA1
Optional: Yes
Call by Reference: No ( called with pass by value option)

OUT_KNVK_TAB - Found KNVK data

Data type: KNVK
Optional: Yes
Call by Reference: Yes

OUT_LFB1_TAB - Found LFB1 data

Data type: LFB1
Optional: Yes
Call by Reference: No ( called with pass by value option)

OUT_LFM1_TAB - Found LFM1 data

Data type: LFM1
Optional: Yes
Call by Reference: No ( called with pass by value option)

OUT_LFBK_TAB - Found LFBK data

Data type: LFBK
Optional: Yes
Call by Reference: Yes

OUT_LFAS_TAB - Found LFAS data

Data type: LFAS
Optional: Yes
Call by Reference: Yes

OUT_LFAT_TAB - Found LFAT data

Data type: LFAT
Optional: Yes
Call by Reference: Yes

OUT_LFB5_TAB - Found LFB5 data

Data type: LFB5
Optional: Yes
Call by Reference: Yes

OUT_LFBW_TAB - Found LFBW data

Data type: LFBW
Optional: Yes
Call by Reference: Yes

OUT_WYT3_TAB - Found WYT3 data

Data type: WYT3
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

FUNCTION_MISSING - Initialization component was not called

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FUNCTION_CALL_FAILED - Function module call error

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for VENDOR_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:
lv_lastblock  TYPE SEL_FIELDS-READ_FLAG, "   
lt_out_lfa1_tab  TYPE STANDARD TABLE OF LFA1, "   
lv_function_missing  TYPE LFA1, "   
lt_out_knvk_tab  TYPE STANDARD TABLE OF KNVK, "   
lt_out_lfb1_tab  TYPE STANDARD TABLE OF LFB1, "   
lv_function_call_failed  TYPE LFB1, "   
lv_complete_record_number  TYPE SEL_FIELDS-MAX_LIFNR, "   
lt_out_lfm1_tab  TYPE STANDARD TABLE OF LFM1, "   
lv_complete_block_number  TYPE SEL_FIELDS-MAX_LIFNR, "   
lt_out_lfbk_tab  TYPE STANDARD TABLE OF LFBK, "   
lt_out_lfas_tab  TYPE STANDARD TABLE OF LFAS, "   
lt_out_lfat_tab  TYPE STANDARD TABLE OF LFAT, "   
lt_out_lfb5_tab  TYPE STANDARD TABLE OF LFB5, "   
lt_out_lfbw_tab  TYPE STANDARD TABLE OF LFBW, "   
lt_out_wyt3_tab  TYPE STANDARD TABLE OF WYT3. "   

  CALL FUNCTION 'VENDOR_SELECT_NEXT_DATA'  "Component for block by block reading of the vendor master data
    IMPORTING
         LASTBLOCK = lv_lastblock
         COMPLETE_RECORD_NUMBER = lv_complete_record_number
         COMPLETE_BLOCK_NUMBER = lv_complete_block_number
    TABLES
         OUT_LFA1_TAB = lt_out_lfa1_tab
         OUT_KNVK_TAB = lt_out_knvk_tab
         OUT_LFB1_TAB = lt_out_lfb1_tab
         OUT_LFM1_TAB = lt_out_lfm1_tab
         OUT_LFBK_TAB = lt_out_lfbk_tab
         OUT_LFAS_TAB = lt_out_lfas_tab
         OUT_LFAT_TAB = lt_out_lfat_tab
         OUT_LFB5_TAB = lt_out_lfb5_tab
         OUT_LFBW_TAB = lt_out_lfbw_tab
         OUT_WYT3_TAB = lt_out_wyt3_tab
    EXCEPTIONS
        FUNCTION_MISSING = 1
        FUNCTION_CALL_FAILED = 2
. " VENDOR_SELECT_NEXT_DATA




ABAP code using 7.40 inline data declarations to call FM VENDOR_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 READ_FLAG FROM SEL_FIELDS INTO @DATA(ld_lastblock).
 
 
 
 
 
 
"SELECT single MAX_LIFNR FROM SEL_FIELDS INTO @DATA(ld_complete_record_number).
 
 
"SELECT single MAX_LIFNR FROM SEL_FIELDS INTO @DATA(ld_complete_block_number).
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!