Skip to content

/AWS1/CL_PTS=>GETRESOURCESNAPSHOT()

About GetResourceSnapshot

Use this action to retrieve a specific snapshot record.

Method Signature

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 Opportunity type, it will be an opportunity 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

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~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_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_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_solutions( ) into lo_row_12.
          lo_row_13 = lo_row_12.
          IF lo_row_13 IS NOT INITIAL.
            lv_solutionidentifier = lo_row_13->get_value( ).
          ENDIF.
        ENDLOOP.
        LOOP AT lo_relatedentityidentifier->get_awsproducts( ) into lo_row_14.
          lo_row_15 = lo_row_14.
          IF lo_row_15 IS NOT INITIAL.
            lv_awsproductidentifier = lo_row_15->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDIF.
  ENDIF.
ENDIF.