4 Replies Latest reply: Nov 11, 2010 2:08 PM by Andreas Bonhöfer RSS

Read assignment of Sales org to Business partner / org unit by FM or method

Andreas Bonhöfer
Currently Being Moderated

Hi,

 

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.

 

regards

Andreas

  • Re: Read assignment of Sales org to Business partner / org unit by FM or method
    Bruno Garcia
    Currently Being Moderated

    Hi Andreas,

     

    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.

     

    Kind regards,

    Garcia

    • Re: Read assignment of Sales org to Business partner / org unit by FM or method
      Andreas Bonhöfer
      Currently Being Moderated

      Hi Bruno,

       

      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

      Andreas

  • Re: Read assignment of Sales org to Business partner / org unit by FM or method
    Vishal Kesar
    Currently Being Moderated

    Hello Andreas,

     

    Please check database view CRMV_BP_FRG0140.

     

    Pass Business Partner ID in field PARTNER and you'll get the required Sales data in other fields.

     

    I hope this helps.

     

    Thanks

    Vishal

     

    Edited by: Vishal Kesar on Oct 4, 2010 11:31 PM

  • Re: Read assignment of Sales org to Business partner / org unit by FM or method
    Andreas Bonhöfer
    Currently Being Moderated

    Get CRM salesorg for R/3 sales org:

    lr_orgman->get_sales_org_of_vkorg

     

    Example:

    CALL METHOD lr_orgman->get_sales_org_of_vkorg

          EXPORTING

            iv_vkorg            = iv_vkorg

          IMPORTING

            ev_sales_org        = lv_crmsalesorg

          EXCEPTIONS

            crm_key_not_defined = 1

            OTHERS              = 2.

     

    MOVE lv_crmsalesorg TO ls_swhactor.

    Read SOBID:

     

    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.

     

     

    ANALOG:

    Get CRM salesoffice for R/3 sales off:

    CALL METHOD lr_orgman->get_salesoffice_of_r3vkbur

     

    Get CRM salesgroup for R/3 sales off:

    lr_orgman->get_salesgroup_of_r3vkgrp

Actions