Skip to Content

VIEW UI elements

Hi, I am new to Web Dynpro ABAP, Pls kindly help me out below requirement.

My requirement is When employee is Login, only he can able to see few UI elements in a VIEW.

If MANAGAER is login, manager can able to see all the UI Elemetns in a VIEW. Pls kindly suggest Where i have to write the code

and Procedure.

Thanks,

Lucky

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2011 at 05:52 AM

    HI

    After designing your layout, in the context define an attribute of the type WDUI_VISIBILITY. Bind the visible property of all your UI that you do not want the employee to see to this attribute you have created.

    If the employee logs in then set this attribute to 1 using the set attribute method.

    If the manager logs in then set this attribute to 2.

    This way if the manager logs in he can see all the fields and few fields are restricted for the empolyee.

    Hope this helps.

    Thanks & Regards,

    Gayathri Shanbhag

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2011 at 06:32 AM

    Hi,

    For this you have to dynamically show/hide the UI elements on the basis of access required for employee/manager. For this below is the link which will help you in approaching to your goal. It has detail explanation with screen shots.

    http://www.saptechnical.com/Tutorials/WebDynproABAP/Hide/Page1.htm

    Hope it will help you.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 25, 2011 at 06:32 AM

    Hi, I am new to Web Dynpro ABAP, Pls kindly help me out below requirement.

    > My requirement is When employee is Login, only he can able to see few UI elements in a VIEW.

    > If MANAGAER is login, manager can able to see all the UI Elemetns in a VIEW. Pls kindly suggest Where i have to write the code

    > and Procedure.

    >

    >

    > Thanks,

    > Lucky

    Hi,

    Create the view having all the ui elements.create an attribute visibility of type wdui_visibility with default value as 1 bind the visibility of the ui elements which you do not want to show the normal empoyee with this attribute and

    , now you can check sy-ucomm if manager do nothing but if it is other than employee then set the value of the attribute with 2.

    This will make it invisible.

    I hope this will resolve your problem, incase of further query please inform

    regards,

    Sahai.S

    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.