Example: sapgui_call_method_of_active_object Method and Property Functions

Invokes a method of the active object and saves the return value to a parameter.

int  sapgui_call_method_of_active_object_ex( const char *method_name, const char *outputParamName, char *arg1, ... char *argn, [optionalArguments,] LAST );
method_name The name of the SAP method to invoke
outputParamName The parameter in which to store the return value of the call.
arg1...argn Arguments to the method.
optionalArguments Optional Arguments
LAST A marker indicating the end of the argument list. Not required if Optional Arguments are used.

The function sapgui_call_method_of_active_object_ex invokes the method method_name of the current active object selected by sapgui_active_object_from_parent_method or sapgui_active_object_from_parent_property. The return value of the invoked method is stored in parameter outputParamName.

The return value can be a simple value or a GuiCollection Array.

args are the arguments that are passed to the control's method. See SAP documentation for discussion of object methods and their arguments.

Return Values

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


You can parameterize all string (char type) arguments.

Concept Link IconSee Also