Skip to content

/AWS1/IF_PTS=>STRTOPPORTUNITYFRMENGAGEME00()

About StartOpportunityFromEngagementTask

This action creates an opportunity from an existing engagement context. The task is asynchronous and orchestrates the process of converting engagement contextual information into a structured opportunity record within the partner's account.

Method Signature

METHODS /AWS1/IF_PTS~STRTOPPORTUNITYFRMENGAGEME00
  IMPORTING
    !IV_CATALOG TYPE /AWS1/PTSCATALOGIDENTIFIER OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/PTSCLIENTTOKEN OPTIONAL
    !IV_IDENTIFIER TYPE /AWS1/PTSENGAGEMENTARNORID OPTIONAL
    !IV_CONTEXTIDENTIFIER TYPE /AWS1/PTSCONTEXTIDENTIFIER OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_PTSTAG=>TT_TAGLIST OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ptsstrtopportunityf01
  RAISING
    /AWS1/CX_PTSACCESSDENIEDEX
    /AWS1/CX_PTSCONFLICTEXCEPTION
    /AWS1/CX_PTSINTERNALSERVEREX
    /AWS1/CX_PTSRESOURCENOTFOUNDEX
    /AWS1/CX_PTSSERVICEQUOTAEXCDEX
    /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 opportunity creation task is executed. Acceptable values include AWS for production and Sandbox for testing environments.

iv_clienttoken TYPE /AWS1/PTSCLIENTTOKEN /AWS1/PTSCLIENTTOKEN

A unique token provided by the client to help ensure the idempotency of the request. It helps prevent the same task from being performed multiple times.

iv_identifier TYPE /AWS1/PTSENGAGEMENTARNORID /AWS1/PTSENGAGEMENTARNORID

The unique identifier of the engagement from which the opportunity creation task is to be initiated. This helps ensure that the task is applied to the correct engagement.

iv_contextidentifier TYPE /AWS1/PTSCONTEXTIDENTIFIER /AWS1/PTSCONTEXTIDENTIFIER

The unique identifier of the engagement context from which to create the opportunity. This specifies the specific contextual information within the engagement that will be used for opportunity creation.

Optional arguments:

it_tags TYPE /AWS1/CL_PTSTAG=>TT_TAGLIST TT_TAGLIST

A map of the key-value pairs of the tag or tags to assign.

RETURNING

oo_output TYPE REF TO /aws1/cl_ptsstrtopportunityf01 /AWS1/CL_PTSSTRTOPPORTUNITYF01

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->strtopportunityfrmengageme00(
  it_tags = VALUE /aws1/cl_ptstag=>tt_taglist(
    (
      new /aws1/cl_ptstag(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  iv_catalog = |string|
  iv_clienttoken = |string|
  iv_contextidentifier = |string|
  iv_identifier = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_taskidentifier = lo_result->get_taskid( ).
  lv_taskarn = lo_result->get_taskarn( ).
  lv_datetime = lo_result->get_starttime( ).
  lv_taskstatus = lo_result->get_taskstatus( ).
  lv_string = lo_result->get_message( ).
  lv_reasoncode = lo_result->get_reasoncode( ).
  lv_opportunityidentifier = lo_result->get_opportunityid( ).
  lv_resourcesnapshotjobiden = lo_result->get_resourcesnapshotjobid( ).
  lv_engagementidentifier = lo_result->get_engagementid( ).
  lv_contextidentifier = lo_result->get_contextid( ).
ENDIF.