Handling Extended/Custom IDOC in HCI with standard 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.
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:
After:
Step 3: Replace all the occurrence of tns: with empty value
Step 4: Add maxOccurs attribute to the IDOC element to support bulking as in the original mapping
Save your service definition file.
Step 5: Copy the wsdl to the package src.main.resources.wsdl of the desired iFlow project
Step 6: Finally replace the original IDOC definition with the imported IDOC definition in the mapping editor as shown below
Step 7: Select the request message type
Step 8: Save your mapping and make sure there are no errors reported
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
Thanks for sharing this useful documentation Abhinash. 🙂
This is great! I never knew how to download the updated IDOC WSDL and keep the mappings - THANKS, Abinash!!
Abinash, I think you have to change the screenshot at step 3
Amzing blog. very helpful
Hi Abinash,
I am still not getting it working. Maybe you can have a quick look at my recent post.
http://scn.sap.com/thread/3757209
Best Regards
Florian
Great Blog Abinash...Thanks 🙂
Hello Abhinash,
I make the changes to the WSDL as suggested by you in the blog.
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
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
Hi Abinash,
any experience in using extended IDOC including the mapping of extension fields for sales arrangement in SAP C4C?
I've created another SCN discussion for this one:
Customer replication WSDL: extension fields of sales arrangement not included
I would be happy if you guys can have a look and give me some help with that.
Cheers
Sven
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
Ok Sven, please attach the iFlow, so that I or one of my colleague can have a look at it.
Best regards, Abinash
I would like to but as it seems I can only attach images, videos or URL links...
How can I send or attach files like .zip?
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
I can totally understand that 😉
We've created message number 0000743490 2015.
Thx for having a look at it.
Cheers, Sven
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
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
hello
have you solved this error? i am facing the same problem
@Abinash Nanda can you help as this error remains for 3 years without solving!
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
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
Abinash,
Thank you a lot.
Have a good day.
Best regards.
Maurin
Good blog. Thank you Abinash Nanda
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,
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
Hello Abinash,
Thanks Issue Got resolved I was Needed to modify that WSDl little then its Fine,
Thanks
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.
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
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.
I'm hoping that you can tell me what I'm doing wrong. I need to loop thru and concatenate the E1EDKT2-TDLINES for a specific TDID. What I have is working fine as long as the TDID that I'm wanting to perform this for is the first encountered. If it's not, the target field is being populated with the TDLINE values from the first occurrance of TDID. What am I doing wrong? This is the mapping:
I have the context of TDLINE set to E1EDKT1. I greatly appreciate any assistence!!! Thank you!!
Hello Abinash
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 .
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 .
Hi Abinash Nanda & all,
I know this is a rather old one but lately I had to provide WSDLs for an integration provider so that we can exchange IDocs using the IDoc XML Port and the "/sap/bc/srt/idoc" ICF service.
That being said the integration provider could not import that IDoc resulting from SRT_IDOC_WSDL_NS because of missing binding and service within the WSDL. That was already mentioned before in the comments within this blog.
I understand that within ERP the report SRT_IDOC_WSDL_NS does not generate valid services within the WSDL (because one would need to specify the endpoint URL then, though one could argue that the system migth know by using the SMICM service entries)...
... but I do not understand why the WSDL is generated without binding(s).
My questions are
Many thanks and kind regards
Jens