Skip to Content
author's profile photo Former Member
Former Member

How to hide a checkbox thru code in Web UI?

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 09, 2013 at 09:21 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 26, 2013 at 06:13 AM

    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.


    scn1.jpg (19.4 kB)
    scn2.jpg (63.4 kB)
    scn3.jpg (153.8 kB)
    scn4.jpg (161.3 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 28, 2013 at 11:10 AM

    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,

    @Harish Kumar

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.