/AWS1/IF_SUS=>GETESTIMATEDWATERALLOCATION()¶
About GetEstimatedWaterAllocation¶
Returns estimated water allocation values based on customer grouping and filtering parameters. We recommend using pagination to ensure that the operation returns quickly and successfully.
Method Signature¶
METHODS /AWS1/IF_SUS~GETESTIMATEDWATERALLOCATION
IMPORTING
!IO_TIMEPERIOD TYPE REF TO /AWS1/CL_SUSTIMEPERIOD OPTIONAL
!IT_GROUPBY TYPE /AWS1/CL_SUSDIMENSIONLIST_W=>TT_DIMENSIONLIST OPTIONAL
!IO_FILTERBY TYPE REF TO /AWS1/CL_SUSFILTEREXPRESSION OPTIONAL
!IT_ALLOCATIONTYPES TYPE /AWS1/CL_SUSWTRALLOCTYPELIST_W=>TT_WATERALLOCATIONTYPELIST OPTIONAL
!IV_GRANULARITY TYPE /AWS1/SUSTIMEGRANULARITY OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/SUSMAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/SUSNEXTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_susgetestwtrallocrsp
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 estimated water allocation. The range must include the start date of a year for that year's data to be included in the response.
Optional arguments:¶
it_groupby TYPE /AWS1/CL_SUSDIMENSIONLIST_W=>TT_DIMENSIONLIST TT_DIMENSIONLIST¶
The dimensions available for grouping estimated water allocation.
io_filterby TYPE REF TO /AWS1/CL_SUSFILTEREXPRESSION /AWS1/CL_SUSFILTEREXPRESSION¶
The criteria for filtering estimated water allocation. To determine which dimensions are available to be filtered by, you can first call GetEstimatedWaterAllocationDimensionValues
it_allocationtypes TYPE /AWS1/CL_SUSWTRALLOCTYPELIST_W=>TT_WATERALLOCATIONTYPELIST TT_WATERALLOCATIONTYPELIST¶
The allocation types to include in the results. If absent, returns
TOTAL_WATER_WITHDRAWALSallocation types.
iv_granularity TYPE /AWS1/SUSTIMEGRANULARITY /AWS1/SUSTIMEGRANULARITY¶
The time granularity for the results. Only
YEARLY_CALENDARtime granularity is currently supported for water allocation. Defaults toYEARLY_CALENDARif absent.If requesting partial time periods, data will be returned based on the smallest supported granularity. For example, requesting
2025-04-01T00:00:00Zto2026-04-01T00:00:00ZwithYEARLY_CALENDARwill return all the data for 2026 only.
iv_maxresults TYPE /AWS1/SUSMAXRESULTS /AWS1/SUSMAXRESULTS¶
The maximum number of results to return in a single call. Default is 1000.
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_susgetestwtrallocrsp /AWS1/CL_SUSGETESTWTRALLOCRSP¶
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->getestimatedwaterallocation(
io_filterby = new /aws1/cl_susfilterexpression(
it_dimensions = VALUE /aws1/cl_susdimenvaluelist_w=>tt_dimensionlistmap(
(
VALUE /aws1/cl_susdimenvaluelist_w=>ts_dimensionlistmap_maprow(
key = |string|
value = VALUE /aws1/cl_susdimenvaluelist_w=>tt_dimensionvaluelist(
( new /aws1/cl_susdimenvaluelist_w( |string| ) )
)
)
)
)
)
io_timeperiod = new /aws1/cl_sustimeperiod(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
it_allocationtypes = VALUE /aws1/cl_suswtralloctypelist_w=>tt_waterallocationtypelist(
( new /aws1/cl_suswtralloctypelist_w( |string| ) )
)
it_groupby = VALUE /aws1/cl_susdimensionlist_w=>tt_dimensionlist(
( new /aws1/cl_susdimensionlist_w( |string| ) )
)
iv_granularity = |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.
lo_timeperiod = lo_row_1->get_timeperiod( ).
IF lo_timeperiod IS NOT INITIAL.
lv_timestamp = lo_timeperiod->get_start( ).
lv_timestamp = lo_timeperiod->get_end( ).
ENDIF.
LOOP AT lo_row_1->get_dimensionsvalues( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_dimensionvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv_modelversion = lo_row_1->get_modelversion( ).
LOOP AT lo_row_1->get_allocationvalues( ) into ls_row_3.
lv_key_1 = ls_row_3-key.
lo_value_1 = ls_row_3-value.
IF lo_value_1 IS NOT INITIAL.
lv_double = lo_value_1->get_value( ).
lv_waterallocationunit = lo_value_1->get_unit( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.
GetEstimatedWaterAllocationSuccess¶
GetEstimatedWaterAllocationSuccess
DATA(lo_result) = lo_client->getestimatedwaterallocation(
io_timeperiod = new /aws1/cl_sustimeperiod(
iv_end = '20260101000000.0000000'
iv_start = '20250101000000.0000000'
)
it_allocationtypes = VALUE /aws1/cl_suswtralloctypelist_w=>tt_waterallocationtypelist(
( new /aws1/cl_suswtralloctypelist_w( |TOTAL_WATER_WITHDRAWALS| ) )
)
it_groupby = VALUE /aws1/cl_susdimensionlist_w=>tt_dimensionlist(
( new /aws1/cl_susdimensionlist_w( |SERVICE| ) )
)
iv_granularity = |YEARLY_CALENDAR|
).