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

Modify dynpro screen at runtime

aabhas_wilmar
Contributor
0 Likes
603

Hi Experts,

My requirement is to modify the attributes of a screen element (input field) at runtime... I want to enable or disable input based on the a checbox.

I have assigned a function code (OK_CODE) 'LWISE' to checkbox. Whenever user clicks on it it triggers PAI and in the module usercommand I have handled it as follows. SCR1_NPT is the input field.

WHEN 'LWISE'.

LOOP AT SCREEN.

IF screen-name = 'SCR1_NPT'.

BREAK-POINT.

IF scr1_lwisept = 'X'.

screen-input = 0.

screen-required = 0.

MODIFY SCREEN.

ELSE.

screen-input = 1.

screen-required = 1.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

Above code seems to be fine, it also gets in there, make the necessary changes to the SCREEN itab, modifies... but it doesn't reflect on the screen...

Kindly Help.

1 ACCEPTED SOLUTION
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
479

HI,

You need to execute this code in PBO module not in PAI module. So save your ok_code and then check for that in the PBO module and execute this code.

Regards,

Sesh

1 REPLY 1
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
480

HI,

You need to execute this code in PBO module not in PAI module. So save your ok_code and then check for that in the PBO module and execute this code.

Regards,

Sesh