8 Replies Latest reply: Jan 14, 2008 4:14 PM by Stephen Johannes RSS

Data exchange between SAP CRM and another system

Alexander Shapovalov
Currently Being Moderated

Hello,

 

I have to do data exchange between two systems, for this purpose I using XIF, but

I am new in XIF and I need somebody help me.

Will you please so kind to help me?

 

I need to exchange data between SAP CRM and another external system.

Let me explain a little my processes.

After creating Business partner, I have to create service order for this business partner and sent <b>both</b> Business partner and Service Order to another system in XML.

<b>The first question</b>, is how can I create one XML document with both Business partner and Service order data in one document.

Now I can create Business partner and after pressing button Save, data will sent using XIF in XML to another system. But only Business partner, I don’t know how can I add Service Order data into this XML file.

<b>The second question</b>, is how can I sent data not only on event CRMXIF_PARTNER_SAVE, but on another event, for example, CRMXIF_PARTNER_MODIFY , but I haven’t found this event.

<b>The third question</b> is how can I analyze Business partner data before event CRMXIF_PARTNER_SAVE, for example, if Business partner role is employee, than I have not sent data to another system.

<b>The fourth question</b> is how can I convert data from another format into XIF format, for example, after I have sent Business partner and Service order into another system, this system will send xml file with some data to CRM, but in format, which SAP CRM can’t understand

 

<b>And the last</b>, is XIF good for this purpose? As I can understand XIF is good only for export data, but not for exchange data. May be there is some another good decision for data exchange?

 

Best regards,

Alexander

  • Re: Data exchange between SAP CRM and another system
    Currently Being Moderated

    Hi,

     

    You can look at the following as a starting point in having a good understanding of the CRM Integration Technologies.

     

    http://help.sap.com/saphelp_crm50/helpdata/en/c7/95fc381478ab6fe10000000a11402f/frameset.htm

     

    Also have a look at the following note for a detail on connection with CRM with a SAP and a non-SAP System.

     

    Thanks,

    Samantak.

     

    <b>Rewards points for useful answers.</b>

  • Re: Data exchange between SAP CRM and another system
    Torsten Boddeutsch
    Currently Being Moderated

    Hello Alexander,

     

    i want answer to your 3rd Question:

     

    If you want to filter the data, you send to an other System, you can use the Interface IF_EX_CRMXIF_PARTNER_MAP.

    - Create your own implemented Class.

    - Code in the Method change_mapped_data_out

    - Read the Side- Info (  CALL FUNCTION 'CRMXIF_SITEINFO_GET' )

    - An Example, to send no Customers:   

    IF ls_siteinfo-site_name CP 'SIDE- NAME'
          LOOP AT is_transaction_message-crmw_bupa_head INTO ls_head.
            IF ls_head-is_customer = 'X'.
              CLEAR cs_data_mapped.
            ENDIF.
          ENDLOOP.

     

    I hope that helps you .

     

    kind regard

    Torsten

    • Re: Data exchange between SAP CRM and another system
      Alexander Shapovalov
      Currently Being Moderated

      Hi Torsten,

       

      Thanks a lot, it's a very halpful answer.

       

      Best regards,

      Alexander.

      • Re: Data exchange between SAP CRM and another system
        Stephen Johannes
        Currently Being Moderated

        Alexander,

         

        In regards to your first question it is not possible with XIF, however you could possibly write some BADI exits in the BP transaction/CRMM_ACCOUNT application to write out a service order object to another queue. However the service order and business partner data would be in separate queues.

        The second question is the PARTNER_SAVE covers both creation and modification

        For your third question I believe you can setup a filter on the adapter object for your XIF site. So the BUPA_MAIN object would have a filter setup to exclude partners with certain attributes. However you can only filter on fields contained in BUT000 and those are limited to:

        BPEXT

        BU_GROUP

        BU_SORT1

        BU_SORT2

        PARTNER

        TYPE

         

        The fourth question is that you can write a custom abap program and use the simple transformations to translate the data, or use the LSMW tool and setup the data transfer.

         

        Unfortunately your questions are some interesting challenges that go beyond the vanilla scope of the tool. I believe the tool could help you, but you may need to do a lot of custom work to get everything to work correctly. You are probably better off using a BADI(perhaps BUPA_GENERAL_EXPORT or PARTNER_UPDATE) in the transaction BP to write a change document/file out to the filesystem that records the outbound interface. For the inbound interface I would recommend a custom program using the simple transformations tool or ABAP XML toolkit to handle the processing.

         

        Good luck,

         

        Stephen

        • Re: Data exchange between SAP CRM and another system
          Alexander Shapovalov
          Currently Being Moderated

          Hi, Stephen!

           

          Thanks a lot!

           

          Alexander.

        • Re: Data exchange between SAP CRM and another system
          Alexander Shapovalov
          Currently Being Moderated

          Hello Stephen,

           

          >The fourth question is that you can write a custom abap program and use the simple transformations to translate the data

          Can you please tell me, where I can change, or write this program, I mean I know SE80, but I don't know what program I have to create or change. Please, give me some advice or some steps about this custom abap program.

           

          >however you could possibly write some BADI exits in the BP transaction/CRMM_ACCOUNT application to write out a service order object to another queue.

          Please explain where can I write this program? If it possible, please give me some steps to create this program.

           

          Thanks,

          Alexander.

          • Re: Data exchange between SAP CRM and another system
            Stephen Johannes
            Currently Being Moderated

            Alexander,

             

            For this load program the general technique is the following:

             

            1.  Map the data in the file to the target data in the CRM system

            2.  Execute the XIF adpater bapi or CRM standard bapis to execute the data

             

            So basically you are building a custom data conversion/load program.  A simple example would be the other system sends me back the "zipcode" of the customer in an XML file and I need to load into the CRM system.

             

            I would map the file from the system to identify the logical data elements in the file to standard CRM data elements.  I then would identify what part of CRM needs to be updated.

             

            Once I done the meta-mapping, then I need to build the following custom programs:

            - Data Translator

            - Data Loader

             

            The translator take the XML data represenatation and puts it into a structure that ABAP can understand.  It also converts the data into "CRM formats".

             

            The data loader uses the converted files and calls the bapis to update the records in CRM.

             

            I need to look at my original response again for the second question you have asked.  However if you look at implementing the BADI's:  BUPA_GENERAL_EXPORT or PARTNER_UPDATE (view the details in SE18), it should solve handling the outbound flow of data to another system.

             

            Take care,

             

            Stephen

Actions