Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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

↑ Back to the top


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

↑ Back to the top


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.

↑ Back to the top


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:


2572999 Cumulative 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

↑ Back to the top


Status

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

↑ Back to the top


More Information

For more information about SAP data types, visit the following MSDN website:
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

↑ Back to the top


Keywords: kbqfe, kbfix, kbbtsadapters, kbsurveynew, kbexpertiseadvanced, kb

↑ Back to the top

Article Info
Article ID : 2563231
Revision : 2
Created on : 9/11/2018
Published on : 9/11/2018
Exists online : False
Views : 333