Application Development 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: 

Dynamically changing the properties in module pool.

maltesh0188
Participant
0 Kudos
  • Hi EXPERTS, *

I have a doubt, in module pool programming if we want to change the properties of the screen elements based on the radio button choice,

i know i have to enable or disable textbox in PBO but what if the textbox is a manditory, can i change or remove the manditory property...??

Thanks In AdV.

3 REPLIES 3

former_member1245113
Active Contributor
0 Kudos

Hi,

If your Issue is resolved, Close this threas so that who search for similar Issue will get their Issues Resolves as well.

in PBO.

module status_0100.
" Go to SE11 and enter SCREEN and Choose Display to check the Fields of this Structure.
in program.
module status_0100.
loop at screen.
if screen-name = 'SCREEN_FIELD_NAME'.
screen-required = 0. " Means Not mandator or if eq 1 then Mandatory
modify screen.
endif.
endloop.
endmodule.

Cheerz

Ram

former_member628395
Active Participant
0 Kudos

Hi,

You can loop at SCREEN and modify the propertis based on the requirements. In the loop check the NAME of the screen control you want to modify properties for and set the new properties.

Dont forget to use the MODIFY SCREEN statement.

Regards,

Sagar

Former Member
0 Kudos

Say if you have this parameters in the report

define group id's for the fields you want to add visible and hide properties.

Here S1 for field1 and S2 for field2.

and now

in the pbo block

if p_radio eq 'X'.

loop at screen.

if screen-group1 = 'S1'.

screen-active = 0.

modify screen.

endif.

endloop.

endif.

if p_radio1 eq 'X'.

loop at screen.

if screen-group1 = 'S2'.

screen-active = 0.

modify screen.

endif.

endloop.

endif.

This will do according to the radio button user press.

I hope it helps.

Regards and best wishes.