Skip to Content
avatar image
Former Member

SAP Transaction in Two phase Commit ?

Hi all,

When we make a connection to SAP system from .NET application using .NET connector, we can make calls to transactional BAPI/RFC’s. But is there any way in which we can make SAP transaction take part in MS DTC (Microsoft Distributed Transaction Coordinator) transactions?

We want to implement a two phase commit and hence this question. Please let us know if you are aware of any mechanism using which we can implement a two phase commit.

The call scenario is described below:



1. SQL_StoredProc1();

2. SQL_StoresProc2();

10. SAP_TransactionBAPI();

11. SQLStoredProcn();

12. SQLTransaction_Commit();

13. SAPTransaction_Commit();


Exception ()





In the above case all the statements have to be executed successfully or they have to be rolled back. Let’s think of the situation where all the statements up to line 13 have been executed successfully, but there was a failure during the commit of SAP, and then we have to rollback the SQL transaction also which is already committed.

This situation can be handled if and only if SAP transaction manager follows XA transaction protocol and it can include itself in MSDTC. So that every transaction manager votes for the commit (it can be called half commit) if the transaction is successful otherwise all the transactions should be rolled back.

Can anybody tell me the way to include SAP transaction manager in MSDTC if it at all possible?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Feb 08, 2006 at 05:08 AM

    Hi Saket,

    I did not understand much of your query but just wanted to know how are you making a connection to the backend here?

    If using DataSources and if the datasource is configured directly in the EP server (using Visual Administrator), you have an option of the required 2-way commit.

    The datasource takes care of it directly. Apart from this, the datasource will also take cre of the connection pooling.

    Hope this helps.

    Awaiting Reply.

    Warm Regards,


    Add comment
    10|10000 characters needed characters exceeded