/AWS1/IF_PTS=>LISTOPPORTUNITIES()¶
About ListOpportunities¶
This request accepts a list of filters that retrieve opportunity subsets as well as sort options. This feature is available to partners from Partner Central using the ListOpportunities API action.
To synchronize your system with Amazon Web Services, list only the opportunities that were newly created or updated. We recommend you rely on events emitted by the service into your Amazon Web Services account’s Amazon EventBridge default event bus. You can also use the ListOpportunities action.
We recommend the following approach:
-
Find the latest
LastModifiedDatethat you stored, and only use the values that came from Amazon Web Services. Don’t use values generated by your system. -
When you send a
ListOpportunitiesrequest, submit the date in ISO 8601 format in theAfterLastModifiedDatefilter. -
Amazon Web Services only returns opportunities created or updated on or after that date and time. Use
NextTokento iterate over all pages.
Method Signature¶
METHODS /AWS1/IF_PTS~LISTOPPORTUNITIES
IMPORTING
!IV_CATALOG TYPE /AWS1/PTSCATALOGIDENTIFIER OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/PTSPAGESIZE OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/PTSSTRING OPTIONAL
!IO_SORT TYPE REF TO /AWS1/CL_PTSOPPORTUNITYSORT OPTIONAL
!IO_LASTMODIFIEDDATE TYPE REF TO /AWS1/CL_PTSLASTMODIFIEDDATE OPTIONAL
!IT_IDENTIFIER TYPE /AWS1/CL_PTSFILTERIDENTIFIER_W=>TT_FILTERIDENTIFIER OPTIONAL
!IT_LIFECYCLESTAGE TYPE /AWS1/CL_PTSFILTERLCSTAGE_W=>TT_FILTERLIFECYCLESTAGE OPTIONAL
!IT_LIFECYCLEREVIEWSTATUS TYPE /AWS1/CL_PTSFILTLCREVIEWSTAT_W=>TT_FILTERLIFECYCLEREVIEWSTATUS OPTIONAL
!IT_CUSTOMERCOMPANYNAME TYPE /AWS1/CL_PTSSTRINGLIST_W=>TT_STRINGLIST OPTIONAL
!IO_CREATEDDATE TYPE REF TO /AWS1/CL_PTSCREATEDDATEFILTER OPTIONAL
!IO_TARGETCLOSEDATE TYPE REF TO /AWS1/CL_PTSTGTCLOSEDATEFILTER OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ptslstopportunities01
RAISING
/AWS1/CX_PTSACCESSDENIEDEX
/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 associated with the request. This field takes a string value from a predefined list:
AWSorSandbox. The catalog determines which environment the opportunities are listed in. UseAWSfor listing real opportunities in the Amazon Web Services catalog, andSandboxfor testing in secure, isolated environments.
Optional arguments:¶
iv_maxresults TYPE /AWS1/PTSPAGESIZE /AWS1/PTSPAGESIZE¶
Specifies the maximum number of results to return in a single call. This limits the number of opportunities returned in the response to avoid providing too many results at once.
Default: 20
iv_nexttoken TYPE /AWS1/PTSSTRING /AWS1/PTSSTRING¶
A pagination token used to retrieve the next set of results in subsequent calls. This token is included in the response only if there are additional result pages available.
io_sort TYPE REF TO /AWS1/CL_PTSOPPORTUNITYSORT /AWS1/CL_PTSOPPORTUNITYSORT¶
An object that specifies how the response is sorted. The default
Sort.SortByvalue isLastModifiedDate.
io_lastmodifieddate TYPE REF TO /AWS1/CL_PTSLASTMODIFIEDDATE /AWS1/CL_PTSLASTMODIFIEDDATE¶
Filters the opportunities based on their last modified date. This filter helps retrieve opportunities that were updated after the specified date, allowing partners to track recent changes or updates.
it_identifier TYPE /AWS1/CL_PTSFILTERIDENTIFIER_W=>TT_FILTERIDENTIFIER TT_FILTERIDENTIFIER¶
Filters the opportunities based on the opportunity identifier. This allows partners to retrieve specific opportunities by providing their unique identifiers, ensuring precise results.
it_lifecyclestage TYPE /AWS1/CL_PTSFILTERLCSTAGE_W=>TT_FILTERLIFECYCLESTAGE TT_FILTERLIFECYCLESTAGE¶
Filters the opportunities based on their lifecycle stage. This filter allows partners to retrieve opportunities at various stages in the sales cycle, such as
Qualified,Technical Validation,Business Validation, orClosed Won.
it_lifecyclereviewstatus TYPE /AWS1/CL_PTSFILTLCREVIEWSTAT_W=>TT_FILTERLIFECYCLEREVIEWSTATUS TT_FILTERLIFECYCLEREVIEWSTATUS¶
Filters the opportunities based on their current lifecycle approval status. Use this filter to retrieve opportunities with statuses such as
Pending Submission,In Review,Action Required, orApproved.
it_customercompanyname TYPE /AWS1/CL_PTSSTRINGLIST_W=>TT_STRINGLIST TT_STRINGLIST¶
Filters the opportunities based on the customer's company name. This allows partners to search for opportunities associated with a specific customer by matching the provided company name string.
io_createddate TYPE REF TO /AWS1/CL_PTSCREATEDDATEFILTER /AWS1/CL_PTSCREATEDDATEFILTER¶
Filter opportunities by creation date criteria.
io_targetclosedate TYPE REF TO /AWS1/CL_PTSTGTCLOSEDATEFILTER /AWS1/CL_PTSTGTCLOSEDATEFILTER¶
Filters opportunities based on their target close date. This filter helps retrieve opportunities with an expected close date before or after a specified date.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ptslstopportunities01 /AWS1/CL_PTSLSTOPPORTUNITIES01¶
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->listopportunities(
io_createddate = new /aws1/cl_ptscreateddatefilter(
iv_aftercreateddate = '20150101000000.0000000'
iv_beforecreateddate = '20150101000000.0000000'
)
io_lastmodifieddate = new /aws1/cl_ptslastmodifieddate(
iv_afterlastmodifieddate = '20150101000000.0000000'
iv_beforelastmodifieddate = '20150101000000.0000000'
)
io_sort = new /aws1/cl_ptsopportunitysort(
iv_sortby = |string|
iv_sortorder = |string|
)
io_targetclosedate = new /aws1/cl_ptstgtclosedatefilter(
iv_aftertargetclosedate = |string|
iv_beforetargetclosedate = |string|
)
it_customercompanyname = VALUE /aws1/cl_ptsstringlist_w=>tt_stringlist(
( new /aws1/cl_ptsstringlist_w( |string| ) )
)
it_identifier = VALUE /aws1/cl_ptsfilteridentifier_w=>tt_filteridentifier(
( new /aws1/cl_ptsfilteridentifier_w( |string| ) )
)
it_lifecyclereviewstatus = VALUE /aws1/cl_ptsfiltlcreviewstat_w=>tt_filterlifecyclereviewstatus(
( new /aws1/cl_ptsfiltlcreviewstat_w( |string| ) )
)
it_lifecyclestage = VALUE /aws1/cl_ptsfilterlcstage_w=>tt_filterlifecyclestage(
( new /aws1/cl_ptsfilterlcstage_w( |string| ) )
)
iv_catalog = |string|
iv_maxresults = 123
iv_nexttoken = |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_opportunitysummaries( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_catalogidentifier = lo_row_1->get_catalog( ).
lv_opportunityidentifier = lo_row_1->get_id( ).
lv_opportunityarn = lo_row_1->get_arn( ).
lv_string = lo_row_1->get_partneropportunityid( ).
lv_opportunitytype = lo_row_1->get_opportunitytype( ).
lv_datetime = lo_row_1->get_lastmodifieddate( ).
lv_datetime = lo_row_1->get_createddate( ).
lo_lifecyclesummary = lo_row_1->get_lifecycle( ).
IF lo_lifecyclesummary IS NOT INITIAL.
lv_stage = lo_lifecyclesummary->get_stage( ).
lv_closedlostreason = lo_lifecyclesummary->get_closedlostreason( ).
lv_piistring = lo_lifecyclesummary->get_nextsteps( ).
lv_date = lo_lifecyclesummary->get_targetclosedate( ).
lv_reviewstatus = lo_lifecyclesummary->get_reviewstatus( ).
lv_string = lo_lifecyclesummary->get_reviewcomments( ).
lv_string = lo_lifecyclesummary->get_reviewstatusreason( ).
ENDIF.
lo_customersummary = lo_row_1->get_customer( ).
IF lo_customersummary IS NOT INITIAL.
lo_accountsummary = lo_customersummary->get_account( ).
IF lo_accountsummary IS NOT INITIAL.
lv_industry = lo_accountsummary->get_industry( ).
lv_string = lo_accountsummary->get_otherindustry( ).
lv_name = lo_accountsummary->get_companyname( ).
lv_websiteurl = lo_accountsummary->get_websiteurl( ).
lo_addresssummary = lo_accountsummary->get_address( ).
IF lo_addresssummary IS NOT INITIAL.
lv_addresspart = lo_addresssummary->get_city( ).
lv_addresspart = lo_addresssummary->get_postalcode( ).
lv_addresspart = lo_addresssummary->get_stateorregion( ).
lv_countrycode = lo_addresssummary->get_countrycode( ).
ENDIF.
ENDIF.
ENDIF.
lo_projectsummary = lo_row_1->get_project( ).
IF lo_projectsummary IS NOT INITIAL.
LOOP AT lo_projectsummary->get_deliverymodels( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_deliverymodel = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_projectsummary->get_expectedcustomerspend( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_amount = lo_row_5->get_amount( ).
lv_currencycode = lo_row_5->get_currencycode( ).
lv_paymentfrequency = lo_row_5->get_frequency( ).
lv_string = lo_row_5->get_targetcompany( ).
lv_estimationurl = lo_row_5->get_estimationurl( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
lv_string = lo_result->get_nexttoken( ).
ENDIF.