on 03-21-2006 10:55 AM
hi,
<b>i need to get the SAP-User (Table USR02) from Partner (table BUT000).</b>
i have searched the forum for "partner user" and found the thread: "Business partner relationships -- "Is Identical To"
in fact I want to spend points for helpful answers, that is why I reopen this new thread. In the above thread i miss a last answer - last question is:
"Do you maybe know where username <-> business partner number is stored, or maybe where username <-> org id?"
I also need to find out about how to get the SAP-User (table USR02) out of the partner (table BUT000) or partner_guid.
in BUT000 there is a field "xubname", which is the SAP-User. But it is not filled in each case.
Background is: I need the User Details, which I get with:
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
EXPORTING
username = sy-uname
IMPORTING
address = wg_address
TABLES
return = g_return.
in scenario - don't know correctly in English - it's when you buy for somebody else.
so beforehand I have to have the SAP-User. Is there any function-module or BAPI - help appreciated.
Regards, Matthias
Hello Matthias,
HR relations between US/CP/BP/S/Org ID can be found in table HRP1001. But I am not sure if you can find a direct link between US and BP: you might have to pass trough the CP.
You should use FM BP_CENTRALPERSON_GET which gives links between BUT000-GUID, CP ID, Employee ID and username.
Ex: input IV_USERNAME, and you will get the BUT000-GUID in EV_BU_PARTNER_GUID.
Ex: can also get the user ID from the BUT000-GUID.
Rgds
Christophe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.