Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Remove role or user from position

mmanara
Explorer
0 Kudos

Hi all,

we are on ECC 6.0; we are using indirect role assignment. We looking for a way to automate the removing of a user (US) or role (AG) from a position (S).

eg. remove user 123456 from position 50000001 and user 654321 from position 50000002 in one shot.

We have found the standard SAP program RHRHDC00 (RE_RHRHDC00 transaction) but is not designed for doing that.

There's another standard program/function or... for solve this matters?

Many thanks.

Massimo

1 ACCEPTED SOLUTION

Former Member
0 Kudos

We looking for a way to automate the removing of a user (US) or role (AG) from a position (S).

There is a report called RHGRENZ2 which can be used to delimit specific OM infotypes (like IT1001- Relationships) specifying the end-date and Position ID (Object Type S and Object ID= Position) manually. In your case, I believe IT1001's Relationship A008 and B007 have to be delimited in order to remove a user (US) or role (AG) from a position (S) but this report cannot be run for specific relationship types of IT1001 (atleast I did never find an option to filter based on relationship types).

You can try using report RHRHDL00 to delete IT1001 relationships from PP Database but you should consider the consequences of such deletions and restrict the selection based in infotypes and relationship types carefully.

Alternatively, you can also build a LSMW script to automate the process of mass delimit/deletion of IT1001's relationship types using transaction PP02 (PP01 is not compatible to BDC/background processing)

Thanks

Sandipan

5 REPLIES 5

Former Member
0 Kudos

When reading the documentation you must have skipped the parts on RHPROFL0?

Oops, did not read the question properly...

Cheers,

Julius

Edited by: Julius Bussche on Jan 30, 2011 2:56 PM

mvoros
Active Contributor
0 Kudos

Hi,

you need to delete infotype 1001 to remove relation between two objects. You can use FM RH_DELETE_INFTY for this (check ABAP documentation for this FM). You need to identify all records in table HRP1001 and then pass these records to this FM. Just be careful about locking and so on. If you want to take a look how it is done in PPOME then check routine DELETE_REL in include LRHGBF17. The most important parts are calling RH_ENQUEUE_LIST to lock all relevant objects and then RH_DELETE_INFTY to delete infotypes. Unfortunately, I don't know any suitable BAPI for this.

Cheers

Former Member
0 Kudos

Unfortunately, I don't know any suitable BAPI for this.

RH_xxxxxx_INFTY's are released for customer use and documented though, so I think it is safe to call it locally or create a wrapper function for it which is RFC enabled.

Anyway, the delete FM and the HRP1001 table both have about 150 where-used references each, so it is likely that there is some report or function for this which is not in PPOME's UI. I didn't look further.

Cheers,

Julius

0 Kudos

Thanks at all.

I belive that the only solution is developing a custom report for mass remove user or role from position.

With transaction PP02 (with script) is not possible remove a specif user (when at one position are linked several users), same behavior with others two standard report, more similar at RHRHDC00.

Then is not possible automate them for solve our issue.

Many thanks.

Massimo

Edited by: Massimo Manara on Jan 31, 2011 11:38 AM.

Edited by: Massimo Manara on Jan 31, 2011 11:39 AM

Former Member
0 Kudos

We looking for a way to automate the removing of a user (US) or role (AG) from a position (S).

There is a report called RHGRENZ2 which can be used to delimit specific OM infotypes (like IT1001- Relationships) specifying the end-date and Position ID (Object Type S and Object ID= Position) manually. In your case, I believe IT1001's Relationship A008 and B007 have to be delimited in order to remove a user (US) or role (AG) from a position (S) but this report cannot be run for specific relationship types of IT1001 (atleast I did never find an option to filter based on relationship types).

You can try using report RHRHDL00 to delete IT1001 relationships from PP Database but you should consider the consequences of such deletions and restrict the selection based in infotypes and relationship types carefully.

Alternatively, you can also build a LSMW script to automate the process of mass delimit/deletion of IT1001's relationship types using transaction PP02 (PP01 is not compatible to BDC/background processing)

Thanks

Sandipan