cancel
Showing results for 
Search instead for 
Did you mean: 

.net Connector transaction commit issue

Former Member
0 Kudos

Hello,

I am trying to commit a transaction that consists of a single BAPI (BAPI_ACC_GL_POSTING_POST)

When I invoke the function prior to the commit, the document is created with Document Number that is greater by 1  than the document number i got from the BAPI invocation output.

When I do not invoke the function prior to transaction commit, then I got Document Number that is MAX+1, however I do not receive any output data from the RfcFunction.

The steps for calling the function are as followed:

RfcTID tid = new RfcTID(Guid.NewGuid());

RfcTransaction transaction = new RfcTransaction(tid);

transaction.Add(fn);

fn.Invoke(destination);

transaction.Commit(destination);

Please advise.

Thanks in advance,

Aaron

Accepted Solutions (1)

Accepted Solutions (1)

former_member197445
Contributor
0 Kudos

Have you tried calling BAPI_TRANSACTION_COMMIT in a session manager instead of using the RFCTransaction.Commit method?  See example here.

RfcSessionManager.BeginContext(destination)

bapiGL.Invoke(_ecc)
bapiCommit.Invoke(_ecc)

RfcSessionManager.EndContext(destination)

Former Member
0 Kudos

Works like a charm.

Thanks.

Answers (0)