Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Applies to

This article applies to the following:

  • Microsoft BizTalk Adapter Pack 2.0

  • Microsoft BizTalk Adapter Pack 2010

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.

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.

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.

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:
     2539794Cumulative 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

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.

References

For more information about how to establish a connection to the SAP system, visit the following Microsoft Developer Network (MSDN) website:

Establishing a Connection to the SAP SystemFor 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

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×