‎2010 Apr 09 6:00 AM
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.
‎2010 Apr 09 6:31 AM
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
‎2010 Apr 09 8:14 AM
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
‎2010 Apr 11 5:03 AM
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.