Skip to content

/AWS1/IF_PTS=>LISTPROSPCTFROMENGMTTASKS()

About ListProspectingFromEngagementTasks

Lists all prospecting tasks initiated by the caller's account. Supports optional filters by task identifier, task name, or start time range. Results can be sorted using configurable options. The response is paginated. Use the NextToken value from each response to retrieve subsequent pages.

Method Signature

METHODS /AWS1/IF_PTS~LISTPROSPCTFROMENGMTTASKS
  IMPORTING
    !IV_CATALOG TYPE /AWS1/PTSCATALOGIDENTIFIER OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/PTSPAGESIZE OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/PTSSTRING OPTIONAL
    !IT_TASKIDENTIFIER TYPE /AWS1/CL_PTSTASKIDLIST_W=>TT_TASKIDENTIFIERLIST OPTIONAL
    !IT_TASKNAME TYPE /AWS1/CL_PTSTASKNAMELIST_W=>TT_TASKNAMELIST OPTIONAL
    !IV_STARTAFTER TYPE /AWS1/PTSDATETIME OPTIONAL
    !IV_STARTBEFORE TYPE /AWS1/PTSDATETIME OPTIONAL
    !IO_SORT TYPE REF TO /AWS1/CL_PTSPROSPFROMENGTASORT OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ptslstpspfrmengtasrsp
  RAISING
    /AWS1/CX_PTSACCESSDENIEDEX
    /AWS1/CX_PTSINTERNALSERVEREX
    /AWS1/CX_PTSTHROTTLINGEX
    /AWS1/CX_PTSVALIDATIONEX
    /AWS1/CX_PTSCLIENTEXC
    /AWS1/CX_PTSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_catalog TYPE /AWS1/PTSCATALOGIDENTIFIER /AWS1/PTSCATALOGIDENTIFIER

Specifies the catalog to list tasks from. Specify AWS for production environments and Sandbox for testing and development purposes.

Optional arguments:

iv_maxresults TYPE /AWS1/PTSPAGESIZE /AWS1/PTSPAGESIZE

The maximum number of results to return in a single page. If additional results exist, the response includes a NextToken value for retrieving the next page. If omitted, the API uses a service-defined default page size.

iv_nexttoken TYPE /AWS1/PTSSTRING /AWS1/PTSSTRING

The pagination token from a previous call to this API. Include this value to retrieve the next page of results. If omitted, the first page is returned.

it_taskidentifier TYPE /AWS1/CL_PTSTASKIDLIST_W=>TT_TASKIDENTIFIERLIST TT_TASKIDENTIFIERLIST

Filters the results to include only the tasks with the specified identifiers. Provide up to 10 task IDs to narrow the list to specific tasks. If omitted, tasks are not filtered by identifier.

it_taskname TYPE /AWS1/CL_PTSTASKNAMELIST_W=>TT_TASKNAMELIST TT_TASKNAMELIST

Filters the results to include only tasks with the specified names. Provide up to 10 task names to narrow the list. If omitted, tasks are not filtered by name.

iv_startafter TYPE /AWS1/PTSDATETIME /AWS1/PTSDATETIME

Filters tasks to include only those that started after the specified timestamp. Use this with StartBefore to define a start-time range for your query. The format follows ISO 8601 date-time notation.

iv_startbefore TYPE /AWS1/PTSDATETIME /AWS1/PTSDATETIME

Filters tasks to include only those that started before the specified timestamp. Use this with StartAfter to define a start-time range for your query. The format follows ISO 8601 date-time notation.

io_sort TYPE REF TO /AWS1/CL_PTSPROSPFROMENGTASORT /AWS1/CL_PTSPROSPFROMENGTASORT

Specifies the field and order used to sort the returned tasks. If omitted, tasks are returned in the default sort order.

RETURNING

oo_output TYPE REF TO /aws1/cl_ptslstpspfrmengtasrsp /AWS1/CL_PTSLSTPSPFRMENGTASRSP

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->listprospctfromengmttasks(
  io_sort = new /aws1/cl_ptsprospfromengtasort(
    iv_sortby = |string|
    iv_sortorder = |string|
  )
  it_taskidentifier = VALUE /aws1/cl_ptstaskidlist_w=>tt_taskidentifierlist(
    ( new /aws1/cl_ptstaskidlist_w( |string| ) )
  )
  it_taskname = VALUE /aws1/cl_ptstasknamelist_w=>tt_tasknamelist(
    ( new /aws1/cl_ptstasknamelist_w( |string| ) )
  )
  iv_catalog = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_startafter = '20150101000000.0000000'
  iv_startbefore = '20150101000000.0000000'
).

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_nexttoken( ).
  LOOP AT lo_result->get_tasksummaries( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_prospectingtaskidentifi = lo_row_1->get_taskid( ).
      lv_prospectingtaskarn = lo_row_1->get_taskarn( ).
      lv_taskname = lo_row_1->get_taskname( ).
      lv_datetime = lo_row_1->get_starttime( ).
      lv_datetime = lo_row_1->get_endtime( ).
      lv_integer = lo_row_1->get_totalengagementcount( ).
      lv_integer = lo_row_1->get_completedengagementcount( ).
      lv_integer = lo_row_1->get_failedengagementcount( ).
    ENDIF.
  ENDLOOP.
ENDIF.