/AWS1/IF_MDT=>GETFUNCTION()¶
About GetFunction¶
Retrieves the configuration and metadata for a function. For more information about functions, see Working with functions in the MediaTailor User Guide.
Method Signature¶
METHODS /AWS1/IF_MDT~GETFUNCTION
IMPORTING
!IV_FUNCTIONID TYPE /AWS1/MDT__STRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mdtgetfuncresponse
RAISING
/AWS1/CX_MDTCLIENTEXC
/AWS1/CX_MDTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_functionid TYPE /AWS1/MDT__STRING /AWS1/MDT__STRING¶
The identifier of the function.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_mdtgetfuncresponse /AWS1/CL_MDTGETFUNCRESPONSE¶
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->getfunction( |string| ).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv___string = lo_result->get_functionid( ).
lv_functiontype = lo_result->get_functiontype( ).
lv___string = lo_result->get_description( ).
lo_httprequestconfiguratio = lo_result->get_httprequestconfiguration( ).
IF lo_httprequestconfiguratio IS NOT INITIAL.
lv_runtimetype = lo_httprequestconfiguratio->get_runtime( ).
LOOP AT lo_httprequestconfiguratio->get_output( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv___string = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv_methodtype = lo_httprequestconfiguratio->get_methodtype( ).
lv___integer = lo_httprequestconfiguratio->get_reqtimeoutmilliseconds( ).
lv___string = lo_httprequestconfiguratio->get_url( ).
lv___string = lo_httprequestconfiguratio->get_body( ).
LOOP AT lo_httprequestconfiguratio->get_headers( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv___string = lo_value->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_customoutputconfigurati = lo_result->get_customoutputconf( ).
IF lo_customoutputconfigurati IS NOT INITIAL.
lv_runtimetype = lo_customoutputconfigurati->get_runtime( ).
LOOP AT lo_customoutputconfigurati->get_output( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv___string = lo_value->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_sequentialexecutorconfi = lo_result->get_sequentialexecutorconf( ).
IF lo_sequentialexecutorconfi IS NOT INITIAL.
lv_runtimetype = lo_sequentialexecutorconfi->get_runtime( ).
LOOP AT lo_sequentialexecutorconfi->get_output( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv___string = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_sequentialexecutorconfi->get_functionlist( ) into lo_row_1.
lo_row_2 = lo_row_1.
IF lo_row_2 IS NOT INITIAL.
lv___string = lo_row_2->get_runcondition( ).
lv___string = lo_row_2->get_functionid( ).
ENDIF.
ENDLOOP.
lv___integer = lo_sequentialexecutorconfi->get_timeoutmilliseconds( ).
ENDIF.
LOOP AT lo_result->get_tags( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv___string = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv___string = lo_result->get_arn( ).
ENDIF.