/AWS1/IF_CEX=>GETSAVINGSPLANSPURCHASEREC00()¶
About GetSavingsPlansPurchaseRecommendation¶
Retrieves the Savings Plans recommendations for your account. First use
StartSavingsPlansPurchaseRecommendationGeneration to generate a new set of
recommendations, and then use GetSavingsPlansPurchaseRecommendation to retrieve
them.
Method Signature¶
METHODS /AWS1/IF_CEX~GETSAVINGSPLANSPURCHASEREC00
IMPORTING
!IV_SAVINGSPLANSTYPE TYPE /AWS1/CEXSUPPEDSAVINGSPLANST00 OPTIONAL
!IV_TERMINYEARS TYPE /AWS1/CEXTERMINYEARS OPTIONAL
!IV_PAYMENTOPTION TYPE /AWS1/CEXPAYMENTOPTION OPTIONAL
!IV_ACCOUNTSCOPE TYPE /AWS1/CEXACCOUNTSCOPE OPTIONAL
!IV_NEXTPAGETOKEN TYPE /AWS1/CEXNEXTPAGETOKEN OPTIONAL
!IV_PAGESIZE TYPE /AWS1/CEXNONNEGATIVEINTEGER OPTIONAL
!IV_LOOKBACKPERIODINDAYS TYPE /AWS1/CEXLOOKBACKPERIODINDAYS OPTIONAL
!IO_FILTER TYPE REF TO /AWS1/CL_CEXEXPRESSION OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cexgetsavingsplansp01
RAISING
/AWS1/CX_CEXINVALIDNEXTTOKENEX
/AWS1/CX_CEXLIMITEXCEEDEDEX
/AWS1/CX_CEXCLIENTEXC
/AWS1/CX_CEXSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_savingsplanstype TYPE /AWS1/CEXSUPPEDSAVINGSPLANST00 /AWS1/CEXSUPPEDSAVINGSPLANST00¶
The Savings Plans recommendation type that's requested.
iv_terminyears TYPE /AWS1/CEXTERMINYEARS /AWS1/CEXTERMINYEARS¶
The savings plan recommendation term that's used to generate these recommendations.
iv_paymentoption TYPE /AWS1/CEXPAYMENTOPTION /AWS1/CEXPAYMENTOPTION¶
The payment option that's used to generate these recommendations.
iv_lookbackperiodindays TYPE /AWS1/CEXLOOKBACKPERIODINDAYS /AWS1/CEXLOOKBACKPERIODINDAYS¶
The lookback period that's used to generate the recommendation.
Optional arguments:¶
iv_accountscope TYPE /AWS1/CEXACCOUNTSCOPE /AWS1/CEXACCOUNTSCOPE¶
The account scope that you want your recommendations for. Amazon Web Services calculates recommendations including the management account and member accounts if the value is set to
PAYER. If the value isLINKED, recommendations are calculated for individual member accounts only.
iv_nextpagetoken TYPE /AWS1/CEXNEXTPAGETOKEN /AWS1/CEXNEXTPAGETOKEN¶
The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
iv_pagesize TYPE /AWS1/CEXNONNEGATIVEINTEGER /AWS1/CEXNONNEGATIVEINTEGER¶
The number of recommendations that you want returned in a single response object.
io_filter TYPE REF TO /AWS1/CL_CEXEXPRESSION /AWS1/CL_CEXEXPRESSION¶
You can filter your recommendations by Account ID with the
LINKED_ACCOUNTdimension. To filter your recommendations by Account ID, specifyKeyasLINKED_ACCOUNTandValueas the comma-separated Acount ID(s) that you want to see Savings Plans purchase recommendations for.For GetSavingsPlansPurchaseRecommendation, the
Filterdoesn't includeCostCategoriesorTags. It only includesDimensions. WithDimensions,Keymust beLINKED_ACCOUNTandValuecan be a single Account ID or multiple comma-separated Account IDs that you want to see Savings Plans Purchase Recommendations for.ANDandORoperators are not supported.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cexgetsavingsplansp01 /AWS1/CL_CEXGETSAVINGSPLANSP01¶
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->getsavingsplanspurchaserec00(
io_filter = new /aws1/cl_cexexpression(
io_costcategories = new /aws1/cl_cexcostcategoryvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_dimensions = new /aws1/cl_cexdimensionvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_not = new /aws1/cl_cexexpression(
io_costcategories = new /aws1/cl_cexcostcategoryvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_dimensions = new /aws1/cl_cexdimensionvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_tags = new /aws1/cl_cextagvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
it_and = VALUE /aws1/cl_cexexpression=>tt_expressions(
(
new /aws1/cl_cexexpression(
io_costcategories = new /aws1/cl_cexcostcategoryvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_dimensions = new /aws1/cl_cexdimensionvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_tags = new /aws1/cl_cextagvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
it_or = VALUE /aws1/cl_cexexpression=>tt_expressions(
)
)
)
)
it_or = VALUE /aws1/cl_cexexpression=>tt_expressions(
(
new /aws1/cl_cexexpression(
io_costcategories = new /aws1/cl_cexcostcategoryvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_dimensions = new /aws1/cl_cexdimensionvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_tags = new /aws1/cl_cextagvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
it_and = VALUE /aws1/cl_cexexpression=>tt_expressions(
)
)
)
)
)
io_tags = new /aws1/cl_cextagvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
it_and = VALUE /aws1/cl_cexexpression=>tt_expressions(
(
new /aws1/cl_cexexpression(
io_costcategories = new /aws1/cl_cexcostcategoryvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_dimensions = new /aws1/cl_cexdimensionvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_not = new /aws1/cl_cexexpression(
io_costcategories = new /aws1/cl_cexcostcategoryvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_dimensions = new /aws1/cl_cexdimensionvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_tags = new /aws1/cl_cextagvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
it_or = VALUE /aws1/cl_cexexpression=>tt_expressions(
)
)
io_tags = new /aws1/cl_cextagvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
it_or = VALUE /aws1/cl_cexexpression=>tt_expressions(
)
)
)
)
it_or = VALUE /aws1/cl_cexexpression=>tt_expressions(
(
new /aws1/cl_cexexpression(
io_costcategories = new /aws1/cl_cexcostcategoryvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_dimensions = new /aws1/cl_cexdimensionvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_not = new /aws1/cl_cexexpression(
io_costcategories = new /aws1/cl_cexcostcategoryvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_dimensions = new /aws1/cl_cexdimensionvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
io_tags = new /aws1/cl_cextagvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
it_and = VALUE /aws1/cl_cexexpression=>tt_expressions(
)
)
io_tags = new /aws1/cl_cextagvalues(
it_matchoptions = VALUE /aws1/cl_cexmatchoptions_w=>tt_matchoptions(
( new /aws1/cl_cexmatchoptions_w( |string| ) )
)
it_values = VALUE /aws1/cl_cexvalues_w=>tt_values(
( new /aws1/cl_cexvalues_w( |string| ) )
)
iv_key = |string|
)
it_and = VALUE /aws1/cl_cexexpression=>tt_expressions(
)
)
)
)
)
iv_accountscope = |string|
iv_lookbackperiodindays = |string|
iv_nextpagetoken = |string|
iv_pagesize = 123
iv_paymentoption = |string|
iv_savingsplanstype = |string|
iv_terminyears = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_savingsplanspurchaserec = lo_result->get_metadata( ).
IF lo_savingsplanspurchaserec IS NOT INITIAL.
lv_genericstring = lo_savingsplanspurchaserec->get_recommendationid( ).
lv_genericstring = lo_savingsplanspurchaserec->get_generationtimestamp( ).
lv_genericstring = lo_savingsplanspurchaserec->get_additionalmetadata( ).
ENDIF.
lo_savingsplanspurchaserec_1 = lo_result->get_savingsplanspurchasere02( ).
IF lo_savingsplanspurchaserec_1 IS NOT INITIAL.
lv_accountscope = lo_savingsplanspurchaserec_1->get_accountscope( ).
lv_supportedsavingsplansty = lo_savingsplanspurchaserec_1->get_savingsplanstype( ).
lv_terminyears = lo_savingsplanspurchaserec_1->get_terminyears( ).
lv_paymentoption = lo_savingsplanspurchaserec_1->get_paymentoption( ).
lv_lookbackperiodindays = lo_savingsplanspurchaserec_1->get_lookbackperiodindays( ).
LOOP AT lo_savingsplanspurchaserec_1->get_savingsplanspurchasere00( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lo_savingsplansdetails = lo_row_1->get_savingsplansdetails( ).
IF lo_savingsplansdetails IS NOT INITIAL.
lv_genericstring = lo_savingsplansdetails->get_region( ).
lv_genericstring = lo_savingsplansdetails->get_instancefamily( ).
lv_genericstring = lo_savingsplansdetails->get_offeringid( ).
ENDIF.
lv_genericstring = lo_row_1->get_accountid( ).
lv_genericstring = lo_row_1->get_upfrontcost( ).
lv_genericstring = lo_row_1->get_estimatedroi( ).
lv_genericstring = lo_row_1->get_currencycode( ).
lv_genericstring = lo_row_1->get_estimatedspcost( ).
lv_genericstring = lo_row_1->get_estimatedondemandcost( ).
lv_genericstring = lo_row_1->get_estimatedondemcostwcur00( ).
lv_genericstring = lo_row_1->get_estimatedsavingsamount( ).
lv_genericstring = lo_row_1->get_estimatedsavingspercen00( ).
lv_genericstring = lo_row_1->get_hourlycommitmenttopurc00( ).
lv_genericstring = lo_row_1->get_estimatedaverageutiliz00( ).
lv_genericstring = lo_row_1->get_estimatedmonthlysaving00( ).
lv_genericstring = lo_row_1->get_currentminhourlyondems00( ).
lv_genericstring = lo_row_1->get_currentmaxhourlyondems00( ).
lv_genericstring = lo_row_1->get_currentaveragehourlyon00( ).
lv_recommendationdetailid = lo_row_1->get_recommendationdetailid( ).
ENDIF.
ENDLOOP.
lo_savingsplanspurchaserec_2 = lo_savingsplanspurchaserec_1->get_savingsplanspurchasere01( ).
IF lo_savingsplanspurchaserec_2 IS NOT INITIAL.
lv_genericstring = lo_savingsplanspurchaserec_2->get_estimatedroi( ).
lv_genericstring = lo_savingsplanspurchaserec_2->get_currencycode( ).
lv_genericstring = lo_savingsplanspurchaserec_2->get_estimatedtotalcost( ).
lv_genericstring = lo_savingsplanspurchaserec_2->get_currentondemandspend( ).
lv_genericstring = lo_savingsplanspurchaserec_2->get_estimatedsavingsamount( ).
lv_genericstring = lo_savingsplanspurchaserec_2->get_totalrecommendationcount( ).
lv_genericstring = lo_savingsplanspurchaserec_2->get_dailycommitmenttopurch00( ).
lv_genericstring = lo_savingsplanspurchaserec_2->get_hourlycommitmenttopurc00( ).
lv_genericstring = lo_savingsplanspurchaserec_2->get_estimatedsavingspercen00( ).
lv_genericstring = lo_savingsplanspurchaserec_2->get_estimatedmonthlysaving00( ).
lv_genericstring = lo_savingsplanspurchaserec_2->get_estimatedondemcostwcur00( ).
ENDIF.
ENDIF.
lv_nextpagetoken = lo_result->get_nextpagetoken( ).
ENDIF.