sapgui_get_property
| Method and Property Functions |
Retrieves the property of a SAP object.
int sapgui_get_property( const char *control_id, const char *property_name, char *output_param_name, [args,] LAST );
| control_id | Object ID Strings |
| property_name | The name of the SAP GUI Object Properties to retrieve |
| output_param_name | A VuGen parameter to store the value of the property |
| args | Optional Arguments |
| LAST | A marker indicating the end of the argument list. Not required if Optional Arguments are used. |
The sapgui_get_property data retrieval function gets the value of the specified property property_name, in the SAP object with the identification number control_id. The value is saved in output_param_name.
Note that if the property is a set of strings, the function returns the property in the form string1,string2,...,stringn.
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_set_property to set the text within the command window to "dwdm". The script then verifies the text by retrieving it using sapgui_get_property and writing to a parameter ParamName1.
Action() {
sapgui_select_active_window("wnd[0]");
sapgui_set_property("tbar[0]/okcd",
"text",
"dwdm", LAST );
// Verification - not recorded function
sapgui_get_property("tbar[0]/okcd",
"text", "ParamName1",LAST );
//Output is "dwdm"
lr_output_message(lr_eval_string("{ParamName1}"));
return 0;
}

