Skip to content

/AWS1/IF_WA2=>GETREVENUESTATSTIMESERIES()

About GetRevenueStatisticsTimeSeries

Retrieves time series data for monetization revenue. Returns data points aggregated at the specified interval for the given time window. This operation is only available for CLOUDFRONT scope. The maximum supported time window is 90 days. When no CurrencyMode filter is provided, results default to REAL. To retrieve test data, include a CurrencyMode filter with the value TEST.

Method Signature

METHODS /AWS1/IF_WA2~GETREVENUESTATSTIMESERIES
  IMPORTING
    !IV_STATISTICTYPE TYPE /AWS1/WA2TIMESERIESSTATSTCTYPE OPTIONAL
    !IO_TIMEWINDOW TYPE REF TO /AWS1/CL_WA2TIMEWINDOW OPTIONAL
    !IV_SCOPE TYPE /AWS1/WA2SCOPE OPTIONAL
    !IV_INTERVAL TYPE /AWS1/WA2INTERVALTYPE OPTIONAL
    !IV_CURRENCY TYPE /AWS1/WA2CURRENCY OPTIONAL
    !IV_GROUPBY TYPE /AWS1/WA2GROUPBYTYPE OPTIONAL
    !IT_FILTERS TYPE /AWS1/CL_WA2MONETIZATIONFILTER=>TT_MONETIZATIONFILTERLIST OPTIONAL
    !IV_LIMIT TYPE /AWS1/WA2MAXDATAPOINTS OPTIONAL
    !IV_NEXTMARKER TYPE /AWS1/WA2NEXTMARKER OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wa2gtrevstatstmeser01
  RAISING
    /AWS1/CX_WA2WAFINTERNALERROREX
    /AWS1/CX_WA2WAFINVALIDOPEX
    /AWS1/CX_WA2WAFINVALIDPARAMEX
    /AWS1/CX_WA2WAFNONEXENTITEMEX
    /AWS1/CX_WA2CLIENTEXC
    /AWS1/CX_WA2SERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_statistictype TYPE /AWS1/WA2TIMESERIESSTATSTCTYPE /AWS1/WA2TIMESERIESSTATSTCTYPE

The type of time series data to retrieve: DATE_HISTOGRAM for revenue over time, or PAYMENT_TRAFFIC for payment traffic patterns.

io_timewindow TYPE REF TO /AWS1/CL_WA2TIMEWINDOW /AWS1/CL_WA2TIMEWINDOW

The time range for the query. Specify start and end timestamps.

iv_scope TYPE /AWS1/WA2SCOPE /AWS1/WA2SCOPE

Specifies whether this is for a Amazon CloudFront distribution (CLOUDFRONT) or for a regional application (REGIONAL).

iv_interval TYPE /AWS1/WA2INTERVALTYPE /AWS1/WA2INTERVALTYPE

The time interval for aggregating data points: MINUTELY, FIVE_MINUTELY, HOURLY, or DAILY.

iv_currency TYPE /AWS1/WA2CURRENCY /AWS1/WA2CURRENCY

The currency for the amounts in the response.

Optional arguments:

iv_groupby TYPE /AWS1/WA2GROUPBYTYPE /AWS1/WA2GROUPBYTYPE

The dimension to group results by.

it_filters TYPE /AWS1/CL_WA2MONETIZATIONFILTER=>TT_MONETIZATIONFILTERLIST TT_MONETIZATIONFILTERLIST

Optional filters to narrow the results.

iv_limit TYPE /AWS1/WA2MAXDATAPOINTS /AWS1/WA2MAXDATAPOINTS

The maximum number of data points to return. Minimum: 1. Maximum: 10000.

iv_nextmarker TYPE /AWS1/WA2NEXTMARKER /AWS1/WA2NEXTMARKER

When you get a paginated response, this marker indicates that additional results are available.

RETURNING

oo_output TYPE REF TO /aws1/cl_wa2gtrevstatstmeser01 /AWS1/CL_WA2GTREVSTATSTMESER01

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->getrevenuestatstimeseries(
  io_timewindow = new /aws1/cl_wa2timewindow(
    iv_endtime = '20150101000000.0000000'
    iv_starttime = '20150101000000.0000000'
  )
  it_filters = VALUE /aws1/cl_wa2monetizationfilter=>tt_monetizationfilterlist(
    (
      new /aws1/cl_wa2monetizationfilter(
        it_values = VALUE /aws1/cl_wa2monetizationfltv00=>tt_monetizationfiltervaluelist(
          ( new /aws1/cl_wa2monetizationfltv00( |string| ) )
        )
        iv_name = |string|
      )
    )
  )
  iv_currency = |string|
  iv_groupby = |string|
  iv_interval = |string|
  iv_limit = 123
  iv_nextmarker = |string|
  iv_scope = |string|
  iv_statistictype = |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_datapoints( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_timestamp = lo_row_1->get_date( ).
      lv_requestcount = lo_row_1->get_monetizeservedcount( ).
      lv_requestcount = lo_row_1->get_settledcount( ).
      lv_monetizationamountvalue = lo_row_1->get_totalamount( ).
      lv_filterstring = lo_row_1->get_category( ).
      lv_filterstring = lo_row_1->get_intent( ).
      lv_filterstring = lo_row_1->get_groupbyvalue( ).
    ENDIF.
  ENDLOOP.
  lv_nextmarker = lo_result->get_nextmarker( ).
ENDIF.