This example shows how to program the ON VALUE-REQUEST event on selection screens to allow the F4 key / search help button on a field, instead of letting the default system behavior (none, search help, value table, etc.) In this example, a popup dialog is displayed to show a list of values and it allows the user to select and return a value into the selection screen field.
Error rendering macro 'code': Invalid value specified for parameter 'com.atlassian.confluence.ext.code.render.InvalidValueException'*&---------------------------------------------------------------------* *& Report YKC_SEARCH_HELP *& *&---------------------------------------------------------------------* *&Making Search Help *&Name: Krishna Chauhan (Sparta) Date: 19 Dec 08 *&---------------------------------------------------------------------* REPORT YKC_SEARCH_HELP. *internal table made to populate the value of werks when pressing f4 DATA: BEGIN OF IT_FINAL OCCURS 0, WERKS TYPE MARC-WERKS, END OF IT_FINAL. DATA: IT_RETURN LIKE DDSHRETVAL OCCURS 0 WITH HEADER LINE. PARAMETERS: P_WERKS(10) TYPE C. AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_WERKS. SELECT WERKS FROM MARC INTO TABLE IT_FINAL. CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING * DDIC_STRUCTURE = ' ' RETFIELD = 'WERKS' "field of internal table VALUE_ORG = 'S' TABLES VALUE_TAB = IT_FINAL * FIELD_TAB = RETURN_TAB = IT_RETURN . WRITE IT_RETURN-FIELDVAL TO P_WERKS. REFRESH IT_FINAL.