ABAP: Link Case to Business Partner

Anyone know of a BAPI or class that will allow me to do this.  I have created a Case (so have its GUID) and have the GUID of the Citizen (Business Partner) - just need to link them together - any ideas?

Hi Nigel,
You could also do it directly in the same way the standard in the webclient does it:
This is the coding of the method eh_OnCreate of class CL_CRM_IC_CASEAATTRIBUTE_IMPL which is the controller of view CaseAAttribute.htm from BSP application CRM_IC:
Here you find the creation of a case and the raising of the event.
You could also try to raise the event itself.
  DATA: lr_cucoacmg   TYPE REF TO cl_crm_ic_cucoacmg_impl,
        lr_collection TYPE REF TO if_bol_bo_col,
        lr_entity     TYPE REF TO cl_crm_bol_entity.
  DATA: lr_core        TYPE REF TO cl_crm_bol_core,
        lr_transaction TYPE REF TO if_bol_transaction_context,
        lr_factory     TYPE REF TO cl_crm_bol_entity_factory.
  DATA: lt_params  TYPE crmt_name_value_pair_tab,
        ls_params  TYPE crmt_name_value_pair.
* get the core object out of the factory
  lr_core = cl_crm_bol_core=>get_instance( ).
* get the current transaction (should have been started already)
  lr_transaction = lr_core->begin_transaction( ).
* build create parameters
  ls_params-value = typed_context->case_type->get_casetype( attribute_path = ' ' ).
* Create only with valid case type
  check not ls_params-value is initial.
  ls_params-name  = 'CASE_TYPE'.
  APPEND ls_params TO lt_params.
* get factory for 'CmgCase' business object
  lr_factory = lr_core->get_entity_factory( cl_crm_cmg_il=>co_on_case ).
* create 'CmgCase' Entity
  lr_entity = lr_factory->create( lt_params ).
  check lr_entity is bound.
   IF iv_deactivate EQ abap_true.
     lr_entity->deactivate_sending( ).
   ENDIF.
* add to collection
  lr_collection ?= typed_context->caseattribute->get_collection_wrapper( ).
  lr_collection->add( lr_entity ).
* Set current focus of case in collection
  lr_collection->find( iv_bo = lr_entity ).
*--- Content Management Integration
* terminate Alert for previous Case
  cl_crm_ic_cmgadetail_impl=>terminate_alert( me ).
* Raise event Case_Selected
  cl_crm_ic_cmgadetail_impl=>raise_case_selected( ).
Hope this helps you out a bit.
Kind regards,
Micha

Similar Messages

  • Link between a business partner and a device installed on a device location

    Hi everyone,
    Please guide me about the linkage between a BP and device location.
    Please guide me with table field wise linkage.
    Which table is being used for 'Device Location' and 'Premise' information.
    Please guide.
    It will be a great help.
    Thanks and Regards

    Hello,
    Table for Premise is EVBS
    Table for Device location is EGPLT..
    Business Partner is part of the Business Master data while the Device Location is part of Techincal master data.
    The installation is used to link these master datas...
    The following link has some graphical images that illustrates the master data and shows how the various objects are related to each other.
    http://help.sap.com/saphelp_utilities472/helpdata/en/f8/196c35a018d041e10000009b38f839/frameset.htm
    Hope this has been helpful.
    Regards
    Olivia

  • CRM: Link Business Partner to Case

    Anyone know of a BAPI or class that will allow me to do this.  I have created a Case (so have its GUID) and have the GUID of the Citizen (Business Partner) - just need to link them together - any ideas?

    See thread: ABAP: Link Case to Business Partner

  • Archive Link Authorization problem for Business Partner.

    Hi Experts,
    Currently we are attaching documents to respective objects through Tr. OAWD & these documents are available in service for object as attachment, until this it is working fine.
    But we are facing problem of authorization for archive link of ISU- Business Partner. Letu2019s say we had two users USER-A & USER-B responsible to upload documents of Business partners started with 1 & 2 respectively.
    We needed authorization control for USER A&B so that,
    USER-A should upload documents for Business Partner 1001 to 1999
    & USER-B should upload documents for Business Partner 2001 to 2999
    we need to know can we restrict USER A&B so that they can not upload documents for Business Partner for which they are not responsible. we allready checked the roles "SAP_BC_SRV_ARL_*  " but not found useful to restrict USER A&B.
    Thanks in advance....

    Hi Sam,
    as this sounds like you search for suitable authorization objects I think that the authorization trace in transaction ST01 could be useful for you. For further information please see the following link: http://wiki.sdn.sap.com/wiki/display/PLM/AuthorizationTraceintransactionST01
    Best regards,
    Christoph

  • Business partner & customer link

    Hi experts
    I have created business partner from customer through BP & FLBPD1. Now I have to remove the link between BP & customer. Since any loan created with BP, the accounting entries are generated in the linked customer. Already loan is entered in the said BP and repaid also. so kindly advice.
    regards,

    Hi,
    If you want to delink only 1 BP, then the only option available is archiving.
    Check this link http://help.sap.com/saphelp_erp60_sp/helpdata/en/d2/c65c3996a0824de10000000a11402f/frameset.htm
    It clearly says that You can remove an existing link between a business partner and a customer/vendor only as part of the archiving process.
    Regards,
    Ravi.

  • BAPIs or Function Modules for Links between different Business Objects

    Hi experts,
    I am accessing an SAP CRM 5.0 system from outside via remote function calls.
    I have the GUID of a business partner and would like to find other business objects
    that are related to this business partner.
    For example:
    - Which activities are relevant for this business partner?
    - Which orders were placed by this business partner?
    - Which leads or opportunities are linked to this business partner?
    - Which products did this business partner order?
    Is it possible to get this information by calling BAPIs or other RFC function modules?
    Regards,
    Karsten

    After studying lots of documentation and trying to understand the BOL and GenIL concepts,
    I finally found a function module which meets my demands. With function module
    CRM_GENIL_GET_QUERY_RESULT you can execute a Search Object of the GenIL,
    and it is remote-enabled.
    By checking transaction GENIL_MODEL_BROWSER and choosing component set "ALL"
    you get a list of all defined Search Objects. The Search Object that finds all orders of a
    business partner is "BTQuery1O".
    DATA gt_parameter_list TYPE crmt_name_value_pair_tab.
    DATA gs_parameter_list TYPE crmt_name_value_pair.
    DATA gt_data_hdr       TYPE TABLE OF crmt_genil_rfc_data_hdr.
    DATA gt_data_attr      TYPE TABLE OF crmt_genil_rfc_data_attr.
    DATA gt_data_rels      TYPE TABLE OF crmt_genil_rfc_data_rel.
    DATA gt_data_rel_obj   TYPE TABLE OF crmt_genil_rfc_data_rel_obj.
    gs_parameter_list-name  = 'BP_NUMBER'.
    gs_parameter_list-value = '4000000011'.
    APPEND gs_parameter_list TO gt_parameter_list.
    CALL FUNCTION 'CRM_GENIL_GET_QUERY_RESULT'
      EXPORTING
        iv_query_name                = 'BTQuery1O'
        it_parameter_list            = gt_parameter_list
      TABLES
        et_data_hdr                  = gt_data_hdr
        et_data_attr                 = gt_data_attr
        et_data_rels                 = gt_data_rels
        et_data_rel_obj              = gt_data_rel_obj
      EXCEPTIONS
        error_occured                = 1
        OTHERS                       = 2.
    Before you can use the function module, you have to call function module CRM_GENIL_INIT
    to initialize the GenIL.
    Regards,
    Karsten

  • Adding a new field to the Address Data for a business partner

    Hi Experts,
    I am trying to add a new custom field to the address data (all structures and tables) that is linked to a business partner on SAP CRM via EEWB. Structure is the address structure wthin BUS_EI_EXTERN. Table is BUT020. I have been told that it is not possible as there is no Business Object that allows this. When doing an EEWB, the only business object is BUPA, which when selected, adds the new custom field to BUT000. I would like the field to be added to BUT020 (Address Table). This leads me to believe that there is no standard way of doing this, which ultimatley means that it would need to be done manually. Please help me with this predicament.
    Regards
    Yusuf

    The search help exit allows you to modify functionality of search help. If you add a new field to the
    parameter list that is not contained on the selection method you can manually populate it within the search
    help exit.
    This  would be performed within the u2018STEP DISPu2019 section. Once within this section all search help
    data has been retrieved and is stored in table RECORD_TAB (record_tab-string) as one long string value.
    Therefore you need to read table SHLP in-order to locate position of value within string.
    Example:
    To find position of personnel number (PERNR) within elemenory search
    help M_PREMN you would use the following code:
    Loop at record_tab.
         read table shlp-fielddescr into wa_shlp
                                       with key tabname   = 'M_PREMN'
                                                fieldname = 'PERNR'.
    You could then use this information in the following way, for
    example, to find a persons organisation unit:
          select  orgeh endda
            up to 1 rows
            from pa0001
            into (ld_orgeh,ld_endda)
           where pernr eq record_tab-string+wa_shlp-offset(8)
                                                      u201Cpernr length is 8
           order by endda descending.
          endselect.
          select single orgtx
            from t527x
            into ld_orgtxt
           where orgeh eq ld_orgeh and
                 sprsl eq sy-langu and
               ( endda ge sy-datum and
                 begda le sy-datum ).
    If you have added a new field to the end of the parameters list
    the next step is to populate it by adding this data to the end of
    the record_tab string:
      concatenate record_tab-string ld_orgtxt into record_tab-string.
      modify record_tab.
    endloop.

  • Use of business partner functionality in combination with dual control

    Is there a generally agreed upon procedure to use the business partner functionality in combination with dual control? The problem is that when you block a business partner, the customer/ vendor master data aren't blocked automatically. You can then still use them in transactions, which leads to problems.
    So is there a way to make this work or a procedure to do this?
    Niels Vanwingh

    Thanks Masa,
    I did notice the 'Add external supplier from' in create supplier or bidder option. However there is a small catch and your experience may help.
    Let me explain the requirement and scenario here in SRM 7.
    We are implementing the Registration of Supplier scenario; both ROS and SRM are in same client. When a potential supplier registers themselves in the registration system, a BP number is created (an Internal number range is defined for this). After accepting the potential supplier in pre-select screen the purchaser has two options to transfer the potential supplier from the ROS system to SRM
    Option 1: He can select the accepted potential supplier from the supplier directory option and transfer the business partner to SRM. In this case the business partner number of the potential supplier is retained in SRM and a business partner with supplier and bidder tag is created. However the purchaser does not have any option to select which type of business partner he would like to create like supplier or bidder.
    Option 2: Purchase can go to create supplier or bidder option and choose the u2018Add external supplier formu2019 from the ROS system and create the business partner. The ROS business partner details are copied to the create supplier screen, but the purchaser have to provide an external business partner number for the supplier. This is because we have defined external number range for business partner for the vendors that are replicated from ERP to SRM.
    Objective is the ROS business partner should be retained in SRM with option to create as supplier and bidder and then manually create ERP supplier with same SRM BP number and map against SRM supplier.
    Is there any way we can achieve this?
    In SRM 5.5 with Manage business partner functionality we could achieve as system give us the option which business partner type we would like to create as well as retains the ROS BP number in SRM.
    Regards
    Sandeep

  • Problem with business partner

    Hello everyone,
    I have this problem:
    ive been using extractor 0crm_sales_act_1 for crm, but i just realized that there is no business partner for my activities. I do have a business partner associated to my service order, but not to my activity that belongs to my service order in the extractor.
    I checked on the configuration for crm, and they do have a business partner for every activity, how do i get that?
    I want to link the same business partner that i have for my service order to my activity in the extractor 0crm_sales_act_1.
    please help me

    hi, im checking that field but it comes blank to all activities that are associated to a service  order, im only getting the bp for all my service orders but not my activities

  • Synchronization from vendor to business partner is not active?

    Hi there
    I am busy performing data migration of business partners and vendor accounts and have hit an issue on the last step of linking the uploaded BP to the uploaded Vendor.
    On execution of the transaction FLBPC2 (Link Vendor to Business Partner), it issues the error "CVIV_UI015 Synchronization from vendor to business partner is not active" which I believe is a product error because:
    1. I have configured BP to a new internal number range (and all other config requirements)
    2. I have configured a new Vendor account group with an external number range which is a duplicate of 1. above
    3. I have enabled BP to Vendor synchronisation in "Master Data Synchronisation" (from BP to VENDOR).
    I have tested my configuration successfully by creating a business partner via transaction BP and extending him to a vendor in a company code perfectly (works like a charm).
    My data migration process includes:
    - Creating a business partner using BAPI BUSISB990/FSCREATEFROMDATA.
    - Creating a vendor using the external number given above using a recording of FK01.
    - Linking the two using a recording of transaction FLBPC2 (Link Vendor to Business Partner).
    I am not trying to synchonise a business partner from vendor, but to synchronise the vendor via the business partner (which works using transaction BP) when the issue is received.
    Any ideas as to why I cannot do the operation manually which works via automation and why the error is not appriate?
    Regards
    Joe

    Good morning,
    I had a similar problem and solved by disabling
    the integration of the PI / XI of the PPO.
    To make sure that the PPO is working properly.
    You can check this setting by BUPA_CALL_FU transaction.
    Checks if the items are BUPA_OUTBOUND_MAIN and BUPA_OUTBOUND_REL
    integration of the disabled for PI / XI, according to the objects you need to be replicated.
    If they are uncheck them and rerun your tests.
    Use MDS_PPO2 the transaction log to check the copy of BP
    to the Vendor.
    I hope it helps, Good luck,

  • Adding a New Check Box field in Business Partner

    Experts,
    I know there are hundreds of thread on this topic. But i'm not clear with that.
    I have to add a new Check box in the Business Partner Screen. We are on SRM 5.0.
    The check box should be placed in "Business Partner Status" Frame of "Company Data" Tab.
    How to go about this, Kindly please expalin the steps.
    More over the Check box will be used for further processing in other tabs.
    Pl throw some light on that aspect also.
    Rgds
    Immediate Rewards for Sure
    SV

    Hi
    Try this link, already copied by ..
    Re: vendor master extensions by customer
    It is not possible to display F4 help for customer fields in BBPMAININT Transaction.
    Supporting link ->
    F4 for customer table fields
    Other useful links ->
    Note 675800 - Business partner enhancement SRM on maintenance screen
    Re: How I can save customer fields in Vendor master?
    Re: Adding new fields in VEndor master data in EBP
    Hope this will help.
    Regards
    - Atul

  • Territory on Business Partner

    Hello,
    I have a Business Partner set up as a Customer. I need to know which SQL Table the Territory is stored in.
    In looking at System Information it does not give my any Table Information and I can not find any information on where it is stored.
    Thanks for any help.
    Paul

    Hi Paul,
    The key field to link the OCRD (Business Partner) table and the OTER table is a field called Territory in the OCRD. This maps to the territryID field in the OTER table. The SQL will look something like:
    SELECT T0.CardCode, isnull(T1.descript, '')  FROM OCRD T0  left outer join OTER T1 ON T0.Territory = T1.territryID
    Hope this helps,
    Owen

  • Business Partner Report and table???

    Can anyone tell me if there is a standard report/program that shows all the business partners in a report format? I am trying to get a list of all the business partners created in collections management so that I can compare it with the customer master records and figure out what customers were left out.
    Also, what is the table or is there a table where business partner master data is held. E.g KNA1 is for customers.

    Hi,
    The BP table is BUT000. There is no comparison table that tells you which customers are linked to which business partner. There is a CVI link table but that contains GUID.
    Alternatively you can use the log of the program that sends the open items to collections management. That log will tell you what BP are not synchronized.
    Regards,
    Richard

  • Business partner replication using ABAP proxy

    Hello,
    I want to send vendor master data records from the MDM to SAP SRM. There is a standard ABAP proxy interface in the SRM for this purpose and this proxy is also being used by the standard PI content for MDM.
    Do you have any experience with this interface? I have done some test cases and I missed the logging. In PI I don't get any feedback if the business partner has been created or not. And in case it was not, there is no detailed error description. Neither in SXMB_MONI in the PI nor in the SXMB_MONI in the SRM.
    Is there any other monitoring tool for this interface?
    Would you recommend to use this interface in production, or would you prefer to use the BAPI interface?
    Any comment appreciated.
    BR,
    Jürgen

    Hi Jürgen,
    yes I worked on a similar scenario, we were distributing customers to CRM, which is the dual of vendors in SRM, and at the end is just a different role of the business partner.
    The Proxy I used is the standard proxy ABABusinessPartner, which is part of the standard content, and we never had problem using this object (productive since more than a year).
    What is strange to me is that you do not see any trace in SXMB_MONI, you should see the message in both XI and SRM and when a message is in error you should see the trace there with a description of the issue.
    Regarding Acknowledgement I think you have to configure MDM to request an acknowledgement since the ack only comes back if the first sender of the message request it.
    Hope this help.
    Ciao,
    Sergio

  • BP change documents ( linking problem between Object id and Business Partner)

    Hi,
    We need to create a report for documents changed for a Business partner.
    This will be done in sap bw.
    on source side I have created the datasource with function module changedocument_read and I am getting most of the information
    which I want. Only missing part is Business Partner number.
    Can somebody suggest , how I would be able to link Object Id to business partner.
    I need to pull everything that is changed at BP level and the Object class selection around 30 in number.
    So I am looking for any standard function module which can provide me the link between Object id and Business partner.
    If I establish the rules to determine the Business partner from Object id , its getting bit difficult.
    Can somebody please help/suggest.
    I have gone through many documents and scn posts but unable to find anything on this.
    Thanks !

    Hi, looking at the change history header table CDHDR it seems that object ID simple equals the internal format of the business partner number.

Maybe you are looking for