Example: sapgui_select_active_connection
The following example uses sapgui_select_active_connection select the first connection.
// Open a connection to the server as the first active connection
sapgui_open_connection_ex(
" /SAP_CODEPAGE=1100 /FULLMENU MyServer 00 /3",
"MyServer",
"con[0]");
// Activate the first connection
sapgui_select_active_connection("con[0]");
// Activate the first session
sapgui_select_active_session("ses[0]");
// Activate the first window (SAP Logon)
sapgui_select_active_window("wnd[0]");
// Log on
sapgui_logon("MyUser",
"MyPassword",
"800",
"EN", LAST );