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


Related Articles

ABAP4_CALL_TRANSACTION sap function module
BAPI_ALM_ORDER_MAINTAIN sap BAPI / Function Module to create a work order
Function module BAPI_EMPLCOMM_CREATE to maintain the SAP HR communication infotype 0105
CLPB_EXPORT sap function module
CLPB_IMPORT sap function module
CONVERT_DATE_TO_EXTERNAL sap function module
CREATE_TEXT sap function module
CURRENCY_AMOUNT_DISPLAY_TO_SAP sap function module to Convert currency value from display to SAP
CURRENCY_AMOUNT_SAP_TO_DISPLAY FM to Convert currency value from SAP to display
DATE_COMPUTE_DAY sap function module
DATE_TO_DAY sap function module
DOCU_READ sap function module
ENQUEUE_READ sap function module
FILE_GET_NAME sap function module
SAP Application specific function modules
SAP Custom function modules
SAP field conversion function modules
SAP HR specific function modules
SAP development function modules
Retrieve employees address details (own data)
Function Module DYNP_VALUES_UPDATE to Change screen field contents
sxpg_command_execute FM to Execute external commands (FTP Scripts)
DETERMINE_PERIOD FM to Retrieve fiscal year and period
Function module HR_INFOTYPE_OPERATION to maintain SAP HR infotypes
RH_PM_GET_STRUCTURE FM to retrieve HR Organisation Structure
Validate WBS (code used in ME21)
HR_READ_INFOTYPE SAP FM to Read infotype data
READ_TEXT FM to Read SAP texts
ADDR_PERS_COMP_COMM_MAINTAIN to Update sap users email address plus other details (own data)
HR_PERSONAL_WORK_SCHEDULE to Retrieve employees work schedule
NUMBER_GET_NEXT to get next number in number range sap function module
Generate random number using QF05_RANDOM_INTEGER SAP function module within your ABAP code
RSEC_GENERATE_PASSWORD SAP FM to generate user password
The SAP internet user functionality and Password BAPIs
SAPGUI_SET_FUNCTIONCODE sap function module to execute function code
SX_INTERNET_ADDRESS_TO_NORMAL SAP function module to check email format is correct