‎2012 Jun 04 11:35 AM
Hi Experts,
i have a dialog screen with 2 radio buttons.
When i select the first radio button, field1 should be shown to me to enter a value.
When i select the first radio button, another field, say field2 should be shown to me to enter a value and field1 should be hidden.
I have done similar tasks for normal report selection screens using modif-id and field groups.
How to accomplish this task in dialog programming??
‎2012 Jun 04 11:41 AM
Hi
Give your radio buttons a function key for use in user_command.
Check the ok_code returned and then you can loop at screen set the visible component active or inactive for the field dependent on which radio button is active.
Hope this helps.
Vic
‎2012 Jun 04 12:00 PM
Hi,
In report you can achieve using is AT SELECTION SCREEN OUTPUT,but in case of dailog you need to write logic in PBO of the current screen within loop at screen ,,,,endloop.
in PAI create variable like
data:pressed type sy-ucomm.
in PAI...
module PAI_DEMO
pressed = sy-comm.
endmodule.
in PBO.
loop at screen.
case pressed.
when 'VAL'.
if screen-name = 'val'.
screen-input = 1.
else.
screen-input = 0.
when 'VAL1.
if screen-name = 'val1'.
screen-input = 1.
else.
screen-input = 0.
endloop.
.
Thank and regards
‎2012 Jun 05 7:16 AM
Thanks Vic and Lingaraj for your inputs. My issue is resolved.