SAP Help F4IF_INT_TABLE_VALUE_REQUEST is used to display an ABAP internal table as a F4 search help
F4IF_INT_TABLE_VALUE_REQUEST sap function module
The below code shows how function module F4IF_INT_TABLE_VALUE_REQUEST is used to display a basic ABAP internal table as an SAP search help. The users selection is then passed into a selection screen parameter.
*&-------------------------------------------------------------**& Report ZTAB_SHELP * *&-------------------------------------------------------------* *& Created by SAP Development * *& * *& Display itab as search help * *& ................................... * *& The basic requirement for this demo is to display a number * *& of fields from the EKKO table as a search help using * *& SAP function module F4IF_INT_TABLE_VALUE_REQUEST. * *&-------------------------------------------------------------* REPORT ZTAB_SHELP. parameters: p_ebeln type ekko-ebeln. TYPES: BEGIN OF t_ekko, ebeln TYPE ekpo-ebeln, ebelp TYPE ekpo-ebelp, statu TYPE ekpo-statu, aedat TYPE ekpo-aedat, matnr TYPE ekpo-matnr, menge TYPE ekpo-menge, meins TYPE ekpo-meins, netpr TYPE ekpo-netpr, peinh TYPE ekpo-peinh, END OF t_ekko. DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0, wa_ekko TYPE t_ekko, it_return type STANDARD TABLE OF DDSHRETVAL, wa_return like line of it_return. ************************************************************** *at selection-screen at selection-screen on value-request for p_ebeln. select * up to 10 rows from ekko into CORRESPONDING FIELDS OF TABLE it_ekko. CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING * DDIC_STRUCTURE = 'EKKO' RETFIELD = 'EBELN' * PVALKEY = ' ' * DYNPPROG = sy-repid * DYNPNR = sy-dynnr * DYNPROFIELD = 'EBELN' * STEPL = 0 WINDOW_TITLE = 'Ekko Records' * VALUE = ' ' VALUE_ORG = 'S' * MULTIPLE_CHOICE = 'X' "allows you select multiple entries from the popup * DISPLAY = ' ' * CALLBACK_PROGRAM = ' ' * CALLBACK_FORM = ' ' * MARK_TAB = * IMPORTING * USER_RESET = ld_ret TABLES VALUE_TAB = it_ekko * FIELD_TAB = lt_field RETURN_TAB = it_return * DYNPFLD_MAPPING = EXCEPTIONS PARAMETER_ERROR = 1 NO_VALUES_FOUND = 2 OTHERS = 3. READ TABLE it_return into wa_return index 1. p_ebeln = wa_return-fieldval.
Check out sap documentation and pattern details for f4if_int_table_value_request sap function module on website se80.co.uk