Skip to content

/AWS1/IF_DOA=>LISTGOALS()

About ListGoals

Lists goals in the specified agent space with optional filtering

Method Signature

METHODS /AWS1/IF_DOA~LISTGOALS
  IMPORTING
    !IV_AGENTSPACEID TYPE /AWS1/DOAAGENTSPACEID OPTIONAL
    !IV_STATUS TYPE /AWS1/DOAGOALSTATUS OPTIONAL
    !IV_GOALTYPE TYPE /AWS1/DOAGOALTYPE OPTIONAL
    !IV_LIMIT TYPE /AWS1/DOAINTEGER OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/DOANEXTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_doalistgoalsresponse
  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

Optional arguments:

iv_status TYPE /AWS1/DOAGOALSTATUS /AWS1/DOAGOALSTATUS

Filter goals by goal status

iv_goaltype TYPE /AWS1/DOAGOALTYPE /AWS1/DOAGOALTYPE

Filter goals by goal type

iv_limit TYPE /AWS1/DOAINTEGER /AWS1/DOAINTEGER

Maximum number of goals to return

iv_nexttoken TYPE /AWS1/DOANEXTTOKEN /AWS1/DOANEXTTOKEN

Pagination token for the next set of results

RETURNING

oo_output TYPE REF TO /aws1/cl_doalistgoalsresponse /AWS1/CL_DOALISTGOALSRESPONSE

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->listgoals(
  iv_agentspaceid = |string|
  iv_goaltype = |string|
  iv_limit = 123
  iv_nexttoken = |string|
  iv_status = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  LOOP AT lo_result->get_goals( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_string = lo_row_1->get_agentspacearn( ).
      lv_string = lo_row_1->get_goalid( ).
      lv_string = lo_row_1->get_title( ).
      lo_goalcontent = lo_row_1->get_content( ).
      IF lo_goalcontent IS NOT INITIAL.
        lv_string = lo_goalcontent->get_description( ).
        lv_string = lo_goalcontent->get_objectives( ).
      ENDIF.
      lv_goalstatus = lo_row_1->get_status( ).
      lv_goaltype = lo_row_1->get_goaltype( ).
      lv_backlogtimestamp = lo_row_1->get_createdat( ).
      lv_backlogtimestamp = lo_row_1->get_updatedat( ).
      lv_backlogtimestamp = lo_row_1->get_lastevaluatedat( ).
      lv_string = lo_row_1->get_lasttaskid( ).
      lv_string = lo_row_1->get_lastsuccessfultaskid( ).
      lv_integer = lo_row_1->get_version( ).
      lo_goalschedule = lo_row_1->get_evaluationschedule( ).
      IF lo_goalschedule IS NOT INITIAL.
        lv_schedulerstate = lo_goalschedule->get_state( ).
        lv_string = lo_goalschedule->get_expression( ).
      ENDIF.
    ENDIF.
  ENDLOOP.
  lv_string = lo_result->get_nexttoken( ).
ENDIF.