‎2008 Feb 22 11:34 AM
Hi
I am having 2 parameters in selection screen
P _down as checkbox,
p_file as file name.
I need to check if i selected the checkbox then if the file is initial, it should throw error message .
But here in selection screen when i click the checkbos itself it is showing eror message before execute F8.
Anybody help me this is urgent
at selection-screen.
IF p_dl EQ 'X'.
if p_file is inital.
MESSAGE e001 WITH 'File is initial'.
ENDIF.
ENDIF
‎2008 Feb 22 11:37 AM
Write the below ..
at selection-screen.
IF sy-ucomm = 'ONLI'. <-- add this .. this will be executed only if U
press F8
IF p_dl EQ 'X'.
if p_file is inital.
MESSAGE e001 WITH 'File is initial'.
ENDIF.
ENDIF
ENDIF.
‎2008 Feb 22 11:37 AM
Write the below ..
at selection-screen.
IF sy-ucomm = 'ONLI'. <-- add this .. this will be executed only if U
press F8
IF p_dl EQ 'X'.
if p_file is inital.
MESSAGE e001 WITH 'File is initial'.
ENDIF.
ENDIF
ENDIF.
‎2008 Feb 22 11:43 AM
Hi srinavas,
this is not working.
it is showing the same error , before entering the file.
Please exceute and let me know
‎2008 Feb 22 11:51 AM
It is not showing any error in my system ..
parameters : P_down as checkbox,
p_file like rlgrap-filename..
at selection-screen.
IF sy-ucomm = 'ONLI'.
IF p_down EQ 'X'.
if p_file is initial.
MESSAGE e001 WITH 'File is initial'.
ENDIF.
ENDIF.
ENDIF.
‎2008 Feb 22 12:08 PM
Hi all,
Thank you for everone in helping in solving this ,
but in the same code i am checking for file type to XLs.
Whereas i aa trying to pick the only file type XLS last 3 characters .
But here it is not picking through split command, will help me in this please
IF sy-ucomm = 'ONLI'.
IF p_dl EQ 'X'.
IF NOT p_file IS INITIAL.
SPLIT p_file AT gv_delimiter INTO gv_type gv_file1.
IF gv_type NE 'XLS'.
MESSAGE e001 WITH 'File Type is not Excel File'(e12).
ENDIF.
ELSE.
MESSAGE e001 WITH 'Enter the File'.
ENDIF.
ENDIF.
ENDIF.
‎2008 Feb 22 12:15 PM
data : gv_delimiter type c value '.'.
data : gv_file1(50), gv_type(3).
I think you need to write the statement as and check for the
data declarations ...
SPLIT p_file AT gv_delimiter INTO gv_file1 gv_type.
‎2008 Feb 22 11:37 AM
Hi,
If you want the program to check your condition after pressing F8 then you move the code you have written to START-OF-SELECTION. so that after pressing F8 it will check the condition.
Regards,
Yellappa.
‎2008 Feb 22 11:46 AM
sorry not at F8, but it has to show at selection screen itself .
where here if check the checkbox itself it is throwing error before enter the file name.
will you pls help me now
‎2008 Feb 22 11:37 AM
Hi,
If you do not want this in the At selection screen then write the same code in the start-of-selection
Regards
Sudheer
‎2008 Feb 22 11:46 AM
The only reason i feel could be something is wrong in the declaration of the check box. Have you assigned a user-command while declaring the checbox like
parameter: p_dl as checkbox user-command <ucom>.If thats the case, then in the AT SELECTION-SCREEN event, do the following.
AT SELECTION-SCREEN.
IF SY-UCOMM NE <ucom>.
IF p_dl EQ 'X'.
IF p_file is inital.
MESSAGE e001 WITH 'File is initial'.
ENDIF.
ENDIF
ENDIF..
Hope this helps.
Thanks,
Balaji
Edited by: Balaji Ganapathiraman on Feb 22, 2008 5:17 PM