on 2024 Mar 08 11:15 AM
Hello together
Use case:
I call the module RFC_CALL_TRANSACTION_USING from my external application via RFC.
I would like to call the transaction "IE03" and display it in the GUI.
I also transfer the equipment no.
Result:
The GUI window opens in the transaction with the correct equipment
Problem:
The GUI window can no longer be closed until I close my external application.
Code:
public void CALLTRANSACTION(string TCode, string EQNr)
{
// Rufe die SAP Einstellungen auf
var sapDestination = sapConnector.GetDestination2();
// Funktionsbaustein aufrufen
var function_Transaction_Call = sapDestination.Repository.CreateFunction("RFC_CALL_TRANSACTION_USING");
// Setze die Parameter des Funktionsbausteins
function_Transaction_Call.SetValue("TCODE", TCode);
function_Transaction_Call.SetValue("MODE", "E");
// Struktur vorbereiten
var BT_DATA = function_Transaction_Call.GetTable("BT_DATA");
BT_DATA.Clear();
BT_DATA.Append();
BT_DATA.SetValue("PROGRAM", "SAPMIEQ0");
BT_DATA.SetValue("DYNPRO", "0100");
BT_DATA.SetValue("DYNBEGIN", "X");
BT_DATA.Append();
BT_DATA.SetValue("FNAM", "BDC_CURSOR");
BT_DATA.SetValue("FVAL", "RM63E-EQUNR");
BT_DATA.Append();
BT_DATA.SetValue("FNAM", "BDC_OKCODE");
BT_DATA.SetValue("FVAL", "/00");
BT_DATA.Append();
BT_DATA.SetValue("FNAM", "RM63E-EQUNR");
BT_DATA.SetValue("FVAL", EQNr);
function_Transaction_Call.Invoke(sapDestination);
}
Request clarification before answering.
Hello,
the Gui window remains open as long as the corresponding backend user session is alive. In this scenario, the first login happens via RFC protocol (the DIAG / Gui connection is opened later and then attached to the existing user session), so the logoff also has to happen via RFC, which happens simply by closing the RFC connection.
In your case it looks like you are using SAP NCo, right? That means, you would need to implement your own ISessionProvider and trigger the session end event, when you are done. Or alternatively, using a connection pool timeout of 1s might also work. Then NCo would close the connection 1s after the last RFC call.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.