on 05-09-2011 3:07 PM
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
}
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...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.