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: An update is available that adds the ClearRfcContext binding property to the WCF-based SAP adapter from BizTalk Adapter Pack 2.0 or BizTalk Adapter Pack 2010


View products that this article applies to.

Applies to

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

↑ Back to the top


Introduction

This article describes an update that is included in a cumulative update to add the ClearRfcContext binding property to the Microsoft Windows Communication Foundation (WCF)-based SAP adapter from Microsoft BizTalk Adapter Pack.

↑ Back to the top


Symptoms

Consider the following scenario:
  • You have a computer that is running Microsoft BizTalk Server 2006 R2, Microsoft BizTalk Server 2009 or Microsoft BizTalk Server 2010.
  • You use the WCF-based SAP adapter to connect to the SAP R/3 server.

    Note The WCF-based SAP adapter is included in Microsoft BizTalk Adapter Pack 2.0 or Microsoft BizTalk Adapter Pack 2010.

  • You create a BizTalk application that uses the SAP adapter to call remote function calls (RFCs) that use SAP global variables on the SAP R/3 server.
  • You set the EnableConnectionPooling binding property to True.

In this scenario, you notice that the data that is returned by the RFCs is not what you expected. Additionally, the data that is returned seems to be affected by a previous call that was made to the same RFCs.

The ClearRfcContext binding property can prevent problems similar to those that occur in this scenario.

↑ Back to the top


Cause

This problem occurs because, when connection pooling is enabled, the corresponding SAP connection is returned to the connection pool after an RFC call on the SAP R/3 server is executed. When the next RFC call arrives, the same SAP connection is retrieved from the connection pool and is used to execute the call.

If the RFC uses some global variables, and if they are not cleaned up appropriately, the next call to the RFC uses the values that are stored in the global variables from the previous call. This situation could lead to unexpected results.

Note This problem occurs only if the RFC uses global variables and if the global variables are not cleaned up appropriately by the RFC.

↑ Back to the top


Resolution

To resolve this problem, apply this update. Then, set the ClearRfcContext binding property to True.

Cumulative update information

BizTalk Adapter Pack 2010

The hotfix that resolves this issue is included in Cumulative Update 1 for BizTalk Adapter Pack 2010. 

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:
     2539794 Cumulative update package 1 for BizTalk Adapter Pack 2010

BizTalk Adapter Pack 2.0

This fix was first released in Cumulative update package 2 for BizTalk Adapter Pack 2.0. 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:
2531605 Cumulative update package 2 for BizTalk Adapter Pack 2.0

↑ Back to the top


More Information

Notes about this update

  • The ClearRfcContext binding property is applicable only when the EnableConnectionPooling binding property is set to True.
  • Without this update, the WCF-based SAP adapter does not clear the SAP R/3 context. Therefore, the behavior is identical to what occurs when the ClearRfcContext binding property is set to False. The default value is False.
  • When connection pooling is enabled and the ClearRfcContext binding property is set to True, the adapter flushes the SAP R/3 session and clears all global variables on the SAP server-side. Therefore, the next call on the same SAP connection is not affected by any state that was obtained by the current call.
  • When connection pooling is enabled and the ClearRfcContext binding property is set to False, the adapter does not clear the SAP R/3 session. In this case, if the RFC uses some global variables and the variables are not cleaned up appropriately, the next call to the RFC might use the values that are stored in the global variables from the current call. This situation can give unexpected results.
  • Because the ClearRfcContext binding property requires an additional roundtrip to the SAP R/3 server, you might see a small decrease in performance when you set the ClearRfcContext binding property to True. We recommend that you set the ClearRfcContext binding property to True only when the RFC uses global variables and the RFC is not cleaning up the global variables appropriately.
  • When you use the adapter in a proxy scenario such as from .NET code, you might want to clear the SAP R/3 session between RFC calls on the same proxy/channel instance. In this update, a new operation that is named RfcClearContext is available under the RFC node of the Add Adapter Service Reference wizard when the SapBinding option is selected. The RfcClearContext operation tries to clean the SAP R/3 context and returns one of the following:
    • True – The cleaning of the SAP R/3 context was successful. You can make additional calls on the proxy/channel.
    • False - The connection closed or developed an error when the operation tried to clean the SAP R/3 context. You should discard the current proxy/channel, because any further call could lead to a communication error.

↑ Back to the top


References

For more information about how to establish a connection to the SAP system, visit the following Microsoft Developer Network (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, kbexpertiseinter, kbsurveynew, kbbtsadapters, kb

↑ Back to the top

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