cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Org ID based on User ID

former_member184741
Active Contributor
0 Kudos

Hi Folks,

I would like to get the org unit ID to which user is assigned using user id or BP no of the user. I want to do it by selecting from database tables and not from using function modules. Are there any tables to achieve this?

thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member184741
Active Contributor
0 Kudos

ok  what i found out was there is a field called SOBID, we can give userid there and get the central person ID , give the CP id in SOBID again and get the position ID,  now give the position id in SOBID and get the Ordg ID.

Answers (1)

Answers (1)

former_member208675
Active Contributor
0 Kudos

Hi,

Check tables: HRP1001 & HRV5500A.

As well FM: BBP_OM_STRUC_GET_USER_FROM_ORG can be used.

Regards,

former_member184741
Active Contributor
0 Kudos

these tables does not have required information and I am aware of the FM yo had mentioned

laurent_burtaire
Active Contributor
0 Kudos

Hello Sanakara,

as written by Vinay, if you want to get Org ID using user ID through table, then HRP1001 is the good one.

Populate UNAME with your used ID and SUBTY with B003 (be carefull with start and end dates). Then, in OBJID, you will get Org. ID.

Regards.

Laurent.

former_member184741
Active Contributor
0 Kudos

I think the UNAME field represnts the ID of the last changed by user, not the user who is assigned to the org unit

laurent_burtaire
Active Contributor
0 Kudos

Hello,

so, use SOBID field but with user's position ID and with SCLAS = 'S' (position) and SUBTY = 'B003'.

You will get user's position using BBP_OM_STRUC_GET_POS_FROM_USER function module.

Use RH_GET_ACTIVE_WF_PLVAR function module to get active PLVAR.

Regards.

Laurent.