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: 

Company Code based on User

Former Member
0 Kudos

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

FredericGirod
Active Contributor
0 Kudos

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

FredericGirod
Active Contributor
0 Kudos

Hi,

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

you will have maybe to check authorization

regards

Fred

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

Former Member
0 Kudos

Hi,

Please check if function BAPI_USER_GET_DETAIL may be useful for you.

Regards,

Boris

0 Kudos

Hi,

Do you mean the export company parameter ?

Regards.

Former Member
0 Kudos

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.

raymond_giuseppi
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.


0 Kudos

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

venkateswaran_k
Active Contributor
0 Kudos

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