cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide a checkbox thru code in Web UI?

Former Member
0 Kudos

Hello Gurus,

My requirement is to hide a checkbox based on a condition in web ui. I know how to do this using configuration but i want to hide the checkbox based on a condition which i can check only thru code. Please help me how to achieve this. Are there any built in functions to hide a field in web ui?

Thanks

Lakshman

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello All,

Thanks for you replies. My issue is resolved. Here below is how i have done it.

I need to hide the checkbox if it is not checked when i open a transaction which is already saved. For the new transaction creation, i need to hide.

I have removed the label of the checkbox and put a condition in GET_P to check if the value is X for the checkbox. If the value is not X, it am changing the field type. And to display the label when i need to display the checkbox, i created a dummy attribute to show the label.

THanks

Lakshman

Answers (2)

Answers (2)

former_member188098
Active Contributor
0 Kudos

Hi Lakshman,

In addition to do_config_determination method you can hide/ display fields dynamically in .htm page of views  check doc for this http://scn.sap.com/docs/DOC-29342

Regards,

kutjohn
Active Participant
0 Kudos

Hi Lakshman,

You can create multiple configuration based on UI object and sub objects and then load them dynamically in do_config_determination method.

So you can have two configuration where in one check box is visible and in other where check box is invisible.