Hi
If you have created the F4 help in diciotnary
SELECT-OPTIONS: SO_SEL FOR .... MATCHCODE OBJECT <ZHELP>.
If you need to build it at run time:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR SO_SEL-LOW.
PERFORM MY_F4_HELP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR SO_SEL-HIGH.
PERFORM MY_F4_HELP.
In routine MY_F4_HELP insert the code to manage your search help
U can use fm F4IF_INT_TABLE_VALUE_REQUEST to create a search help at run time.
Max
hi amit,
check the FM 'F4IF_INT_TABLE_VALUE_REQUEST'
DATA: L_RETFIELD TYPE DFIES-FIELDNAME.
DATA: T_FIELD like DFIES occurs 0 with header line,
T_RETURN like DDSHRETVAL occurs 0 with header line.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = L_RETFIELD
TABLES
VALUE_TAB = t_values
FIELD_TAB = t_Field
RETURN_TAB = t_return
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
do reward if it helps,
regards,
priya.
Hi,
Check this sample code and reward points if it helps.
tables kna1.
data:
begin of t_values occurs 2,
value like kna1-begru,
end of t_values,
t_return like ddshretval occurs 0 with header line.
select-options s_begru for kna1-begru.
at selection-screen on value-request for s_begru-low.
refresh t_values.
t_values = 'PAR*'.
append t_values.
t_values = 'UGG'.
append t_values.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'BEGRU'
value_org = 'S'
tables
value_tab = t_values
return_tab = t_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
read table t_return index 1.
s_begru-low = t_return-fieldval.
endif.
Add a comment