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

reg: screen attributes

Former Member
0 Likes
675

Hi ,

I want to change the screen attributes in my dialog program like we do in standard selection screen .

I have 2 radiobuttons and 2 fields in my custom screen and when I select the first radio button 1st field must be enabled when I select 2nd radiobutton the 2nd field must be enabled and 1st must be grayed out

I wrote the code in the following way

my data declarations

DATA : field1(10) , field2(10), r1 VALUE 'X', r2.

MODULE user_command_0343 INPUT.

LOOP AT SCREEN.

IF r1 = 'X' AND screen-group1 = 'G2'.

screen-input = 0.

MODIFY SCREEN.

ELSEIF r2 = 'X' AND screen-group1 = 'G1'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

CASE sy-ucomm.

WHEN 'CANCEL'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE.

In my screen I put the modif ids for fields in the Group1 of rescpetive fields

regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
650

Hi,

"Loop at screen.

....

....

endloop"

you have writen above code in PAI module, but u have to write it in any PBO module.. i m sure it will work for u..

Regards,

Meet

5 REPLIES 5
Read only

Former Member
0 Likes
650

Use

Assign USER-COMMAND (let ir br ACT) to your radio button group & use this code

LOOP AT SCREEN.

IF r1 = 'X' AND screen-group1 = 'G2'.

screen-input = 0.

MODIFY SCREEN.

ELSEIF r2 = 'X' AND screen-group1 = 'G1'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

below case sy-ucomm when 'ACT'

Read only

0 Likes
650

sorry I forgot to mention I already assigned the User command Ucomm for the radio button group

Read only

Former Member
0 Likes
650

Hi there,

We have a standard demo program

demo_dynpro_check_radio in se38

Please check the code in th same to learn more

Regards

Byju

Read only

Former Member
0 Likes
651

Hi,

"Loop at screen.

....

....

endloop"

you have writen above code in PAI module, but u have to write it in any PBO module.. i m sure it will work for u..

Regards,

Meet

Read only

0 Likes
650

thank you Meet Gohel

solved my problem

regards