Example: sapgui_set_property_of_active_object

The following example uses sapgui_active_object_from_parent_method to select the 5th row within a table. The row's selected property is then set to true using sapgui_set_property_of_active_object.

Action() {
// Connect to R/3 server, and log on
sapgui_open_connection("My Connection", "con[0]");
sapgui_select_active_session("ses[0]");
sapgui_logon("MyUserName", "MyPassword", "800",
    "EN", LAST );
sapgui_select_active_window("wnd[0]");
// Selecting 5-th row on "Basic personal data" tab
sapgui_set_property(
"shellcont/shell/shellcont[0]/shell/shellcont[1]/shell[1]",
    "HierarchyHeaderWidth", "251", LAST );
sapgui_active_object_from_parent_method(
"usr/tabsMENU_TABSTRIP/tabpTAB01/ssubSUBSCR_MENU:SAPMP50A:0400/subSUBSCR_ITMENU:SAPMP50A:0310/tblSAPM/P50ATC_MENU",
    "getAbsoluteRow", "5", LAST );
sapgui_set_property_of_active_object("selected", "True", 
    LAST );
// Now verify the set property
sapgui_get_property_of_active_object("selected", 
    "ParamName2", LAST );
lr_output_message(lr_eval_string("Status bar text = {ParamName2}"));
return 0;
}