/AWS1/IF_PTS=>GETRESOURCESNAPSHOT()¶
About GetResourceSnapshot¶
Use this action to retrieve a specific snapshot record.
Method Signature¶
METHODS /AWS1/IF_PTS~GETRESOURCESNAPSHOT
IMPORTING
!IV_CATALOG TYPE /AWS1/PTSCATALOGIDENTIFIER OPTIONAL
!IV_ENGAGEMENTIDENTIFIER TYPE /AWS1/PTSENGAGEMENTIDENTIFIER OPTIONAL
!IV_RESOURCETYPE TYPE /AWS1/PTSRESOURCETYPE OPTIONAL
!IV_RESOURCEIDENTIFIER TYPE /AWS1/PTSRESOURCEIDENTIFIER OPTIONAL
!IV_RESOURCESNAPTEMPLATEID TYPE /AWS1/PTSRESOURCETEMPLATENAME OPTIONAL
!IV_REVISION TYPE /AWS1/PTSRESOURCESNAPREVISION OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ptsgetresourcesnaprsp
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 related to the request. Valid values are:
AWS: Retrieves the snapshot from the production AWS environment.
Sandbox: Retrieves the snapshot from a sandbox environment used for testing or development purposes.
iv_engagementidentifier TYPE /AWS1/PTSENGAGEMENTIDENTIFIER /AWS1/PTSENGAGEMENTIDENTIFIER¶
The unique identifier of the engagement associated with the snapshot. This field links the snapshot to a specific engagement context.
iv_resourcetype TYPE /AWS1/PTSRESOURCETYPE /AWS1/PTSRESOURCETYPE¶
Specifies the type of resource that was snapshotted. This field determines the structure and content of the snapshot payload. Valid value includes:
Opportunity: For opportunity-related data.
iv_resourceidentifier TYPE /AWS1/PTSRESOURCEIDENTIFIER /AWS1/PTSRESOURCEIDENTIFIER¶
The unique identifier of the specific resource that was snapshotted. The format and constraints of this identifier depend on the ResourceType specified. For
Opportunitytype, it will be anopportunity ID
iv_resourcesnaptemplateid TYPE /AWS1/PTSRESOURCETEMPLATENAME /AWS1/PTSRESOURCETEMPLATENAME¶
he name of the template that defines the schema for the snapshot. This template determines which subset of the resource data is included in the snapshot and must correspond to an existing and valid template for the specified
ResourceType.
Optional arguments:¶
iv_revision TYPE /AWS1/PTSRESOURCESNAPREVISION /AWS1/PTSRESOURCESNAPREVISION¶
Specifies which revision of the snapshot to retrieve. If omitted returns the latest revision.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ptsgetresourcesnaprsp /AWS1/CL_PTSGETRESOURCESNAPRSP¶
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->getresourcesnapshot(
iv_catalog = |string|
iv_engagementidentifier = |string|
iv_resourceidentifier = |string|
iv_resourcesnaptemplateid = |string|
iv_resourcetype = |string|
iv_revision = 123
).
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( ).
lv_resourcearn = lo_result->get_arn( ).
lv_awsaccount = lo_result->get_createdby( ).
lv_datetime = lo_result->get_createdat( ).
lv_engagementidentifier = lo_result->get_engagementid( ).
lv_resourcetype = lo_result->get_resourcetype( ).
lv_resourceidentifier = lo_result->get_resourceid( ).
lv_resourcetemplatename = lo_result->get_resourcesnaptemplatename( ).
lv_resourcesnapshotrevisio = lo_result->get_revision( ).
lo_resourcesnapshotpayload = lo_result->get_payload( ).
IF lo_resourcesnapshotpayload IS NOT INITIAL.
lo_opportunitysummaryview = lo_resourcesnapshotpayload->get_opportunitysummary( ).
IF lo_opportunitysummaryview IS NOT INITIAL.
lv_opportunitytype = lo_opportunitysummaryview->get_opportunitytype( ).
lo_lifecycleforview = lo_opportunitysummaryview->get_lifecycle( ).
IF lo_lifecycleforview IS NOT INITIAL.
lv_date = lo_lifecycleforview->get_targetclosedate( ).
lv_reviewstatus = lo_lifecycleforview->get_reviewstatus( ).
lv_stage = lo_lifecycleforview->get_stage( ).
lv_piistring = lo_lifecycleforview->get_nextsteps( ).
ENDIF.
LOOP AT lo_opportunitysummaryview->get_opportunityteam( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_email = lo_row_1->get_email( ).
lv_name = lo_row_1->get_firstname( ).
lv_name = lo_row_1->get_lastname( ).
lv_jobtitle = lo_row_1->get_businesstitle( ).
lv_phonenumber = lo_row_1->get_phone( ).
ENDIF.
ENDLOOP.
LOOP AT lo_opportunitysummaryview->get_primaryneedsfromaws( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_primaryneedfromaws = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lo_customer = lo_opportunitysummaryview->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.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_email = lo_row_1->get_email( ).
lv_name = lo_row_1->get_firstname( ).
lv_name = lo_row_1->get_lastname( ).
lv_jobtitle = lo_row_1->get_businesstitle( ).
lv_phonenumber = lo_row_1->get_phone( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_projectview = lo_opportunitysummaryview->get_project( ).
IF lo_projectview IS NOT INITIAL.
LOOP AT lo_projectview->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_projectview->get_expectedcustomerspend( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_amount = 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_estimationurl = lo_row_7->get_estimationurl( ).
ENDIF.
ENDLOOP.
lv_string = lo_projectview->get_customerusecase( ).
LOOP AT lo_projectview->get_salesactivities( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_salesactivity = lo_row_9->get_value( ).
ENDIF.
ENDLOOP.
lv_piistring = lo_projectview->get_othersolutiondescription( ).
ENDIF.
lo_relatedentityidentifier = lo_opportunitysummaryview->get_relatedentityidentifiers( ).
IF lo_relatedentityidentifier IS NOT INITIAL.
LOOP AT lo_relatedentityidentifier->get_awsmarketplaceoffers( ) into lo_row_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
lv_awsmarketplaceofferiden = lo_row_11->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_relatedentityidentifier->get_awsmarketplaceoffersets( ) into lo_row_12.
lo_row_13 = lo_row_12.
IF lo_row_13 IS NOT INITIAL.
lv_awsmarketplaceofferseti = lo_row_13->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_relatedentityidentifier->get_solutions( ) into lo_row_14.
lo_row_15 = lo_row_14.
IF lo_row_15 IS NOT INITIAL.
lv_solutionidentifier = lo_row_15->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_relatedentityidentifier->get_awsproducts( ) into lo_row_16.
lo_row_17 = lo_row_16.
IF lo_row_17 IS NOT INITIAL.
lv_awsproductidentifier = lo_row_17->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lo_awsopportunitysummaryfu = lo_resourcesnapshotpayload->get_awsopprtntysummfullview( ).
IF lo_awsopportunitysummaryfu IS NOT INITIAL.
lv_opportunityidentifier = lo_awsopportunitysummaryfu->get_relatedopportunityid00( ).
lv_opportunityorigin = lo_awsopportunitysummaryfu->get_origin( ).
lv_salesinvolvementtype = lo_awsopportunitysummaryfu->get_involvementtype( ).
lv_visibility = lo_awsopportunitysummaryfu->get_visibility( ).
lo_awsopportunitylifecycle = lo_awsopportunitysummaryfu->get_lifecycle( ).
IF lo_awsopportunitylifecycle IS NOT INITIAL.
lv_date = lo_awsopportunitylifecycle->get_targetclosedate( ).
lv_awsclosedlostreason = lo_awsopportunitylifecycle->get_closedlostreason( ).
lv_awsopportunitystage = lo_awsopportunitylifecycle->get_stage( ).
lv_piistring = lo_awsopportunitylifecycle->get_nextsteps( ).
LOOP AT lo_awsopportunitylifecycle->get_nextstepshistory( ) into lo_row_18.
lo_row_19 = lo_row_18.
IF lo_row_19 IS NOT INITIAL.
lv_string = lo_row_19->get_value( ).
lv_datetime = lo_row_19->get_time( ).
ENDIF.
ENDLOOP.
ENDIF.
LOOP AT lo_awsopportunitysummaryfu->get_opportunityteam( ) into lo_row_20.
lo_row_21 = lo_row_20.
IF lo_row_21 IS NOT INITIAL.
lv_email = lo_row_21->get_email( ).
lv_name = lo_row_21->get_firstname( ).
lv_name = lo_row_21->get_lastname( ).
lv_awsmemberbusinesstitle = lo_row_21->get_businesstitle( ).
ENDIF.
ENDLOOP.
lo_awsopportunityinsights = lo_awsopportunitysummaryfu->get_insights( ).
IF lo_awsopportunityinsights IS NOT INITIAL.
lv_string = lo_awsopportunityinsights->get_nextbestactions( ).
lv_engagementscore = lo_awsopportunityinsights->get_engagementscore( ).
lo_awsproductsspendinsight = lo_awsopportunityinsights->get_awsprodsspendinsightsb00( ).
IF lo_awsproductsspendinsight IS NOT INITIAL.
lo_awsproductinsights = lo_awsproductsspendinsight->get_partner( ).
IF lo_awsproductinsights IS NOT INITIAL.
lv_currencycode = lo_awsproductinsights->get_currencycode( ).
lv_paymentfrequency = lo_awsproductinsights->get_frequency( ).
lv_monetaryamount = lo_awsproductinsights->get_totalamount( ).
lv_monetaryamount = lo_awsproductinsights->get_totaloptimizedamount( ).
lv_monetaryamount = lo_awsproductinsights->get_totalpotentialsavgamount( ).
LOOP AT lo_awsproductinsights->get_totalamountbycategory( ) into ls_row_22.
lv_key = ls_row_22-key.
lo_value = ls_row_22-value.
IF lo_value IS NOT INITIAL.
lv_monetaryamount = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_awsproductinsights->get_awsproducts( ) into lo_row_23.
lo_row_24 = lo_row_23.
IF lo_row_24 IS NOT INITIAL.
lv_string = lo_row_24->get_productcode( ).
lv_string = lo_row_24->get_servicecode( ).
LOOP AT lo_row_24->get_categories( ) into lo_row_25.
lo_row_26 = lo_row_25.
IF lo_row_26 IS NOT INITIAL.
lv_string = lo_row_26->get_value( ).
ENDIF.
ENDLOOP.
lv_monetaryamount = lo_row_24->get_amount( ).
lv_monetaryamount = lo_row_24->get_optimizedamount( ).
lv_monetaryamount = lo_row_24->get_potentialsavingsamount( ).
LOOP AT lo_row_24->get_optimizations( ) into lo_row_27.
lo_row_28 = lo_row_27.
IF lo_row_28 IS NOT INITIAL.
lv_string = lo_row_28->get_description( ).
lv_monetaryamount = lo_row_28->get_savingsamount( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
lo_awsproductinsights = lo_awsproductsspendinsight->get_aws( ).
IF lo_awsproductinsights IS NOT INITIAL.
lv_currencycode = lo_awsproductinsights->get_currencycode( ).
lv_paymentfrequency = lo_awsproductinsights->get_frequency( ).
lv_monetaryamount = lo_awsproductinsights->get_totalamount( ).
lv_monetaryamount = lo_awsproductinsights->get_totaloptimizedamount( ).
lv_monetaryamount = lo_awsproductinsights->get_totalpotentialsavgamount( ).
LOOP AT lo_awsproductinsights->get_totalamountbycategory( ) into ls_row_22.
lv_key = ls_row_22-key.
lo_value = ls_row_22-value.
IF lo_value IS NOT INITIAL.
lv_monetaryamount = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_awsproductinsights->get_awsproducts( ) into lo_row_23.
lo_row_24 = lo_row_23.
IF lo_row_24 IS NOT INITIAL.
lv_string = lo_row_24->get_productcode( ).
lv_string = lo_row_24->get_servicecode( ).
LOOP AT lo_row_24->get_categories( ) into lo_row_25.
lo_row_26 = lo_row_25.
IF lo_row_26 IS NOT INITIAL.
lv_string = lo_row_26->get_value( ).
ENDIF.
ENDLOOP.
lv_monetaryamount = lo_row_24->get_amount( ).
lv_monetaryamount = lo_row_24->get_optimizedamount( ).
lv_monetaryamount = lo_row_24->get_potentialsavingsamount( ).
LOOP AT lo_row_24->get_optimizations( ) into lo_row_27.
lo_row_28 = lo_row_27.
IF lo_row_28 IS NOT INITIAL.
lv_string = lo_row_28->get_description( ).
lv_monetaryamount = lo_row_28->get_savingsamount( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
lv_involvementtypechangere = lo_awsopportunitysummaryfu->get_involvementtypechangersn( ).
lo_awsopportunityrelateden = lo_awsopportunitysummaryfu->get_relatedentityids( ).
IF lo_awsopportunityrelateden IS NOT INITIAL.
LOOP AT lo_awsopportunityrelateden->get_awsproducts( ) into lo_row_16.
lo_row_17 = lo_row_16.
IF lo_row_17 IS NOT INITIAL.
lv_awsproductidentifier = lo_row_17->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_awsopportunityrelateden->get_solutions( ) into lo_row_14.
lo_row_15 = lo_row_14.
IF lo_row_15 IS NOT INITIAL.
lv_solutionidentifier = lo_row_15->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_awsopportunitycustomer = lo_awsopportunitysummaryfu->get_customer( ).
IF lo_awsopportunitycustomer IS NOT INITIAL.
LOOP AT lo_awsopportunitycustomer->get_contacts( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_email = lo_row_1->get_email( ).
lv_name = lo_row_1->get_firstname( ).
lv_name = lo_row_1->get_lastname( ).
lv_jobtitle = lo_row_1->get_businesstitle( ).
lv_phonenumber = lo_row_1->get_phone( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_awsopportunityproject = lo_awsopportunitysummaryfu->get_project( ).
IF lo_awsopportunityproject IS NOT INITIAL.
LOOP AT lo_awsopportunityproject->get_expectedcustomerspend( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_amount = 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_estimationurl = lo_row_7->get_estimationurl( ).
ENDIF.
ENDLOOP.
lv_awspartition = lo_awsopportunityproject->get_awspartition( ).
ENDIF.
ENDIF.
ENDIF.
LOOP AT lo_result->get_targetmemberaccounts( ) into lo_row_29.
lo_row_30 = lo_row_29.
IF lo_row_30 IS NOT INITIAL.
lv_awsaccount = lo_row_30->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.