Skip to content

/AWS1/IF_PTS=>STARTPROSPCTFROMENGMTTASK()

About StartProspectingFromEngagementTask

Starts a task to convert one or more engagement contexts into new prospecting leads. The task runs asynchronously. To poll for status, use GetProspectingFromEngagementTask, or use ListProspectingFromEngagementTasks to monitor multiple tasks.

Method Signature

METHODS /AWS1/IF_PTS~STARTPROSPCTFROMENGMTTASK
  IMPORTING
    !IV_CATALOG TYPE /AWS1/PTSCATALOGIDENTIFIER OPTIONAL
    !IT_IDENTIFIERS TYPE /AWS1/CL_PTSENGAGEMENTIDLIST_W=>TT_ENGAGEMENTIDENTIFIERLIST OPTIONAL
    !IV_TASKNAME TYPE /AWS1/PTSTASKNAME OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/PTSCLIENTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ptsstrtpspfrmengtsk01
  RAISING
    /AWS1/CX_PTSACCESSDENIEDEX
    /AWS1/CX_PTSCONFLICTEXCEPTION
    /AWS1/CX_PTSINTERNALSERVEREX
    /AWS1/CX_PTSRESOURCENOTFOUNDEX
    /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 in which the task is initiated. Specify AWS for production environments and Sandbox for testing and development purposes.

it_identifiers TYPE /AWS1/CL_PTSENGAGEMENTIDLIST_W=>TT_ENGAGEMENTIDENTIFIERLIST TT_ENGAGEMENTIDENTIFIERLIST

The list of engagement identifiers to include in this prospecting task. Each identifier must correspond to an existing engagement in the specified catalog. Maximum of 100 identifiers per task.

iv_taskname TYPE /AWS1/PTSTASKNAME /AWS1/PTSTASKNAME

A descriptive name for the task. This name helps identify the task in list and get operations. The name must contain 1 to 128 characters.

iv_clienttoken TYPE /AWS1/PTSCLIENTTOKEN /AWS1/PTSCLIENTTOKEN

A unique, case-sensitive identifier provided by the client to ensure idempotency. Making the same request with the same ClientToken returns the same response without creating a duplicate task.

RETURNING

oo_output TYPE REF TO /aws1/cl_ptsstrtpspfrmengtsk01 /AWS1/CL_PTSSTRTPSPFRMENGTSK01

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->startprospctfromengmttask(
  it_identifiers = VALUE /aws1/cl_ptsengagementidlist_w=>tt_engagementidentifierlist(
    ( new /aws1/cl_ptsengagementidlist_w( |string| ) )
  )
  iv_catalog = |string|
  iv_clienttoken = |string|
  iv_taskname = |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_identifiers( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_engagementidentifier = lo_row_1->get_value( ).
    ENDIF.
  ENDLOOP.
  lv_taskname = lo_result->get_taskname( ).
  lv_string = lo_result->get_message( ).
  lv_string = lo_result->get_reasoncode( ).
  lv_datetime = lo_result->get_starttime( ).
  lv_prospectingtaskidentifi = lo_result->get_taskid( ).
  lv_prospectingtaskarn = lo_result->get_taskarn( ).
  lv_prospectingtaskstatus = lo_result->get_taskstatus( ).
ENDIF.