Example: sapgui_select_active_window

The following example uses sapgui_select_active_window to select the first open window of the first session of the My Connection channel to the R/3 server.

// Connect to R/3 server, and log on
sapgui_open_connection("My Connection", "con[0]");
sapgui_select_active_session("ses[0]");
// logging on as MyUserName
sapgui_logon("MyUserName", "MyPassword", 
    "800", "EN", LAST );
sapgui_select_active_window("wnd[0]");