cancel
Showing results for 
Search instead for 
Did you mean: 

VIEW UI elements

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (2)

Answers (2)

sahai
Contributor
0 Kudos

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

Former Member
0 Kudos

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.