/AWS1/IF_BGT=>DSCBUDGETPERFORMANCEHISTORY()¶
About DescribeBudgetPerformanceHistory¶
Describes the history for DAILY, MONTHLY, and QUARTERLY budgets. Budget history isn't available for ANNUAL budgets.
Method Signature¶
METHODS /AWS1/IF_BGT~DSCBUDGETPERFORMANCEHISTORY
IMPORTING
!IV_ACCOUNTID TYPE /AWS1/BGTACCOUNTID OPTIONAL
!IV_BUDGETNAME TYPE /AWS1/BGTBUDGETNAME OPTIONAL
!IO_TIMEPERIOD TYPE REF TO /AWS1/CL_BGTTIMEPERIOD OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/BGTMAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/BGTGENERICSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bgtdscbudgetperform01
RAISING
/AWS1/CX_BGTACCESSDENIEDEX
/AWS1/CX_BGTBLLVIEWHLTHSTATEX
/AWS1/CX_BGTEXPIREDNEXTTOKENEX
/AWS1/CX_BGTINTERNALERROREX
/AWS1/CX_BGTINVALIDNEXTTOKENEX
/AWS1/CX_BGTINVALIDPARAMETEREX
/AWS1/CX_BGTNOTFOUNDEXCEPTION
/AWS1/CX_BGTTHROTTLINGEX
/AWS1/CX_BGTCLIENTEXC
/AWS1/CX_BGTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_accountid TYPE /AWS1/BGTACCOUNTID /AWS1/BGTACCOUNTID¶
AccountId
iv_budgetname TYPE /AWS1/BGTBUDGETNAME /AWS1/BGTBUDGETNAME¶
BudgetName
Optional arguments:¶
io_timeperiod TYPE REF TO /AWS1/CL_BGTTIMEPERIOD /AWS1/CL_BGTTIMEPERIOD¶
Retrieves how often the budget went into an
ALARMstate for the specified time period.
iv_maxresults TYPE /AWS1/BGTMAXRESULTS /AWS1/BGTMAXRESULTS¶
MaxResults
iv_nexttoken TYPE /AWS1/BGTGENERICSTRING /AWS1/BGTGENERICSTRING¶
NextToken
RETURNING¶
oo_output TYPE REF TO /aws1/cl_bgtdscbudgetperform01 /AWS1/CL_BGTDSCBUDGETPERFORM01¶
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->dscbudgetperformancehistory(
io_timeperiod = new /aws1/cl_bgttimeperiod(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
iv_accountid = |string|
iv_budgetname = |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.
lo_budgetperformancehistor = lo_result->get_budgetperformancehistory( ).
IF lo_budgetperformancehistor IS NOT INITIAL.
lv_budgetname = lo_budgetperformancehistor->get_budgetname( ).
lv_budgettype = lo_budgetperformancehistor->get_budgettype( ).
LOOP AT lo_budgetperformancehistor->get_costfilters( ) into ls_row.
lv_key = ls_row-key.
LOOP AT ls_row-value into lo_row_1.
lo_row_2 = lo_row_1.
IF lo_row_2 IS NOT INITIAL.
lv_dimensionvalue = lo_row_2->get_value( ).
ENDIF.
ENDLOOP.
ENDLOOP.
lo_costtypes = lo_budgetperformancehistor->get_costtypes( ).
IF lo_costtypes IS NOT INITIAL.
lv_nullableboolean = lo_costtypes->get_includetax( ).
lv_nullableboolean = lo_costtypes->get_includesubscription( ).
lv_nullableboolean = lo_costtypes->get_useblended( ).
lv_nullableboolean = lo_costtypes->get_includerefund( ).
lv_nullableboolean = lo_costtypes->get_includecredit( ).
lv_nullableboolean = lo_costtypes->get_includeupfront( ).
lv_nullableboolean = lo_costtypes->get_includerecurring( ).
lv_nullableboolean = lo_costtypes->get_includeothersubscription( ).
lv_nullableboolean = lo_costtypes->get_includesupport( ).
lv_nullableboolean = lo_costtypes->get_includediscount( ).
lv_nullableboolean = lo_costtypes->get_useamortized( ).
ENDIF.
lv_timeunit = lo_budgetperformancehistor->get_timeunit( ).
lv_billingviewarn = lo_budgetperformancehistor->get_billingviewarn( ).
LOOP AT lo_budgetperformancehistor->get_budgetedandactualamoun00( ) into lo_row_3.
lo_row_4 = lo_row_3.
IF lo_row_4 IS NOT INITIAL.
lo_spend = lo_row_4->get_budgetedamount( ).
IF lo_spend IS NOT INITIAL.
lv_numericvalue = lo_spend->get_amount( ).
lv_unitvalue = lo_spend->get_unit( ).
ENDIF.
lo_spend = lo_row_4->get_actualamount( ).
IF lo_spend IS NOT INITIAL.
lv_numericvalue = lo_spend->get_amount( ).
lv_unitvalue = lo_spend->get_unit( ).
ENDIF.
lo_timeperiod = lo_row_4->get_timeperiod( ).
IF lo_timeperiod IS NOT INITIAL.
lv_generictimestamp = lo_timeperiod->get_start( ).
lv_generictimestamp = lo_timeperiod->get_end( ).
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
lv_genericstring = lo_result->get_nexttoken( ).
ENDIF.