/AWS1/IF_BDC=>GETRECOMMENDATION()¶
About GetRecommendation¶
Retrieves detailed information about a recommendation, including its configuration, status, and results.
Method Signature¶
METHODS /AWS1/IF_BDC~GETRECOMMENDATION
IMPORTING
!IV_RECOMMENDATIONID TYPE /AWS1/BDCRECOMMENDATIONID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdcgetrecresponse
RAISING
/AWS1/CX_BDCACCESSDENIEDEX
/AWS1/CX_BDCINTERNALSERVEREX
/AWS1/CX_BDCRESOURCENOTFOUNDEX
/AWS1/CX_BDCTHROTTLINGEX
/AWS1/CX_BDCVALIDATIONEX
/AWS1/CX_BDCCLIENTEXC
/AWS1/CX_BDCSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_recommendationid TYPE /AWS1/BDCRECOMMENDATIONID /AWS1/BDCRECOMMENDATIONID¶
The unique identifier of the recommendation to retrieve.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_bdcgetrecresponse /AWS1/CL_BDCGETRECRESPONSE¶
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->getrecommendation( |string| ).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_recommendationid = lo_result->get_recommendationid( ).
lv_recommendationarn = lo_result->get_recommendationarn( ).
lv_recommendationname = lo_result->get_name( ).
lv_recommendationdescripti = lo_result->get_description( ).
lv_recommendationtype = lo_result->get_type( ).
lo_recommendationconfig = lo_result->get_recommendationconfig( ).
IF lo_recommendationconfig IS NOT INITIAL.
lo_systempromptrecommendat = lo_recommendationconfig->get_systempromptrecconfig( ).
IF lo_systempromptrecommendat IS NOT INITIAL.
lo_systempromptconfig = lo_systempromptrecommendat->get_systemprompt( ).
IF lo_systempromptconfig IS NOT INITIAL.
lv_systemprompttext = lo_systempromptconfig->get_text( ).
lo_systempromptconfigurati = lo_systempromptconfig->get_configurationbundle( ).
IF lo_systempromptconfigurati IS NOT INITIAL.
lv_configurationbundlearn = lo_systempromptconfigurati->get_bundlearn( ).
lv_configurationbundlevers = lo_systempromptconfigurati->get_versionid( ).
lv_string = lo_systempromptconfigurati->get_systempromptjsonpath( ).
ENDIF.
ENDIF.
lo_agenttracesconfig = lo_systempromptrecommendat->get_agenttraces( ).
IF lo_agenttracesconfig IS NOT INITIAL.
LOOP AT lo_agenttracesconfig->get_sessionspans( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
ENDIF.
ENDLOOP.
lo_cloudwatchlogstraceconf = lo_agenttracesconfig->get_cloudwatchlogs( ).
IF lo_cloudwatchlogstraceconf IS NOT INITIAL.
LOOP AT lo_cloudwatchlogstraceconf->get_loggrouparns( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_cloudwatchlogstraceconf->get_servicenames( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_servicename = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
lv_timestamp = lo_cloudwatchlogstraceconf->get_starttime( ).
lv_timestamp = lo_cloudwatchlogstraceconf->get_endtime( ).
lo_cloudwatchlogsrule = lo_cloudwatchlogstraceconf->get_rule( ).
IF lo_cloudwatchlogsrule IS NOT INITIAL.
LOOP AT lo_cloudwatchlogsrule->get_filters( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_string = lo_row_7->get_key( ).
lv_cloudwatchlogsfilterope = lo_row_7->get_operator( ).
lo_filtervalue = lo_row_7->get_value( ).
IF lo_filtervalue IS NOT INITIAL.
lv_filterstringvalue = lo_filtervalue->get_stringvalue( ).
lv_double = lo_filtervalue->get_doublevalue( ).
lv_boolean = lo_filtervalue->get_booleanvalue( ).
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
lo_recommendationevaluatio = lo_systempromptrecommendat->get_evaluationconfig( ).
IF lo_recommendationevaluatio IS NOT INITIAL.
LOOP AT lo_recommendationevaluatio->get_evaluators( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_evaluatorarn = lo_row_9->get_evaluatorarn( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lo_tooldescriptionrecommen = lo_recommendationconfig->get_tooldescriptionrecconfig( ).
IF lo_tooldescriptionrecommen IS NOT INITIAL.
lo_tooldescriptionsource = lo_tooldescriptionrecommen->get_tooldescription( ).
IF lo_tooldescriptionsource IS NOT INITIAL.
lo_tooldescriptiontextinpu = lo_tooldescriptionsource->get_tooldescriptiontext( ).
IF lo_tooldescriptiontextinpu IS NOT INITIAL.
LOOP AT lo_tooldescriptiontextinpu->get_tools( ) into lo_row_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
lv_recommendationtoolname = lo_row_11->get_toolname( ).
lo_tooldescriptionconfig = lo_row_11->get_tooldescription( ).
IF lo_tooldescriptionconfig IS NOT INITIAL.
lv_tooldescriptiontext = lo_tooldescriptionconfig->get_text( ).
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
lo_tooldescriptionconfigur = lo_tooldescriptionsource->get_configurationbundle( ).
IF lo_tooldescriptionconfigur IS NOT INITIAL.
lv_configurationbundlearn = lo_tooldescriptionconfigur->get_bundlearn( ).
lv_configurationbundlevers = lo_tooldescriptionconfigur->get_versionid( ).
LOOP AT lo_tooldescriptionconfigur->get_tools( ) into lo_row_12.
lo_row_13 = lo_row_12.
IF lo_row_13 IS NOT INITIAL.
lv_recommendationtoolname = lo_row_13->get_toolname( ).
lv_string = lo_row_13->get_tooldescriptionjsonpath( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lo_agenttracesconfig = lo_tooldescriptionrecommen->get_agenttraces( ).
IF lo_agenttracesconfig IS NOT INITIAL.
LOOP AT lo_agenttracesconfig->get_sessionspans( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
ENDIF.
ENDLOOP.
lo_cloudwatchlogstraceconf = lo_agenttracesconfig->get_cloudwatchlogs( ).
IF lo_cloudwatchlogstraceconf IS NOT INITIAL.
LOOP AT lo_cloudwatchlogstraceconf->get_loggrouparns( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_cloudwatchlogstraceconf->get_servicenames( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_servicename = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
lv_timestamp = lo_cloudwatchlogstraceconf->get_starttime( ).
lv_timestamp = lo_cloudwatchlogstraceconf->get_endtime( ).
lo_cloudwatchlogsrule = lo_cloudwatchlogstraceconf->get_rule( ).
IF lo_cloudwatchlogsrule IS NOT INITIAL.
LOOP AT lo_cloudwatchlogsrule->get_filters( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_string = lo_row_7->get_key( ).
lv_cloudwatchlogsfilterope = lo_row_7->get_operator( ).
lo_filtervalue = lo_row_7->get_value( ).
IF lo_filtervalue IS NOT INITIAL.
lv_filterstringvalue = lo_filtervalue->get_stringvalue( ).
lv_double = lo_filtervalue->get_doublevalue( ).
lv_boolean = lo_filtervalue->get_booleanvalue( ).
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
lv_recommendationstatus = lo_result->get_status( ).
lv_timestamp = lo_result->get_createdat( ).
lv_timestamp = lo_result->get_updatedat( ).
lo_recommendationresult = lo_result->get_recommendationresult( ).
IF lo_recommendationresult IS NOT INITIAL.
lo_systempromptrecommendat_1 = lo_recommendationresult->get_systempromptrecresult( ).
IF lo_systempromptrecommendat_1 IS NOT INITIAL.
lv_systemprompttext = lo_systempromptrecommendat_1->get_recommendedsystemprompt( ).
lo_recommendationresultcon = lo_systempromptrecommendat_1->get_configurationbundle( ).
IF lo_recommendationresultcon IS NOT INITIAL.
lv_configurationbundlearn = lo_recommendationresultcon->get_bundlearn( ).
lv_configurationbundlevers = lo_recommendationresultcon->get_versionid( ).
ENDIF.
lv_recommendationerrorcode = lo_systempromptrecommendat_1->get_errorcode( ).
lv_recommendationerrormess = lo_systempromptrecommendat_1->get_errormessage( ).
ENDIF.
lo_tooldescriptionrecommen_1 = lo_recommendationresult->get_tooldescriptionrecresult( ).
IF lo_tooldescriptionrecommen_1 IS NOT INITIAL.
LOOP AT lo_tooldescriptionrecommen_1->get_tools( ) into lo_row_14.
lo_row_15 = lo_row_14.
IF lo_row_15 IS NOT INITIAL.
lv_recommendationtoolname = lo_row_15->get_toolname( ).
lv_tooldescriptiontext = lo_row_15->get_recommendedtooldesc( ).
ENDIF.
ENDLOOP.
lo_recommendationresultcon = lo_tooldescriptionrecommen_1->get_configurationbundle( ).
IF lo_recommendationresultcon IS NOT INITIAL.
lv_configurationbundlearn = lo_recommendationresultcon->get_bundlearn( ).
lv_configurationbundlevers = lo_recommendationresultcon->get_versionid( ).
ENDIF.
lv_recommendationerrorcode = lo_tooldescriptionrecommen_1->get_errorcode( ).
lv_recommendationerrormess = lo_tooldescriptionrecommen_1->get_errormessage( ).
ENDIF.
ENDIF.
ENDIF.