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

enable / disable a button when changing users ?

hello people

I have a webdynpro component, I have a view that I have 3 buttons - delete, save, add

I have 2 users using this view,

How can I make the first user buttons to be active and on the other to be disabled ?

😊

regards,

Daniel

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 19, 2013 at 11:41 PM

    your can bind visibility of button with some attribute in node.

    but as per my understanding you need to activate these button for first user you can create

    1.STATIC attribute in your assistance class and make it set after first user and use this static attribute to set attribute which you bind with button visibilty.

    2. you can set MEMORY ID and use this Memory id to set attribute value .

    reward if helpful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 20, 2013 at 01:29 AM

    Hello Daniel,

    Create an attribute of type wdy_boolean, Bind this attribute to the visiblity property of all the buttons which you want to make enable for user 1. Now in wddoinit, check which user has logged in accordingly write the code.

    like if sy-uname = ' '.

    wd_context->set_attribute( name = 'name of your wdy_boolean attribute' value = 'abap_true' for enabling.

    .........

    .......

    wd_context->set_attribute( name = 'name of your wdy_boolean attribute' value = 'abap_false' for disabling.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 21, 2013 at 09:59 AM

    Hi Daniel,

    first read the sy-unmae value.

    Assign a attribute type wdy_boolean.

    When sy-uname = "1st user"

    Set the attribute abap true

    else set the attribute abap_false.

    Regards,

    Mangesh Sonawane.

    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.