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

Dynamic fields on Module pool Screen

rnb86
Participant
0 Likes
1,325

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??

3 REPLIES 3
Read only

Former Member
0 Likes
613

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

Read only

Former Member
0 Likes
613

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

Read only

rnb86
Participant
0 Likes
613

Thanks Vic and Lingaraj for your inputs. My issue is resolved.