Skip to content

/AWS1/IF_DOA=>UPDATERECOMMENDATION()

About UpdateRecommendation

Updates an existing recommendation with new content, status, or metadata

Method Signature

METHODS /AWS1/IF_DOA~UPDATERECOMMENDATION
  IMPORTING
    !IV_AGENTSPACEID TYPE /AWS1/DOAAGENTSPACEID OPTIONAL
    !IV_RECOMMENDATIONID TYPE /AWS1/DOARESOURCEID OPTIONAL
    !IV_STATUS TYPE /AWS1/DOARECOMMENDATIONSTATUS OPTIONAL
    !IV_ADDITIONALCONTEXT TYPE /AWS1/DOASTRING OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/DOASTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_doaupdaterecresponse
  RAISING
    /AWS1/CX_DOAACCESSDENIEDEX
    /AWS1/CX_DOACONFLICTEXCEPTION
    /AWS1/CX_DOACONTENTSIZEEXCDEX
    /AWS1/CX_DOAINTERNALSERVEREX
    /AWS1/CX_DOAINVALIDPARAMETEREX
    /AWS1/CX_DOARESOURCENOTFOUNDEX
    /AWS1/CX_DOASERVICEQUOTAEXCDEX
    /AWS1/CX_DOATHROTTLINGEX
    /AWS1/CX_DOAVLDTNEXCEPTION
    /AWS1/CX_DOACLIENTEXC
    /AWS1/CX_DOASERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_agentspaceid TYPE /AWS1/DOAAGENTSPACEID /AWS1/DOAAGENTSPACEID

The unique identifier for the agent space containing the recommendation

iv_recommendationid TYPE /AWS1/DOARESOURCEID /AWS1/DOARESOURCEID

The unique identifier for the recommendation to update

Optional arguments:

iv_status TYPE /AWS1/DOARECOMMENDATIONSTATUS /AWS1/DOARECOMMENDATIONSTATUS

Current status of the recommendation

iv_additionalcontext TYPE /AWS1/DOASTRING /AWS1/DOASTRING

Additional context for recommendation

iv_clienttoken TYPE /AWS1/DOASTRING /AWS1/DOASTRING

A unique token that ensures idempotency of the request

RETURNING

oo_output TYPE REF TO /aws1/cl_doaupdaterecresponse /AWS1/CL_DOAUPDATERECRESPONSE

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->updaterecommendation(
  iv_additionalcontext = |string|
  iv_agentspaceid = |string|
  iv_clienttoken = |string|
  iv_recommendationid = |string|
  iv_status = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_recommendation = lo_result->get_recommendation( ).
  IF lo_recommendation IS NOT INITIAL.
    lv_string = lo_recommendation->get_agentspacearn( ).
    lv_string = lo_recommendation->get_recommendationid( ).
    lv_string = lo_recommendation->get_taskid( ).
    lv_string = lo_recommendation->get_goalid( ).
    lv_string = lo_recommendation->get_title( ).
    lo_recommendationcontent = lo_recommendation->get_content( ).
    IF lo_recommendationcontent IS NOT INITIAL.
      lv_string = lo_recommendationcontent->get_summary( ).
      lv_string = lo_recommendationcontent->get_spec( ).
    ENDIF.
    lv_recommendationstatus = lo_recommendation->get_status( ).
    lv_recommendationpriority = lo_recommendation->get_priority( ).
    lv_long = lo_recommendation->get_goalversion( ).
    lv_string = lo_recommendation->get_additionalcontext( ).
    lv_backlogtimestamp = lo_recommendation->get_createdat( ).
    lv_backlogtimestamp = lo_recommendation->get_updatedat( ).
    lv_long = lo_recommendation->get_version( ).
  ENDIF.
ENDIF.