none
WCF Adapter error when receiving iDocs from SAP RRS feed

  • Question

  • Good afternoon,

    I am desperatly trying to receive iDocs in BizTalk, but this error occurs every time (it's only a warning in the eventlog, no instance of any kind is even suspended in BizTalk) :

    An error occurred when trying to convert byte array: [32-00-30-00-31-00-30-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. ---> System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.

     

    I've tried with EnableSafeTyping set to true, but it doesn't change anything.

    I have followed the instructions provided on MSDN "HowTos" (http://msdn.microsoft.com/en-us/library/cc185560(BTS.10).aspxhttp://msdn.microsoft.com/en-us/library/cc185169(BTS.10).aspx, for instance) and some others, but I keep getting this error.

    Actually, the only way I get BizTalk to receive something without getting any error is by setting receiveIdocFormat to Rfc (instead of Typed), but it is not the kind of data I am expecting... 

     

    Some information about my configuration : 

    - BizTalk Server 2009

    - BizTalk Adapter Pack 2.0

    - Windows Server 2008 x64

     

     

    Any idea?


    Simon

     

    Thursday, January 14, 2010 1:19 PM

Answers

  • Nevermind the traces (except if you still want them of course), it seems like the problem was on the configuration of the RFC destination : it was non-unicode! We have switched it to Unicode, and it's OK now!! 

    We are running some tests to be sure, but I think it's alright...

    Thank you very much for your help!!

    Best regards
    Simon
    Friday, January 15, 2010 1:58 PM

All replies

  • Hi Simon,

    From the error it looks like the value received for that particular field (CREDAT) is invalid.

    CREDAT is part of your Idoc control record and this value will be promoted to biztalk context properties (as DateTime) with receiveIdocFormat = String/Typed. And thats why you are seeing the error even with EnableSafeTyping=true

    When you received the idoc using receiveIdocFormat=Rfc, what was the CREDAT value that you were seeing? Do you see any data discrepancy with the idoc received in that case?

    Thanks
    Jeevitha

    Thursday, January 14, 2010 6:03 PM
  • Hi Jeevitha,

    Thanks for your quick answer!
    The value for CREDAT is 20100000. Indeed, it is not a correct date, but I don't see how I can handle this since it is part of the data sent by SAP? Is there anything we have to do on the SAP side?

    Thanks,
    Simon
    Friday, January 15, 2010 8:15 AM
  • Actually I have some more info : when I look at the iDoc in SAP, it appears that many fields are "truncated" in the message received by BizTalk.
    For instance : 

    Field | value in SAP | value in the message received by BizTalk 
    SNDPOR | SAPDE1 | SAPDE
    SNDPRT | LS | L
    RCVPOR | ZSIGPO_CP | ZSIGP
    RCVPRN | BIZTALK | BIZTA
    ...

    I think the same thing appends for CREDAT and CRETIM : only the first 3 digits are correct, the rest of the field being filled with zeros...
    Does it make any sense to you?
    Friday, January 15, 2010 9:49 AM
  • What version of RFC SDK are you using?
    Friday, January 15, 2010 11:29 AM
  • The version is 7.00 unicode
    Friday, January 15, 2010 12:07 PM
  • Can you enable adapter tracing (Information level) for Microsoft.Adapters.SAP and Microsoft.Adapters.SAP.SAPGinvoker and share the traces with us?

    This link should help you in enabling tracing

    Friday, January 15, 2010 12:44 PM
  • Well, traces are ready, but how can I attach the resulting file to this message / thread? (sorry, never done it before... :s)
    Friday, January 15, 2010 1:39 PM
  • Nevermind the traces (except if you still want them of course), it seems like the problem was on the configuration of the RFC destination : it was non-unicode! We have switched it to Unicode, and it's OK now!! 

    We are running some tests to be sure, but I think it's alright...

    Thank you very much for your help!!

    Best regards
    Simon
    Friday, January 15, 2010 1:58 PM
  • How can we receive IDOC from a SAP system which is on non unicode encoding.
    Ajeet Kumar
    Thursday, April 1, 2010 3:31 PM