To provide F4 value help for files on the application server (AL11), the most effective way is to use specific SAP function modules within your ABAP code. Since standard search help doesn't automatically browse application server directories, you must implement the logic in the AT SELECTION-SCREEN ON VALUE-REQUEST event.
/SAPDMC/LSM_F4_SERVER_FILE: This is widely used to open a pop-up that allows users to navigate the SAP AL11 directories and select a file.F4_DXFILENAME_TOPRECURSION: Another standard function module specifically designed for search help on application server files.
p_file), use the following logic in your report:PARAMETERS: p_file TYPE string.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
IMPORTING
serverfile = p_file
EXCEPTIONS
canceled_by_user = 1
OTHERS = 2.- Permissions: Ensure the user has the necessary authorizations (e.g.,
S_DATASET) to access the specific AL11 directory paths. - Directory-only Help: If you only need to select a directory (not a specific file), you can call the program
RSWATCH0or useF4IF_INT_TABLE_VALUE_REQUESTafter fetching directory lists viaEPS_GET_DIRECTORY_LISTING. - Presentation Server Difference: For files on your local PC (Presentation Server), use
CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOGinstead