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.

14 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. Former Member

      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. Former Member

    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. Former Member

    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. Apoorva Singh Post author

      Hi Leidy.

       

      The 403 Forbidden error from SM59 is due to the certificates not correctly installed between your HCI iflow related to MATMAS and ECC landscape. Was it working earlier ?

       

      • Apoorva
      (0) 
  3. Former Member

    Thank you very much wonderful blog which helped me achieve my requirement Inbound business activity replication from COD- CRM using Custom Idoc &message type ( CRMXIF_ORDER_SAVE) .

    But In my case we need custom Idoc needed only for the Inbound Business Activity COD-CRM and we are expecting confirmation message to COD from CRM using from existing standard flow & Idoc after activity save with inbound Custom Idoc .

    unfortunately  am able to see 2 outbound idoc from CRM system  1) Confirmation message with  Custom Idoc type   and 2 ) standard Idoc  which initiated because of change pointers .

    • If i have to sent CNF message with Custom Idoc  then i have to stop change pointers in this specific case .  then i have update HCI i flow as well .
    • Alternately i have to send CNF message with standard Idoc .

    Can you suggest what  is best way to handle this situation ?  because we are using standard Idoc in other process as well  ,so Deactivating  the change pointer will have impact .

     

    (0) 
    1. Apoorva Singh Post author

      Hi Nagaraju.

      The sending of Idoc is  controlled in Partner Profile settings. Maintain the needed message type in Partner Profile WE20. Other Place is BD64 distribution filter where you can put dummy value in filter to stop sending the Idoc.

       

      -Apoorva

      (0) 
  4. Former Member

    Hello Apoorva,

    Thank you very much for your response . In this scanario we are dealing with Business Transaction.

    In WE20 we have not maintained CNF with Custom Idoc for outbound message .  we maintained only Inbound setting in WE20 for Custom Idoc.

    Still we see outbound CNF message initiating when first time Inbound message reported in CRM system . At the same time outbound Standard Idoc also initiating for every Inbound update happening with Custom Idoc.

    At the same time we have WE20 settings for Standard Idoc type & Message type on Inbound and Outbound .

    I think BD64 settings will filter for Master data & Not for the business transaction . please correct me if am wrong.

    My requirement is Inbound Idoc COD–CRM for Business Activity should happen using Custom Idoc .. Confirmation idoc CRM–COD  and further updates on activity CRM–COD should happen through standard Idoc.

    Reason for this requirement was we are using standard Idoc for sales quote and  other business transaction replication ..

    As you know Outbound Flow CRM –COD in HCI will happen through I flow order replication which has Business Activity , Opportunity , Lead and sales quote inside.

     

    Regards

    Nagaraju

     

     

    (0) 
    1. Apoorva Singh Post author

      I remember it now. It’s been long time and i don’t have access to SAP CRM system anymore so my capability to help you is limited at this point.

      In your case, you have to control through BAdI, the Idoc that you don’t want to send out using message type as your condition. Put a Breakpoint in the CRMXIF*map* FM to see the call stack and figure out where can you put your check to not send the Z* message type CNF idoc.

      Look at below two SAP notes that should give you an idea :

      822929 – ALE: Option to not send a communication IDoc

      1982880 – New BAdI in XIF outbound for IDocs of the message type CRMXIF_ORDER_SAVE_M

      Please mark the thread if you find this information helpful.

      • Apoorva

       

      (0) 

Leave a Reply