Problem or general requirement statement
* Is necessary to parametrize a parameter of the selection screen to use an internal table as search help.
Cause of the problem or requirement
* The parameter must be limited for some values, this values can be parametrized into a transparent table or limited for other parameters.
Solution Proposal Outline
* Implement the [parameter] in SELECTION SCREEN section.
*** Declare a type standard table same to the source values to display into the search help, example:
data: gt_values_to_display type [SOURCE TABLE].
* Implement the sentence "at SELECTION-SCREEN on VALUE-REQUEST FOR [parameter]".
*** Into this section create a new perform and subroutine, example "F_GET_VALUES".
*** Into the new form (F_GET_VALUES) declare the following table and structure as local.
data: lt_return_value type standard table of DDSHRETVAL, ls_return_value type DDSHRETVAL.
*** Implement the data selection to fill the internal table GT_VALUES_TO_DISPLAY according to your requirements, example:
SELECT
FIELD1 FIELD2 FIELD3 FIELD4
INTO TABLE GT_VALUES_TO_DISPLAY
FROM [TABLE]
WHERE [CONDITIONS]
*** This will fill the internal table
*** Call the Function module "F4IF_INT_TABLE_VALUE_REQUEST", example:
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'FIELD4'
WINDOW_TITLE = [text-tit] " ==> Text definition for pop up screen title
VALUE_ORG = 'S'
TABLES
VALUE_TAB = GT_VALUES_TO_DISPLAY
RETURN_TAB = LT_RETURN_VALUE
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
IF SY-SUBRC = 0.
READ TABLE LT_RETURN_VALUE INTO LS_RETURN_VALUE INDEX 1.
IF SY-SUBRC = 0.
[parameter] = LS_RETURN_VALUE-FIELDVAL,
ENDIF.
ENDIF.
*** With those instructions you will set the data to display, enable search help for parameter and set the selected value.