cancel
Showing results for 
Search instead for 
Did you mean: 

RPM - find authorizations for item in ABAP

Former Member
0 Kudos

Hi Experts,

I have an issue.

I am italian and I am not very good on writing in english, I am sorry for this.

I must hide a field (STATUS for item dashboard) for some users (tab. Authorizations).

I have write my code in class /RPM/OBJECT_SERVICES, method GET_FIELD_INFO.

I need to find FM or tables to read the authorizated user for a specificated item.

Can you help me?

Thanks in advance.

Vanessa

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vanessa,

You can use table ACO_USER in PPM backend to find authorizations assigned to a user, where in the table

User Id is username and Object category is 'DPO' for cProjects authorizations

and 'RIH' for Item authorizations and Object Id defines the corresponding GUID of the cProject or Item.

I hope it will help you.

Thanks

Anjali !!

Former Member
0 Kudos

Hi!

Your information son been precious.

E' own the table that I tried.

They have succeeded!Thanks!

In the event it can be useful to others, here the code:

METHOD /rpm/if_ex_item_api~item_ui_config_modify.

DATA ls_field_description LIKE LINE OF ct_field_description.

DATA lo_activity TYPE aco_actvt.

**DEBUG!!! - inizio

    • DATA lo_exit.*

***

    • DO.*

    • IF lo_exit = 'X'.*

    • EXIT.*

    • ENDIF.*

    • ENDDO.*

**DEBUG!!! - fine

LOOP AT ct_field_description INTO ls_field_description WHERE fieldname EQ 'STATUS'.

SELECT SINGLE activity

FROM aco_user

INTO lo_activity

WHERE object_id = is_item_attributes-guid

AND user_id = sy-uname

AND type = 'RIH'. "Item

IF lo_activity = 'Write'.

MOVE 'X' TO ls_field_description-enabled.

MOVE 'X' TO ls_field_description-visible.

MOVE 'X' TO ls_field_description-required.

MOVE ' ' TO ls_field_description-read_only.

MODIFY ct_field_description FROM ls_field_description.

ENDIF.

ENDLOOP.

ENDMETHOD.

Answers (0)