0
votes

I've got a problem. When performing the Code below via RFC , our Background Code, developed by some externs, is not executed, but when starting the BAPIs via the SE37 via frequenzy, our backgroundprogram is started.

System: SAP R/3 / sapnco.dll in C#; librfc32.dll on drive C: (included with SAP installation)

... some Code ...
RfcSessionManager.BeginContext(rfcDest);
...
IRfcFunction myfun = rfcRep.CreateFunction("BAPI_EQUI_DISMANTLE");
myfun.SetValue(.....);
myfun.Invoke(rfcDest);

myfun = rfcRep.CreateFunction("BAPI_TRANSACTION_COMMIT");
myfun.Invoke(rfcDest);
RfcSessionManager.EndContext(rfcDest);

Any idea whats wrong? I am not allowed to post our ABAP Code , but I think that should not be a problem.

1
The problem is most likely located within the ABAP coding, so it's difficult to tell without examining the ABAP code in detail. - vwegert
what happens if you check the code execution by using an external breakpoint in the BAPI ? - PATRY Guillaume
If I use an external breakpoint in the BAPI, how can i use debug information when using this BAPI via c#? Is there any kind of "debug console" for .net or anything that i can use therefore? Thanks a lot for your answers! - EifelYeti
If you remain logged into SAP-GUI, the debugger should automatically popup as an additional window, when code reaches external breakpoint (only in case you have multiple application servers, make sure your C# code talks to the same one, which you are logged into via SAP-GUI) - Tom Burger
Does this also work if my SAP Gui does not run on the same machine as my programm? We use terminalserver for our SAP enviroment, but i code on a local machine because of performance reasons. If i need a local installation of SAP, that would also work, but i need to ask some coleages. Thanks in advanced - EifelYeti

1 Answers

0
votes

It was an error in our abab code.

Sorry guys for wasting your time. When using the BAPI from outside, there is one flag missing, which is nessesary for our programm.

Know we add the flag, an everything works fine.

Thanks for all your answers, the external Breakpoint was a good idea.