Microsoft Developer Network > Forums Home > BizTalk Server Forums > BizTalk Server Adapters and Adapter Pack > WCF custom SAP adapter picking up latest version of IDOC from SAP
Ask a questionAsk a question
 

AnswerWCF custom SAP adapter picking up latest version of IDOC from SAP

  • Wednesday, October 07, 2009 2:40 PMAjeet.Kumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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

  • Wednesday, October 07, 2009 3:17 PMRohit Singh -MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    The SAP adapter parses the control record (EDI_DC40 segment) to identify the Idoc type, extension and release.
    By default , SAP fills up the

    DOCREL  field with the current system release.

    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.


All Replies

  • Wednesday, October 07, 2009 3:17 PMRohit Singh -MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    The SAP adapter parses the control record (EDI_DC40 segment) to identify the Idoc type, extension and release.
    By default , SAP fills up the

    DOCREL  field with the current system release.

    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.


  • Thursday, October 08, 2009 11:54 AMAjeet.Kumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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
  • Sunday, October 11, 2009 2:00 PMRohit Singh -MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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".
  • Wednesday, October 21, 2009 7:51 AMhxbergen Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    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?

  • Wednesday, October 21, 2009 4:58 PMRohit Singh -MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    This depends much upon how the IDOCs are being genrated.
    SAP SMEs in your organisation might be able to help out in this case.
  • Wednesday, October 28, 2009 10:38 AMhxbergen Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

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

  • Monday, November 09, 2009 6:59 AMAjeet.Kumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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
  • Tuesday, November 10, 2009 1:05 PMhxbergen Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    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