‎2010 Feb 09 10:53 AM
Hi Experts,
I have a reqirement, where I need to upload a file through Query program. But to upload file, when I am writing the following code to locate file name,
SELECTION-SCREEN BEGIN OF BLOCK main.
PARAMETERS p_file TYPE rlgrap-filename OBLIGATORY." OBLIGATORY.
SELECTION-SCREEN END OF BLOCK main.
AT SELECTION SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
IMPORTING
file_name = p_file.
It is throwing a dump because AT SELECTION SCREEN cannot be used in SAP Query. If I manually write the whole path in the parameter that i have declared, then everything is working fine. Issue is just to locate file. Is there any way to achieve the same. Any help on this will be highly appreciated.
Thanks & Regards
Rocky
‎2010 Feb 09 12:25 PM
Hi Rocky,
only paramters defined in infoset can be used for Event AT SELECTION SCREEN.
Try to call function 'F4_FILENAME' after exectuing the report after START-OF-SELECTION.
regards
REA
‎2010 Feb 09 3:08 PM
Hi,
Thanks for responding. Can you explain it. it is not clear to me. I wrote the code in the 'Data read program' tab in infoset.
Here AT SELECTION SCREEN or START OF SELECTION event is not allowed.
Thanks & Regards
Rocky
‎2010 Feb 09 4:25 PM
Hi Rocky,
you dont have to declare selection-Screen etc.
Within your infoset you have to:
1. tab selections: declare parameter p_file
2. tab code: choose coding section "at selection-screen" for p_file and insert your function call
regards
rea
Edited by: Ramy EL-ARNAOUTY on Feb 9, 2010 5:35 PM