F4 search help manually called from report selection screenExample code for for calling an SAP F4 search manually from a ABAP report selection screen.
**************************************************************
*Call search help.
DATA: return_tab type STANDARD TABLE OF DDSHRETVAL.
PARAMETERS p_test(10) type c.
************************************************
*AT SELECTION-SCREEN
AT SELECTION-SCREEN on VALUE-REQUEST FOR p_test.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
TABNAME = 'T161' "mandatory - dictionary table type
FIELDNAME = 'BSART' "mandatory - dictionary field type
SEARCHHELP = 'H_T161' "shelp
SHLPPARAM = 'BSART' "field value to return from shelp
TABLES
RETURN_TAB = return_tab
EXCEPTIONS
FIELD_NOT_FOUND = 1
NO_HELP_FOR_FIELD = 2
INCONSISTENT_HELP = 3
NO_VALUES_FOUND = 4
OTHERS = 5.
|
||||||||