Share this page

# sapgui_active_object_from_parent_property

Method and Property Functions

Selects an object that is a property of a parent object.

    int sapgui_active_object_from_parent_property( const char *control_id, const char *property_name, [args,] LAST );

control_id | Object ID Strings
property_name | The name of the SAP GUI Object Properties
args | Optional Arguments
LAST | A marker indicating the end of the argument list. Not required if Optional Arguments are used.

The function sapgui_active_object_from_parent_property selects an object from within a larger parent object with an identification number control_id. The embedded object is returned by the property property_name.

For example, a scrollbar of a table has no specific control ID. However, you can access the scrollbar by passing both the ID of the table control (as control_id) and the SAP table object property, for instance HorizontalScrollbar (as property_name).

After sapgui_active_object_from_parent_property, the control becomes the active object. Invocations of sapgui_call_method_of_active_object, sapgui_set_property_of_active_object, or sapgui_get_property_of_active_object will apply to that object.

## Return Values

This function returns LR_PASS (0) on success or LR_FAIL (1) on failure.

## Parameterization

You can parameterize all string (char type) arguments.

## Example

The following example uses sapgui_active_object_from parent_method to select the horizontal scrollbar of a table.

Copy code

    Action() {
        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_property(
            "usr/tabsMENU_TABSTRIP/tabpTAB01/ssubSUBSCR_MENU:SAPMP5
            0A:0400/subSUBSCR_ITMENU:SAPMP50A:0310/tblSAPM"
            "HorizontalScrollbar", LAST );
        ...
        return 0;
    }

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: