cancel
Showing results for 
Search instead for 
Did you mean: 

In CRM, how to get Sales organisations from user id and business partners from sales organisation.?

0 Kudos

Hello,

I would like to know, how to get the data based on below relationship.

user_id->Sales Organisation->Business Partners.

Accepted Solutions (0)

Answers (1)

Answers (1)

Domi
Contributor
0 Kudos

Tto get the users organisational assignment you can use the FM RH_STRUC_GET

      CALL FUNCTION 'RH_STRUC_GET'
        EXPORTING
          act_otype    = 'US'
          act_objid    = 'THEUSER'
          act_wegid    = 'US-BP-OO'
          act_plvar    = '01'
          act_endda    = '99991231'
        TABLES...

You can find the relations in table HRP1001 ( FM RH_STRUC_GET have a huge impact on performance in mass data handling!).

The Business Partner can be found in these tables (depending on the scenario and used data)

CRMM_BUT_LNK0010

CRMM_BUT_LNK0011

CRMM_BUT_LNK0020

CRMM_BUT_LNK0021

CRMM_BUT_LNK0030

CRMM_BUT_LNK0031

CRMM_BUT_LNK0140

CRMM_BUT_LNK0141

To get the Salesorg of single Business Partner you can use FM CRM_BUPA_SELECT_BP_SALES_AREAS