Application Development and Automation 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: 
Read only

Company Code based on User

Former Member
0 Likes
17,342

Hi all,

i want to know which user belong to which company code.Which table i should use?

I have a list of users name with me.

Help me.

Thanks & Regards

Munu

1 ACCEPTED SOLUTION
Read only

FredericGirod
Active Contributor
0 Likes
7,808

Hi,

there is no table for this (I don't speak about HR)

you will have maybe to check authorization

regards

Fred

10 REPLIES 10
Read only

FredericGirod
Active Contributor
0 Likes
7,809

Hi,

there is no table for this (I don't speak about HR)

you will have maybe to check authorization

regards

Fred

Read only

7,808

I agree Fred, but even with authoristion there is the potential to 'belong' to multiple Company Codes, or within certain module not have Company Code authorisation at all.

The problem is that (as you say, outside of HR) the concept of a user belonging to a company code does not exist in the system.

Regards,

Nick

Read only

Former Member
0 Likes
7,808

Hi,

Please check if function BAPI_USER_GET_DETAIL may be useful for you.

Regards,

Boris

Read only

0 Likes
7,808

Hi,

Do you mean the export company parameter ?

Regards.

Read only

Former Member
0 Likes
7,808

Hi,

User means which task you are using .

SU01D ,User display . we wont get there user company code. there is no table to get these

combination.

Check users implies as   cusotmer , vendor ...in our data.

let me know if im wrong...

thanks.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
7,808

The "company code" displayed with SU01/SU01D is only a (list of) address, so wont be of much help if there is no strict rule to create those address.

Else you could check with HR Infotype 105 or similar Infortype to link user id (check with functional) and then Infotype 001 to get company code.

Regards,

Raymond

Read only

Former Member
0 Likes
7,808

Hi Munu,

You may get Personal number with USR21 if maintained. And with Personal number you can get company code from table PA0001.

Thanks,

Chirdip

Read only

Former Member
0 Likes
7,808

Hi All,

Thanks for all your replies.

Actually I have a list of user (usr02-bname) and i have to display that this users belong to this company code(s).

For that how to connect this two.

If we can achieve this by authorization/roles, then how?

Help me.


Read only

0 Likes
7,808

You should start asking BC and HR team for the procedure used in creation of users/employee, that would give you the hints required, this can vary from company to company, so no "absolute" answer.

Regards,

Raymond

Read only

venkateswaran_k
Active Contributor
0 Likes
7,808

Hi

Can you please check the tables  USRM1,  USRMM

These tables have Userid and Company code relations..

Or

From PA0001 table and you can find the Personnel numbers (Pernr) by company code. From the Pernr you can find the user id from infotype PA0105.

PS:  (From USRM1 table   .... you can get atleast plant (werks) of the User..  From plant you can get the company code)

Regards,

Venkat