none
BizTalk Server WCF-Custom SAP adapter stops receiving IDOC messages RRS feed

  • Question

  • Hi,

    BizTalk Server SAP adapter stops receiving IDOC messages, and no error is logged in the event log. After restarting the receive location, I'm able to receive idocs for few minutes and then once again I'm unable to receive idocs even though the status of the receive location is enabled. There is no error logged in event viewer at any point of time.

    Please advice me what to do and the also let me know the cause for the error.

    Regards,
    Krishna Chaitanya.
    Monday, April 13, 2009 9:53 AM

Answers

All replies

  • What is the  value of Receive-timeout  in the adapter config. Can you try increasing it to a very large value, say  "23:59:59".

    What is the status of  the IDOCs which are not received by Biztak, on SAP side? Is SAP waiting for confirmation, or does it say that it has successfully transmitted the IDOCS ? 

    Monday, April 13, 2009 11:26 AM
  • Hi Rohit,

    Thanks for your response.

    The Receive-Timeout value is currently "23:59:59". The receive location is found to be enabled from BizTalk side. And from SAP side when connection test is done, it fails even though the receive location is enabled here.

    Regards,
    Krishna Chaitanya
    Monday, April 13, 2009 11:38 AM
  • Are you using trfc for Sending IDOCs  from SAP ? If yes, have you  specified a database connection String in SAP binding property ? 
    Monday, April 13, 2009 12:35 PM
  • Hi Rohit,

    This problem is on the receive side. In the send side I have no problems.
    And more over when I restart my receive location, I was able to receive idocs and process them for couple of minutes. That says all the configuration is correct.
    The receive location seems to be enabled and the connection test fails from SAP side. This is exactly my problem. There are no errors or warnings logged in event viewer.

    Regards,
    Krishna Chaitanya.
    Tuesday, April 14, 2009 3:31 AM
  • Hi Krishna,

    Can you enable tracing for Sap adapter and let us know about the errors/warnings?
    http://blogs.msdn.com/adapters/archive/2007/12/21/why-don-t-i-get-exceptions-when-something-unexpected-happens-in-inbound-scenarios-in-sap-adapter.aspx - This blog post will be of help to you.

    Thanks,
    Jeevitha

    Tuesday, April 14, 2009 6:51 AM
  • Do we have any inputs on this since I amfacing the same problem.

    As soon as the adapter restarted IDOC receive will start but it fails after the first IDOC receive.

    Appreciate the help.

     

    Regards

    Ankur Billore

     

    Saturday, April 2, 2011 12:28 PM
  • I also experiance the same problem but have identified that BizTalks stops receive any more messages from SAP when I get the following error in the eventlog:

    The adapter "WCF-Custom" raised an error message. Details "Microsoft.ServiceModel.Channels.Common.XmlReaderGenerationException: An error occurred when trying to convert byte array: [32-00-30-00-31-00-31-00-30-00-30-00-30-00-30-00] of RFCTYPE: RFCTYPE_DATE with length: 8 and decimals: 0 to a .Net type. The parameter/field name is: CREDAT. --->

    After restarting the SAP Receive host i am getting new SAP messages until a new error occures. The reason for the above conversion exception is that IDOCS sent from SAP were created in 700 Release but in the outgoing Partnerprofile the Segment release was set to 46C. This creates the Date conversion error. Another reason for the Date conversion error is if the Partnerprofile is set to non-Unicode but BizTalk wants Unicode.

    Still I think this behavior is unacceptable. The WCF adapter should not stop receive message because the receive port is still enabled. Does have a clue why BizTalk stops pulling messages from SAP?

    Regards

    Ralf Lüders

     

    Wednesday, April 13, 2011 8:31 AM
  • Hi,

    The error must be happenig while trying to promote Date fields like creation date(CREDAT) etc.
    If it is not a valid date, receiving of IDOC woul fail. This is an expected behaviour.

    However, after this error message you should see an information that the WCF service host is restarted and that the receive location can again start receiving messages.

    If you are not seeing this behaviour and you are on Biztalk Adapter pack  1.0 ,
     can you see if you have the follownig hotfix installed -

    http://support.microsoft.com/kb/950854

    If you are on Biztalk Adapter Pack 2.0/2010 , then this should not hapen, as the fix is included in these versions.

    Please get back if the issue doesn't go away-  I would like to investingate further in that case.

     

     


    Rohit Singh
    Wednesday, April 13, 2011 10:07 AM
  • Hi,

    we are using BizTalk 2010 and BizTalk Adapter Pack 2.0 and I do not get any information in the eventlog about that the WCF service host is restarting.
    For you knowledge we installed the hotfix KB2388784 (http://support.microsoft.com/kb/2388784) because we had problem with new IDOC version and schemas. Could this be the reason for this strange behavior?

    I will try to uninstall the hotfix to see if the problem is related to this hotfix.

    Best Regards

    Ralf Lüders

     

     

    Wednesday, April 13, 2011 12:45 PM
  • Hi again

    I removed the Hotfix2388784 but still BizTalk stops receive any more messages after receiving the exception mentioned before and it does not restart the WCF Service host. Are there any updates for Adapter Pack 2 who needs to be installed?

     

    Regards

    Ralf Lüders

     

    Wednesday, April 13, 2011 1:15 PM
  • Hi,

    WCF traces from the adapter can help to debug the issue better.

    Can you open a case with Microsoft for this .

    That way , we will have better channel for trackeing the case and also for exchanging data .


    Rohit Singh
    Wednesday, April 13, 2011 1:21 PM
  • Hi All,

     

    Thanks for the responses, update in this issue, we have asked Microsoft to open a case and their engineers have checked every connection and trace but nothing was found. Finally, it was communicated to us that there was some issue in the SAP System and their support has fixed the issue from their side. We were not communicated the details but it seems there were short dumps being created in SAP after every successful message receive there fore after one message Biztalk was not able to poll the mesages further.

     

    Regards

    Ankur Billore

    Wednesday, April 20, 2011 10:14 PM
  • Hi

    Got a private fix from Icrosoft that i tested and it solved the problem with BizTalk not receiving any more IDOCS after a Date Conversation exception. The private fix will be hand over for testing now so it will take a while before a public fix is out there. It will probably be included in a new CU which will be released later.

    Does anyone know if it is possible to configure SAP RFC destination to a non-unicode and send IDOC to BizTalk? Its a SAP system version 6 and we have some problem with data quality and when using RFC Destination Unicode no character translation is performed in SAP so some nonprintable character are now transfered to BizTalk. In previous adapter BizTakl translated outgoing IDOC and when a 1a hex was sent the characters was translated to "#" but with Unicode in teh RFC destination SAP send the 1a hex to BizTalk and when sending the messages to the external system BizTalk throws an error.

    The problem is that when the SAP RFC destination is configured to Non-Unicode we cant receive any IDOCS because the IDOC seems to be corrupt and we receive all these CREDAT date exceptions.

    Any ideas if it is possible to configure SAP to send Non-Unicode to a BizTalk with Adapter Pack 2?

    Regards

    Ralf

     


    RL
    • Edited by Ralf L Friday, April 29, 2011 1:03 PM
    Friday, April 29, 2011 11:22 AM
  • Hi,

    I don't know if it's possible to set the RFC destination to no-unicode and receive data successfully without the data being garbled.

    As, you are seeing- when you set RFC-destination to non-Unicode , CREDAT gets corrupt.
    some other data in the data-record containing your business data can also get garbled in a similar way.

    If I understand it correctly, you want all the non-printable characters to get converted to # , before sending them to BizTalk.
    Why do you want to do that ?
    Does some component on BizTalk side throw , complaining that it is not a valid XML character or is it some other business requirement.
    have u considered sanitizing the data on BizTalk side, maybe by using a custom pipeline component. [I can provide u sample code for doing this].


    Rohit Singh
    Friday, April 29, 2011 12:01 PM
  • Hi,

    The customer has an older version of SAP (think its 46x) and the BizTalk produktion they use the RFC SDK 640 with BizTalk Adapter 2.0. In the produktion the Characters below 20 hex are translated to "#" 23 hex because the RFC destination is non-unicode and make a character translation.

    The problem now is when they switch to the new SAP 6.0 version I can only use Unicode as SAP RFC destination and then is no character conversion made and there for are all characters including the 1A hex sent to BizTalk. When I try to configure the SAP RFC destination to non-Unicode no longer can receive any IDOCS.

    I am using the RFC SDK 7.11

    In the BizTalk documentation for the SAP Adapter pack 2.0 it says that BizTalk only supports RFC SDK Unicode but that both Unicode and non-Unicode systems are supported?? This seems not to work in my case or can there be a problem with the SAP RFC SDK 7.11?

     

    Regards

    Ralf

     

     


    RL
    Friday, April 29, 2011 2:17 PM
  • BizTalk WCF-SAP adapter supports both unicode and non-unicode SAP systems.

    That is why your are able to connecto to the 46x server (which would be non-unicode) and the 6.0 server( which would be unicode).

    The adapter is able to receive messages from both unicode and non-unicode systems and it changes it's behaviour accordingly(well... RFC sdk does that).

    If you do a connection test(to a wcf-sap receive location) from non-unicode SAP system(46x ) you will see a message - "Target system is a non-unicode system(char size1)".


    If you do the same connection test from unicode SAP system(6.0) you will see a message - "Target system is a unicode system(char size2)".

    The unicode/non-unicode setting you have in the RFC-destination is that of the target system (the WCF-SAP adapter ) and not of the SAP server.

    In your case, the adapter sees that the SAP system is a unicode system and expects unicode data. But, you send non-unicode data and hence the problem occurs.

    For you scenrio to work , you will have to find a way of telling the RFC-SDK to behave as a non-unicode system , even when it is connected to a unicode server.

    Then, you unicode test from 6.0 server should show - "Target system is a non-unicode system(char size1)".

    I don't know if there is a configuration for that. Will let you know if I find anything.


    Rohit Singh
    Friday, April 29, 2011 4:20 PM
  • You might want to try an older versino of RFC-SDK(maybe try a couple of differen versions)

    I have seen that different versions of RFC-SDK behave differently in this scenario.


    Rohit Singh
    Saturday, April 30, 2011 6:19 AM
  • Switched to SAP RFC SDK 6.40 from 7.11 but I can not change to non-Unicode at the SAP RFC destination. I immidietly I get Date conversion error and the received iDOC is corrupt.
    So it seems that it is not possible to run non-unicode on newer versions of SAP.

     

    Regards

    Ralf

     

     


    RL
    Monday, May 9, 2011 11:12 AM