/AWS1/IF_SUS=>GETESTCARBONEMSNSDIMENVALUES()¶
About GetEstimatedCarbonEmissionsDimensionValues¶
Returns the possible dimension values available for a customer's account. We recommend using pagination to ensure that the operation returns quickly and successfully.
Method Signature¶
METHODS /AWS1/IF_SUS~GETESTCARBONEMSNSDIMENVALUES
IMPORTING
!IO_TIMEPERIOD TYPE REF TO /AWS1/CL_SUSTIMEPERIOD OPTIONAL
!IT_DIMENSIONS TYPE /AWS1/CL_SUSDIMENSIONLIST_W=>TT_DIMENSIONLIST OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/SUSMAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/SUSNEXTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_susgetstcemsdimvalrsp
RAISING
/AWS1/CX_SUSACCESSDENIEDEX
/AWS1/CX_SUSINTERNALSERVEREX
/AWS1/CX_SUSTHROTTLINGEX
/AWS1/CX_SUSVLDTNEXCEPTION
/AWS1/CX_SUSCLIENTEXC
/AWS1/CX_SUSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
io_timeperiod TYPE REF TO /AWS1/CL_SUSTIMEPERIOD /AWS1/CL_SUSTIMEPERIOD¶
The date range for fetching the dimension values.
it_dimensions TYPE /AWS1/CL_SUSDIMENSIONLIST_W=>TT_DIMENSIONLIST TT_DIMENSIONLIST¶
The dimensions available for grouping estimated carbon emissions.
Optional arguments:¶
iv_maxresults TYPE /AWS1/SUSMAXRESULTS /AWS1/SUSMAXRESULTS¶
The maximum number of results to return in a single call. Default is 40.
iv_nexttoken TYPE /AWS1/SUSNEXTTOKEN /AWS1/SUSNEXTTOKEN¶
The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_susgetstcemsdimvalrsp /AWS1/CL_SUSGETSTCEMSDIMVALRSP¶
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->getestcarbonemsnsdimenvalues(
io_timeperiod = new /aws1/cl_sustimeperiod(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
it_dimensions = VALUE /aws1/cl_susdimensionlist_w=>tt_dimensionlist(
( new /aws1/cl_susdimensionlist_w( |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.
LOOP AT lo_result->get_results( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_dimension = lo_row_1->get_dimension( ).
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.
GetEstimatedCarbonEmissionsDimensionValuesSuccess¶
GetEstimatedCarbonEmissionsDimensionValuesSuccess
DATA(lo_result) = lo_client->getestcarbonemsnsdimenvalues(
io_timeperiod = new /aws1/cl_sustimeperiod(
iv_end = '20251231235959.9990000'
iv_start = '20250101000000.0000000'
)
it_dimensions = VALUE /aws1/cl_susdimensionlist_w=>tt_dimensionlist(
( new /aws1/cl_susdimensionlist_w( |REGION| ) )
( new /aws1/cl_susdimensionlist_w( |SERVICE| ) )
( new /aws1/cl_susdimensionlist_w( |USAGE_ACCOUNT_ID| ) )
)
).