WCF custom SAP adapter picking up latest version of IDOC from SAP
- I am using WCF Custom adapter to receive IDOC from SAP.Issue with WCF Adapter is that even when an older release (say 620) of IDOC is triggered from SAP System by changing partner profile, the WCF SAP Adapter picks up only the latest release(say 640) of the IDOC.
As there are some interfaces using old release of IDOC and some interfaces using new release so we need both to be working.
Is this bug with the product or any work around can be used to resolve this issue.
If anyone have faced this issue the pls help.
Thanks in advance.
Ajeet Kumar
Answers
The SAP adapter parses the control record (EDI_DC40 segment) to identify the Idoc type, extension and release.
DOCREL field with the current system release.
By default , SAP fills up the
You would need to figure out how to get SAP to send the correct DOCREL in the control record.
Workaround:(a) Deploy the metadata for 620
(b) In the adapter, indicate that the IDoc should be given out in the “String” format.
(c) In the Messages tab in the adapter configuration, use an XPath to pull out the text portion of the IDoc (i.e., skipping over the <ReceiveIdoc><idocData> nodes and directly getting to the “flat” data).
(d) Use the Flat File Pipeline component which will then convert the IDoc data which it sees (which should now be just text due to step (c) above) to XML based on the metadata deployed in (a).
You can follow the blog for details.
Please not the limitation of this approach(also mentioned in the blog) : this configuration won't work for multi-byte character systems.- Marked As Answer byAndrew_ZhuMSFT, ModeratorWednesday, October 14, 2009 2:26 AM
- Proposed As Answer byAndrew_ZhuMSFT, ModeratorMonday, October 12, 2009 6:25 AM
All Replies
The SAP adapter parses the control record (EDI_DC40 segment) to identify the Idoc type, extension and release.
DOCREL field with the current system release.
By default , SAP fills up the
You would need to figure out how to get SAP to send the correct DOCREL in the control record.
Workaround:(a) Deploy the metadata for 620
(b) In the adapter, indicate that the IDoc should be given out in the “String” format.
(c) In the Messages tab in the adapter configuration, use an XPath to pull out the text portion of the IDoc (i.e., skipping over the <ReceiveIdoc><idocData> nodes and directly getting to the “flat” data).
(d) Use the Flat File Pipeline component which will then convert the IDoc data which it sees (which should now be just text due to step (c) above) to XML based on the metadata deployed in (a).
You can follow the blog for details.
Please not the limitation of this approach(also mentioned in the blog) : this configuration won't work for multi-byte character systems.- Marked As Answer byAndrew_ZhuMSFT, ModeratorWednesday, October 14, 2009 2:26 AM
- Proposed As Answer byAndrew_ZhuMSFT, ModeratorMonday, October 12, 2009 6:25 AM
- Thanks for the post!!!
Is there any other ways like some configuration or any property that we can configure to receive the lower release of IDOC from SAP, as I don't want to receive the message in String format.
Ajeet Kumar - As already mentioned above, the adapter parses the control record (segment : EDI_DC40, field : DOCREL) of the incoming message to resolve the metadata for the incoming IDOC.
If you can specify the expected DOCREL(620) in te incoming message instead of the SYSREL(640), it should work.
P:S- There is no binding property exposed by the adapter "to receive the lower release of IDOC from SAP". I have the same problem and have found this thread here.
How can I configure SAP that I will receive the right Value in DOCREL in the segment EDI_DC40 to be able to receive IDOCS from lower release?- This depends much upon how the IDOCs are being genrated.
SAP SMEs in your organisation might be able to help out in this case. Up to now I did not found a SAP specialist, who could help me in this problem.
Maybe they are not very familiar with IDOCs. (only in comunication with RFCs).- I guess there is some setting while configuring partner profile in SAP, because from anotehr SAP system we are able to get lower version of IDOC without any change at BizTalk end. Though I am not sure about the configuration.
You can check with SAP guys if they have any such configuration related to doc version.
Ajeet Kumar As I said, I have no SAP specialist, who could help me.
I have access to our SAP (a System for testing our BizTalk application) and have configured in the partner profiles (Transaction WE20) for a specific idoc (e.g. MATMAS) that SAP should use a specific segment release (e.g. 46C) for this Idoc. SAP sends then the released segments than for this version. But as Rohit Singh -MSFT mentioned above, it is necessary that in the EDI_DC40 Segment the field DOCREL should have the value of the idoc release, bat it has alway the release number of the current SAP release.
I could send a screenshot of the configuration, but I could not paste it here.
Kind Regards
Harry

