Skip to Content

As we know HCI comes with pre shipped content for various integration scenarios, for example SAP Cloud for Customer Integration with SAP CRM or SAP Cloud for Customer Integration with SAP ERP. The content uses standard IDOC , which sometimes need to be extended to cater to customer specific requirement.


In this blog post I will show how the extended IDOC can be  used in place of standard IDOC while retaining the mapping provided by SAP for standard elements


Assumption: you have already extended an IDOC.


Step 1: Use the report SRT_IDOC_WSDL_NS to download the IDOC definition in form of a WSDL (See NOTE 1728487)



Note: Standard report download the file with extension WSDL, which should be renamed to wsdl, else HCI will not recognize the service definition.


SRT_IDOC_WSDL_NS.PNG


For example in my case the file was saved with name COD_EQUIPMENT_SAVE01.WSDL, which I renamed to COD_EQUIPMENT_SAVE01.wsdl


Step 2: Open the wsdl file with a text editor and remove the target namespace from the schema element as shown below


Before:


TNS-Before.png

After:


TNS-After.png


Step 3: Replace all the occurrence of tns: with empty value


replace IDOC.PNG


Step 4: Add maxOccurs attribute to the IDOC element to support bulking as in the original mapping


maxoccurs.PNG


Save your service definition file.


Step 5: Copy the wsdl to the package src.main.resources.wsdl of the desired iFlow project

Save IDOC.PNG

Step 6: Finally replace the original IDOC definition with the imported IDOC definition in the mapping editor as shown below

replace IDOC.PNG

Step 7: Select the request message type

messagetype selection.PNG

Step 8: Save your mapping and make sure there are no errors reported

result.PNG

Step 9: Verify your changes and make sure the existing mappings are retained, example: below I can see the IDOC occurrence has been set to 9999

verify.PNG

To report this post you need to login first.

25 Comments

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

  1. Bhavesh Kantilal

    Hello Abhinash,

    I make the changes to the WSDL as suggested by you in the blog.

    • When I configure my IDoc channel in my Iflow without using this WSDL in the field URL to WSDL all is well.
    • When I assign this WSDL to the IDoc channel in the Field URL to WSDL, my iFlow does not start.

    Why I understand that this field is non mandatory and my scenario works without it, I am wondering why this doesn’t work once I assign the WSDL to the Channel. Any thoughts?

    Regards,

    Bhavesh

    (0) 
    1. Abinash Nanda Post author

      Hello Bhavesh,

      The WSDL needs to have service, port and binding information before you can assign it to the IDOC adapter (look for any async iFlow from C4C to back end system and check the WSDL that is attached to the sender adapter ). But anyway I would advise not to attach the WSDL to IDOC sender as this will result in not being able to process bulk IDOC (IDOC packages as a single message). By leaving the WSDL from the IDOC adapter we are simply skipping the IDOC message validation step, which is what we expect. Also note if you attach WSDL to the sender IDOC adapter you need to send the content type as Application/x-sap.idoc in WE21, and because of limitation with SOAP will only support one IDOC per SOAP message.

      Best regards, Abinash

      (0) 
  2. Camelot Consultant

    Hi Abinash,

    it’s me again 😉

    I’m currently struggling with the integration mapping for the communication from ERP to C4C for customer master. Somehow there are mandatory fields not mapped and the mapping is errounous in Eclipse. I can’t figure out why because the only difference between standard and the extended mapping is the mapping of the extension fields in both systems.

    Would it be possible to send the Eclipse project to you so that you can check it for the underlying issue?

    Cheers

    Sven

    (0) 
        1. Abinash Nanda Post author

          Ok, I am not too sure about that, may be you can try attaching it to a SCN thread. I would not like to provide my mail id in the forum 🙂 . Else you can also create a CSS ticket

          Best regards, Abinash

          (0) 
  3. Camelot Consultant

    Hi Abinash,

    do you have any experience if there are special things to consider when doing this for extended DEBMAS IDOC?

    We are currently struggling with a xsl issue when trying to send customers from ERP to C4C.

    The result is this error message in HCI:

    Processing exchange ID-vsa522027-od-sap-biz-56865-1440790256443-20-6 in sap-map-pi:ERP_COD_BusinessPartnerERPBulkReplicateRequest{

                                            Error               = com.sap.xi.mapping.camel.XiMappingException: com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot produce target element /ns0:BusinessPartnerERPBulkReplicateRequest/BusinessPartnerERPReplicateRequestMessage. Queue has not enougth values in context. Target xsd requires a value for this element, but target field mapping does not produce one. Probably the xml-instance is not valid to the source xsd, or the target field mapping does not fulfill the requirement of the target xsd.

    Cheers

    Sven

    (0) 
    1. Indrakumar Jayachandran

      Hi Camelot,

      Where you able to fix the issue? I also getting the same error.

      There is a custom segment in the IDOC WSDL. These fields are mapped correctly. But when we pass the IDOC from ECC to HCI I am getting the same error.

      Please let me know what you have done to fix it.

      Any help is much appreciated.

      Regards,

      Indra

      (0) 
  4. Maurin Ferraud-Ciandet

    Hi Abinash,

    Thanks a lot for your post.

    I have just one question. What do you mean by replacing all the occurrence of tns: with empty value? I have to delete from my wsdl file all the lines with “tns:” like the following one.

    “<xsd:element name=”E1MARC1″ type=”tns:E1MARC1.000″ minOccurs=”0″/>”

    Thanks in advance.

    Best regards.

    Maurin

    (0) 
    1. Abinash Nanda Post author

      Hello Maurin,

      No, please do not delete any lines from the wsdl. Simply replace the character string “tns:” with empty string “”.

      Before:

      <xsd:element name=”E1MARC1″ type=”tns:E1MARC1.000″ minOccurs=”0″/>

      After:

      <xsd:element name=”E1MARC1″ type=”E1MARC1.000″ minOccurs=”0″/>

      Best regards, Abinash

      (0) 
  5. Tasnim Ara

    Hello Abinash,

    I Followed Your allsteps, But Facing problem in Maping scr.main.resource.mapping while adding Target Element (ERP Customer) I am getting In global element extension fileds Instead DEBMAS_DEBMAS06 ,Please  check below image.
    Thanks,

    (0) 
    1. Abinash Nanda Post author

      Hello Tasnim, Can you please send me the WSDL that you downloaded from your Business suite system using the transaction code SRT_IDOC_WSDL_NS?

      Best regards, Abinash

      (0) 
  6. Ashwini Sharma

    Hi Abhinash,

    I am have downloaded my idoc wsdl same way as you have suggested , but while replacing this wsdl in my mapping in eclipse i am getting this error. Please help me on this.

     

     

     

    (0) 
  7. 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