Skip to Content

This is integration scenario example of SAP Cloud for Customer to SAP CRM Onpremise system integration with HCI middleware.

2 Ways to use this blog :

  1. You want to create custom process codes then follow all the steps
  2. You just want to use the custom Idoc for integration without need of new inbound process code. In this scenario just in the process section, perform step3 and then Skip to Step 5 where you change the SAP standard message types and replace with your custom message types. Leave the CRMPCD_BUPA_I as process code as that is what you updated in WE57 to redirect. You can then continue with rest of steps.

Pre-requisite :

  1. You have generated your Idoc using BDFG and have clean Idoc and Message Type.
  2. Download the Z or Y Idoc WSDL using program : SRT_IDOC_WSDL_NS  from your Onpremise system . The highlighted box should be left blank and then you will not get errors. Else it keeps complaining for unreleased segments which are SAP standard and we do not have authorization to release them. Here it is how it should be.

SRT_IDOC.png

Now Let’s start the process :

  1. First check the Idoc type and Message Type you are using in the table : TBDFA using transaction SE16 or SE16n in Onpremise system ( Not Mandatory but good to know ) :

  /wp-content/uploads/2015/04/1_678485.png

For standard Idoc following is used :

/wp-content/uploads/2015/04/1_2_678487.png

The reason to create custom process code is to call the function module attached to our custom Idoc. If you compare the generated code of standard function module CRMXIF_PARTNER_ALE_IN used for standard integration with your custom inbound function module for Idoc e.g. ZIDOC_INPUT_CRMXIFV_PARTNER_SA in this case. You would see that CRMXIF_PARTNER_ALE_IN  doesn’t contain custom field  or custom Idoc segments (Z or Y fields and segments ) whereas your Idoc’s generated function module contains those. It means for integrating your custom fields the Idocs need to be generated to have custom field and segments.

/wp-content/uploads/2015/04/code_comparison_678500.png

2. Go to Transaction BD67 . Highlight and copy the standard entry to create your own ( This ste.

BD67-1.png

Change the copied information to create your own process code or you can utilize CRMPCD_BUPA_I directly in WE20 inbound partner profile for Custom Idoc:

BD67-1.png

BD67-2.png

3. Go to WE57 and verify that your Idoc and Message type are maintained:

  /wp-content/uploads/2015/04/we57_1_680663.png

/wp-content/uploads/2015/04/we57_2_680664.png

4. Go to transaction WE42 to maintain the Process Code and Message Type assignment :

  /wp-content/uploads/2015/04/we42_1_678508.png

/wp-content/uploads/2015/04/we42_2_678509.png

Hit enter after choosing above values taking you to next screen. If you already maintained in BD67 then this will get autofilled.

/wp-content/uploads/2015/04/we42_1_678508.png

Assign your message type to the process code :

  /wp-content/uploads/2015/04/we42_5_678512.png

/wp-content/uploads/2015/04/we42_6_678513.png

5. Go to transaction WE20 to maintain partner profile :

/wp-content/uploads/2015/04/we20_1_678514.png

6. Go to HCI or PI Middleware to make changes . Choose appropriate iflow which you want to make call to your custom Idoc. In my case I want from COD to CRM my custom Idoc to be triggered. I do not want to call it when BP confirmation comes from COD to CRM. So , I choose following :

  HCI_1.png

Go to mapping. Assuming that you have already imported the custom Idoc WSDL for mapping :

HCI_2.png

Go and change the constant values which are currently assigned to highlighted fields as below.

Change the Idoc type constant value mapping. This is the Value that you have from 1st step from table TBDFA in this blog.

  HCI_3.png

Now Change MessageType constant value mapping :

HCI_4.png

All of your custom segments should also have constant value ‘1’ if they need to get values. In my case i assigned Segment Z101CI_EEW_BUT000 as constant value ‘1’ and then segment name “SEGMENT” also assigned constant value ‘1’ as i want these segments to be sent in my Idoc from HCI.

  HCI_5.png

Even after assigning the correct mapping and seeing the values cming in Idoc we found that values are not getting saved in Onpremise system. I realized that apart from custom segment we also need to set the values in *DATA_X segment :

Assign constant value ‘1’ to  segments. Assign ‘X’ to fields that you want to be saved for application.

  HCI_6.png

HCI_7.png

HCI_8.png

I think you are all set for integrating your custom Idoc from C4C to OnPremise system. This example concept will work for Business Partner , Opportunity , Activities , Leads scenario. Only thing that will change will be iflow , custom Idoc in each scenario but the concept will be same.

Do share feedback if you feel anything needs to be added or improved.

To report this post you need to login first.

8 Comments

You must be Logged on to comment or reply to a post.

    1. Apoorva Singh Post author

      Thanks Ginger. I think first 2 snapshots don’t look very clear. People have to click on image to see it in bigger format clearly.

      (0) 
    2. Leidy Peña

      HI

      A few days ago i made an extension (enhancement) to the IDOC MATMA05 , according to the steps on this forum:

       

      https://blogs.sap.com/2015/05/06/handling-extendedcustom-idoc-in-hci-with-standard-content/

      https://archive.sap.com/discussions/thread/3757209#

       

      (I attached the WSDL generated). I was able to upload this WSDL to HCI and can make de deploy to the iflow, however when test the IDOC into the ERP, the following error is showed (monitoring by WE02 tx)

       

      No IDoc saved in target system (SOAP HTTP)

      Message No. EA391

      Diagnosis

      The SOAP application was started in the target system. However, errors occurred in the target system, which mean that IDocs cannot be saved.

      The following error message was sent: An internal error occurred during message processing. For error details check the tail log in Integration Operations and the audit log.

      Procedure

      Inform your system administrator.

       

      I make the following verifications

      1. Rfc destination Conection test

      The result is:

      I changed the path prefix having on mind that in the new generated WSDL the message name has changed to the following:

      I changed the path prefix like this:

      I also made the parameters.prop  file modification in the iflow in HCI

      And made the connection test, the result is as follows:

      Someone has the same problem?

      I appreciated your comments

      Best regards.

       

      (0) 
  1. Michael Spindler

    Thanks for this, it is really helpful. If we do the enhancements as described above we have the problem that the interface name in PI is changing, for example from CRMXIF_PARTNER_SAVE_M.CRMXIF_PARTNER_SAVE_M03 to CRMXIF_PARTNER_SAVE_M.ZCRMXIF_PARTNER_SAVE_M03.

    If we would do this, the whole sender, receiver determination must be created again, due to the fact that the interface name is a kind of a key in the whole configuration.

    In the integration CRM – C4C that would be a lot of work. Does anybody have experiences with this -> using extended Idoc in the C4C – PI – CRM scenario.

    Kind regards

    Michael

    (0) 
  2. Leidy Peña

    HI

    A few days ago i made an extension (enhancement) to the IDOC MATMA05 , according to the steps on this forum:

     

    https://blogs.sap.com/2015/05/06/handling-extendedcustom-idoc-in-hci-with-standard-content/

    https://archive.sap.com/discussions/thread/3757209#

     

    (I attached the WSDL generated). I was able to upload this WSDL to HCI and can make de deploy to the iflow, however when test the IDOC into the ERP, the following error is showed (monitoring by WE02 tx)

     

    No IDoc saved in target system (SOAP HTTP)

    Message No. EA391

    Diagnosis

    The SOAP application was started in the target system. However, errors occurred in the target system, which mean that IDocs cannot be saved.

    The following error message was sent: An internal error occurred during message processing. For error details check the tail log in Integration Operations and the audit log.

    Procedure

    Inform your system administrator.

     

    I make the following verifications

    1. Rfc destination Conection test

    The result is:

    I changed the path prefix having on mind that in the new generated WSDL the message name has changed to the following:

    I changed the path prefix like this:

    I also made the parameters.prop  file modification in the iflow in HCI

    And made the connection test, the result is as follows:

    Someone has the same problem?

    I appreciated your comments

    Best regards.

     

     

    (0) 

Leave a Reply