cancel
Showing results for 
Search instead for 
Did you mean: 

NCo 3 RfcServer: TransactionID in called function always NULL

Former Member
0 Kudos

Hello,

using NCo 3 (v3.0.1, x64) I wrote a RfcServer which receives IDocs via the function "IDOC_INBOUND_ASYNCHRONOUS". When the function is called by SAP the TransactionIDHandler seems to work fine as these functions are called together with a TransactionID (CheckTransactionID, Rollback, ConfirmTransactionID). But if my implemented function itself is called it never belongs to the Transaction (RfcServerContext.TransactionID == NULL and RfcServerContext.InTransaction == false).

Execution sequence:

- Check transaction (with ID)

- IDOC_INBOUND_ASYNCHRONOUS (without TransactionID)

- Rollback transaction (with ID)

- Confirm transaction (with ID)

As I'm new to the NCo I wonder if this is the correct behaviour. I expect to get the transaction ID passed into the function call. Otherwise I don't know which transaction the function call belongs to. Any help appreciated.

Thanks,

Mathias


//...
    Type[] handlers = new Type[1] { typeof(RFC_Server_Handler) };
    RfcServer server = RfcServerManager.GetServer("DEV", handlers);
    server.RfcServerError += OnRfcServerError;
    server.RfcServerApplicationError += OnRfcServerError;
    server.RfcServerStateChanged += OnRfcServerStateChanged;
    server.TransactionIDHandler = new RFC_Transaction_Handler();
    server.Start();
//...


[RfcServerFunction(Name = "IDOC_INBOUND_ASYNCHRONOUS", Default = false)]
public void IDOC_INBOUND_ASYNCHRONOUS(RfcServerContext context, IRfcFunction function) {
    //...
    //context.TransactionID is null
    //context.InTransaction is false
}

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Solved the problem. This seems to be a bug in NCo v3.0.1. After updating to v3.0.2 it works!

This would have been easier if there was a changelog or known bugs page...

Former Member
0 Kudos

Hello Mathias;

I wonder how the implementation of server.TransactionIDHandler RFC_Transaction_Handler = new ();

Thank you!