/AWS1/CL_PTS=>GETOPPORTUNITY()
¶
About GetOpportunity¶
Fetches the Opportunity
record from Partner Central by a given Identifier
.
Use the ListOpportunities
action or the event notification (from Amazon EventBridge) to obtain this identifier.
Method Signature¶
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:
AWS
orSandbox
. The catalog determines which environment the opportunity is fetched from. UseAWS
to retrieve opportunities in the Amazon Web Services catalog, andSandbox
to retrieve opportunities in a secure, isolated testing environment.
iv_identifier
TYPE /AWS1/PTSOPPORTUNITYIDENTIFIER
/AWS1/PTSOPPORTUNITYIDENTIFIER
¶
Read-only, system generated
Opportunity
unique identifier.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_ptsgetopportunityrsp
/AWS1/CL_PTSGETOPPORTUNITYRSP
¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
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->/aws1/if_pts~getopportunity(
iv_catalog = |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_catalogidentifier = lo_result->get_catalog( ).
LOOP AT lo_result->get_primaryneedsfromaws( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_primaryneedfromaws = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_nationalsecurity = lo_result->get_nationalsecurity( ).
lv_string = lo_result->get_partneropportunityid( ).
lo_customer = lo_result->get_customer( ).
IF lo_customer IS NOT INITIAL.
lo_account = lo_customer->get_account( ).
IF lo_account IS NOT INITIAL.
lv_industry = lo_account->get_industry( ).
lv_string = lo_account->get_otherindustry( ).
lv_name = lo_account->get_companyname( ).
lv_websiteurl = lo_account->get_websiteurl( ).
lv_awsaccount = lo_account->get_awsaccountid( ).
lo_address = lo_account->get_address( ).
IF lo_address IS NOT INITIAL.
lv_addresspart = lo_address->get_city( ).
lv_addresspart = lo_address->get_postalcode( ).
lv_addresspart = lo_address->get_stateorregion( ).
lv_countrycode = lo_address->get_countrycode( ).
lv_addresspart = lo_address->get_streetaddress( ).
ENDIF.
lv_dunsnumber = lo_account->get_duns( ).
ENDIF.
LOOP AT lo_customer->get_contacts( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_email = lo_row_3->get_email( ).
lv_name = lo_row_3->get_firstname( ).
lv_name = lo_row_3->get_lastname( ).
lv_jobtitle = lo_row_3->get_businesstitle( ).
lv_phonenumber = lo_row_3->get_phone( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_project = lo_result->get_project( ).
IF lo_project IS NOT INITIAL.
LOOP AT lo_project->get_deliverymodels( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_deliverymodel = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_project->get_expectedcustomerspend( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_string = lo_row_7->get_amount( ).
lv_currencycode = lo_row_7->get_currencycode( ).
lv_paymentfrequency = lo_row_7->get_frequency( ).
lv_string = lo_row_7->get_targetcompany( ).
lv_websiteurl = lo_row_7->get_estimationurl( ).
ENDIF.
ENDLOOP.
lv_piistring = lo_project->get_title( ).
LOOP AT lo_project->get_apnprograms( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_string = lo_row_9->get_value( ).
ENDIF.
ENDLOOP.
lv_piistring = lo_project->get_customerbusinessproblem( ).
lv_string = lo_project->get_customerusecase( ).
lv_opportunityidentifier = lo_project->get_relatedopportunityid( ).
LOOP AT lo_project->get_salesactivities( ) into lo_row_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
lv_salesactivity = lo_row_11->get_value( ).
ENDIF.
ENDLOOP.
lv_competitorname = lo_project->get_competitorname( ).
lv_string = lo_project->get_othercompetitornames( ).
lv_piistring = lo_project->get_othersolutiondescription( ).
lv_string = lo_project->get_additionalcomments( ).
ENDIF.
lv_opportunitytype = lo_result->get_opportunitytype( ).
lo_marketing = lo_result->get_marketing( ).
IF lo_marketing IS NOT INITIAL.
lv_string = lo_marketing->get_campaignname( ).
lv_marketingsource = lo_marketing->get_source( ).
LOOP AT lo_marketing->get_usecases( ) into lo_row_12.
lo_row_13 = lo_row_12.
IF lo_row_13 IS NOT INITIAL.
lv_string = lo_row_13->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_marketing->get_channels( ) into lo_row_14.
lo_row_15 = lo_row_14.
IF lo_row_15 IS NOT INITIAL.
lv_channel = lo_row_15->get_value( ).
ENDIF.
ENDLOOP.
lv_awsfundingused = lo_marketing->get_awsfundingused( ).
ENDIF.
lo_softwarerevenue = lo_result->get_softwarerevenue( ).
IF lo_softwarerevenue IS NOT INITIAL.
lv_revenuemodel = lo_softwarerevenue->get_deliverymodel( ).
lo_monetaryvalue = lo_softwarerevenue->get_value( ).
IF lo_monetaryvalue IS NOT INITIAL.
lv_string = lo_monetaryvalue->get_amount( ).
lv_currencycode = lo_monetaryvalue->get_currencycode( ).
ENDIF.
lv_date = lo_softwarerevenue->get_effectivedate( ).
lv_date = lo_softwarerevenue->get_expirationdate( ).
ENDIF.
lv_opportunityidentifier = lo_result->get_id( ).
lv_opportunityarn = lo_result->get_arn( ).
lv_datetime = lo_result->get_lastmodifieddate( ).
lv_datetime = lo_result->get_createddate( ).
lo_relatedentityidentifier = lo_result->get_relatedentityidentifiers( ).
IF lo_relatedentityidentifier IS NOT INITIAL.
LOOP AT lo_relatedentityidentifier->get_awsmarketplaceoffers( ) into lo_row_16.
lo_row_17 = lo_row_16.
IF lo_row_17 IS NOT INITIAL.
lv_awsmarketplaceofferiden = lo_row_17->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_relatedentityidentifier->get_solutions( ) into lo_row_18.
lo_row_19 = lo_row_18.
IF lo_row_19 IS NOT INITIAL.
lv_solutionidentifier = lo_row_19->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_relatedentityidentifier->get_awsproducts( ) into lo_row_20.
lo_row_21 = lo_row_20.
IF lo_row_21 IS NOT INITIAL.
lv_awsproductidentifier = lo_row_21->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_lifecycle = lo_result->get_lifecycle( ).
IF lo_lifecycle IS NOT INITIAL.
lv_stage = lo_lifecycle->get_stage( ).
lv_closedlostreason = lo_lifecycle->get_closedlostreason( ).
lv_piistring = lo_lifecycle->get_nextsteps( ).
lv_date = lo_lifecycle->get_targetclosedate( ).
lv_reviewstatus = lo_lifecycle->get_reviewstatus( ).
lv_string = lo_lifecycle->get_reviewcomments( ).
lv_string = lo_lifecycle->get_reviewstatusreason( ).
LOOP AT lo_lifecycle->get_nextstepshistory( ) into lo_row_22.
lo_row_23 = lo_row_22.
IF lo_row_23 IS NOT INITIAL.
lv_string = lo_row_23->get_value( ).
lv_datetime = lo_row_23->get_time( ).
ENDIF.
ENDLOOP.
ENDIF.
LOOP AT lo_result->get_opportunityteam( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_email = lo_row_3->get_email( ).
lv_name = lo_row_3->get_firstname( ).
lv_name = lo_row_3->get_lastname( ).
lv_jobtitle = lo_row_3->get_businesstitle( ).
lv_phonenumber = lo_row_3->get_phone( ).
ENDIF.
ENDLOOP.
ENDIF.