Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

at selection screen

Former Member
0 Likes
1,048

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,017

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.

9 REPLIES 9
Read only

Former Member
0 Likes
1,018

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.

Read only

0 Likes
1,017

Hi srinavas,

this is not working.

it is showing the same error , before entering the file.

Please exceute and let me know

Read only

0 Likes
1,017

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.

Read only

0 Likes
1,017

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.

Read only

0 Likes
1,017

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.

Read only

Former Member
0 Likes
1,017

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.

Read only

0 Likes
1,017

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

Read only

Former Member
0 Likes
1,017

Hi,

If you do not want this in the At selection screen then write the same code in the start-of-selection

Regards

Sudheer

Read only

Former Member
0 Likes
1,017

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