we want to read the data of the assigned CRM Sales ORG to a R/3 Sales ORG via RFC from R/3-System.
Therefore I am searching for the connection between the objects CRM Sales ORG (org unit) and business partner
I know, that in table CRMC_SORG_R3ORG I can get the object ID to a sales org, but I haven't found any function module, method... which gives me the data of the org unit, resp. the assigned business partner.
Thanks for any hints.
I'm not sure if I've understand fully your question, but I think FM CRM_BUPA_SELECT_BP_SALES_AREAS may help you.
With a business partner GUID (you can obtain it by consulting BUT000 table or with FM BAPI_BUPA_GET_NUMBERS), you'll get the respective sales area information (even with ERP sales area codes).
See if can help you a little more.
thanks for your reply, but that doesn't solve my problem.
Maybe you have take a look in the entries of the mentioned table CRMC_SORG_R3ORG ?
There is neither an entry of business partner no. nor of GUID, only this "object ID" or whatever, which e.g. is displayed in transaction ppoma_crm in the list of organizations as ID.
So I am searching for the link between the entry in this table CRMC_SORG_R3ORG and the organization/businesspartner which is displayed e.g. in ppoma_crm with the same ID.
I hope it's clear now, maybe you have an idea?
Thanks and best regards
Get CRM salesorg for R/3 sales org:
CALL METHOD lr_orgman->get_sales_org_of_vkorg
iv_vkorg = iv_vkorg
ev_sales_org = lv_crmsalesorg
crm_key_not_defined = 1
OTHERS = 2.
MOVE lv_crmsalesorg TO ls_swhactor.
SELECT SINGLE sobid INTO rv_sobid FROM hrp1001
WHERE otype = is_swhactor-otype
AND objid = is_swhactor-objid
AND relat = '207'
AND sclas = 'BP'
AND begda <= sy-datum
AND endda >= sy-datum.
Get CRM salesoffice for R/3 sales off:
CALL METHOD lr_orgman->get_salesoffice_of_r3vkbur
Get CRM salesgroup for R/3 sales off: