FIX: "The formatter threw an exception while trying to deserialize the message" error when the WCF-SAP adapter in BizTalk Adapter Pack executes an RFC or BAPI to an SAP system

Article translations Article translations
Article ID: 2563231 - View products that this article applies to.
Expand all | Collapse all

On This Page

This article applies to the following product:
  • BizTalk Adapter Pack 2.0
  • BizTalk Adapter Pack 2010

SYMPTOMS

Consider the following scenario:
  • You install Microsoft BizTalk Adapter for mySAP Business Suite 3.0 on a computer.

    Note BizTalk Adapter for mySAP Business Suite 3.0 is included in the Microsoft BizTalk Adapter Pack 2.0 or in the Microsoft BizTalk Adapter Pack 2010 .
  • The WCF-SAP adapter executes a remote function call (RFC) or Business Application Programming Interface (BAPI) to an SAP system.
  • The SAP system returns a negative decimal value of the RFC_BCD data type.
In this scenario, you may receive an error that resembles the following:
The formatter threw an exception while trying to deserialize the message:
There was an error while trying to deserialize parameter http://Microsoft.LobServices.Sap/2007/03/Rfc/:EXPHEADER.
The InnerException message was 'There was an error deserializing the object of type microsoft.lobservices.sap._2007._03.Types.Rfc.BAPIMEPOHEADER.
The value '-*<decimal value>' cannot be parsed as the type 'decimal'.'

CAUSE

This issue occurs because the RFC_BCD value is converted to the .NET String data type incorrectly.

When the RFC_BCD value is converted to the .NET String data type, the WCF-SAP adapter does not allocate enough memory locations to convert the value. Therefore, an exception is encountered.

RESOLUTION

Cumulative update information

For BizTalk Adapter Pack 2010

The hotfix that resolves this issue is included in cumulative update package 2 for BizTalk Adapter Pack 2010. For more information about how to obtain this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:

2572999Cumulative update package 2 for BizTalk Adapter Pack 2010

For BizTalk Adapter Pack 2.0

The hotfix that resolves this issue is included in cumulative update package 3 for BizTalk Adapter Pack 2.0.

For more information about how to obtain the cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2557150 Cumulative update package 3 for BizTalk Adapter Pack 2.0

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about SAP data types, visit the following MSDN website:
General information about SAP data types
For more information about BizTalk Server hotfixes, click the following article number to view the article in the Microsoft Knowledge Base:
2003907 Information about BizTalk Server hotfixes

Properties

Article ID: 2563231 - Last Review: August 31, 2011 - Revision: 3.0
APPLIES TO
  • Microsoft BizTalk Adapter 2.0 for SAP
Keywords: 
kbqfe kbfix kbbtsadapters kbsurveynew kbexpertiseadvanced KB2563231

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com