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

Regarding Selection Screen

Former Member
0 Likes
934

Hi,

Hi Experts,

i have two radibuttons on selection screen. I want if i select 2nd radibutton a field shud become visible for input. if i select 1st one it shud become disable for input.

i am doing it as below.

it is working fine. but after selecting the particular radio button u have to press enter to see the p_file. can any body guide how can i control it by mouse click.

PARAMETERS: r_print RADIOBUTTON GROUP grp DEFAULT 'X' user-command rusr.

PARAMETERS: r_pdf RADIOBUTTON GROUP grp.

PARAMETERS: p_file TYPE localfile OBLIGATORY MODIF ID DSP.

AT SELECTION-SCREEN output.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'DSP'.

IF r_pdf = 'X'.

SCREEN-ACTIVE = 1.

ELSE.

SCREEN-ACTIVE = 0.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Thanks

Azad.

Its urgent.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
896

hi,

you try with this code....

PARAMETERS: r_print RADIOBUTTON GROUP grp DEFAULT 'X' user-command rusr.
PARAMETERS: r_pdf RADIOBUTTON GROUP grp.
PARAMETERS: p_file TYPE localfile  MODIF ID DSP.

AT SELECTION-SCREEN output.

LOOP AT SCREEN.
IF r_pdf = 'X'.
IF SCREEN-GROUP1 = 'DSP'.
    IF SCREEN-NAME = p_file.

   SCREEN-ACTIVE = 1.
   MODIFY SCREEN.
ELSEIF r_print  = 'X'.
  SCREEN-ACTIVE = 0.
  MODIFY SCREEN.
ENDIF.

ENDIF.
ENDIF.
ENDLOOP.

regards,

Ashok Reddy

9 REPLIES 9
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
896

Hi,

Add the event block AT SELECTION-SCREEN.

And check the FCODE and set a flag and use the flag instead of the radio button or you can as well use the radio button itself.

But AT SELECTION-SCREEN event block is must.

Regards,

Sesh

Read only

Former Member
0 Likes
896

Hi

Change it this way...

AT SELECTION-SCREEN output.

LOOP AT SCREEN.

IF r_pdf = 'X'.

IF SCREEN-NAME = 'P_FILE'.

SCREEN-ACTIVE = 1.

ELSE.

SCREEN-ACTIVE = 0.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Regards

Raj

Message was edited by:

Rajasekhar Dinavahi

Read only

Former Member
0 Likes
896

Hi Azad,

Your code works well for my report , as soon as select the radio button r_pdf , p_file becomes visibile.

Regards

Arun

Read only

0 Likes
896

Hi Arun,

But why i have to press enter to see that p_file field.

just guide me .

Thanks.

azad

Read only

0 Likes
896

Hi Azad,

As i had mentioned in my previous post , i pasted your code and tested it and it worked fine.

What i would suggest , try debugging the program , enter /h in the command box and then seelct the radio button and see what is the flow.

Regards

Arun

Read only

0 Likes
896

Hi Arun,.

I think you r pressing enter or double clicking the mouse. then its working. but if you say on selecting the radiobutton it is displaying that field then its not working at my end.

Thanks

AZAD.

Read only

Former Member
0 Likes
896

hi,

SEE THIS CODE NOW.

PARAMETERS: r_print RADIOBUTTON GROUP grp DEFAULT 'X' user-command rusr.

PARAMETERS: r_pdf RADIOBUTTON GROUP grp.

PARAMETERS: p_file TYPE localfile MODIF ID DSP.

AT SELECTION-SCREEN output.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'DSP'.

IF r_pdf = 'X'.

SCREEN-ACTIVE = 1.

ELSE.

SCREEN-ACTIVE = 0.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

at USER-COMMAND.

CASE SY-UCOMM.

IF r_pdf = 'X'.

SCREEN-ACTIVE = 1.

ELSE.

SCREEN-ACTIVE = 0.

ENDIF.

MODIFY SCREEN.

ENDCASE.

rgda,

bharat.

Read only

Former Member
0 Likes
897

hi,

you try with this code....

PARAMETERS: r_print RADIOBUTTON GROUP grp DEFAULT 'X' user-command rusr.
PARAMETERS: r_pdf RADIOBUTTON GROUP grp.
PARAMETERS: p_file TYPE localfile  MODIF ID DSP.

AT SELECTION-SCREEN output.

LOOP AT SCREEN.
IF r_pdf = 'X'.
IF SCREEN-GROUP1 = 'DSP'.
    IF SCREEN-NAME = p_file.

   SCREEN-ACTIVE = 1.
   MODIFY SCREEN.
ELSEIF r_print  = 'X'.
  SCREEN-ACTIVE = 0.
  MODIFY SCREEN.
ENDIF.

ENDIF.
ENDIF.
ENDLOOP.

regards,

Ashok Reddy

Read only

0 Likes
896

Hi Ashok,

Thanks Buddy.

Its working fine now.

Thanks

Azad.