‎2007 Jul 04 6:55 AM
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.
‎2007 Jul 04 7:30 AM
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
‎2007 Jul 04 7:01 AM
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
‎2007 Jul 04 7:01 AM
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
‎2007 Jul 04 7:01 AM
Hi Azad,
Your code works well for my report , as soon as select the radio button r_pdf , p_file becomes visibile.
Regards
Arun
‎2007 Jul 04 7:09 AM
Hi Arun,
But why i have to press enter to see that p_file field.
just guide me .
Thanks.
azad
‎2007 Jul 04 7:14 AM
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
‎2007 Jul 04 7:17 AM
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.
‎2007 Jul 04 7:17 AM
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.
‎2007 Jul 04 7:30 AM
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
‎2007 Jul 04 7:49 AM