Skip to content

/AWS1/CL_IOA=>SAMPLECHANNELDATA()

About SampleChannelData

Retrieves a sample of messages from the specified channel ingested during the specified timeframe. Up to 10 messages can be retrieved.

Method Signature

IMPORTING

Required arguments:

iv_channelname TYPE /AWS1/IOACHANNELNAME /AWS1/IOACHANNELNAME

The name of the channel whose message samples are retrieved.

Optional arguments:

iv_maxmessages TYPE /AWS1/IOAMAXMESSAGES /AWS1/IOAMAXMESSAGES

The number of sample messages to be retrieved. The limit is 10. The default is also 10.

iv_starttime TYPE /AWS1/IOASTARTTIME /AWS1/IOASTARTTIME

The start of the time window from which sample messages are retrieved.

iv_endtime TYPE /AWS1/IOAENDTIME /AWS1/IOAENDTIME

The end of the time window from which sample messages are retrieved.

RETURNING

oo_output TYPE REF TO /aws1/cl_ioasamplechanneldat01 /AWS1/CL_IOASAMPLECHANNELDAT01

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->/aws1/if_ioa~samplechanneldata(
  iv_channelname = |string|
  iv_endtime = '20150101000000.0000000'
  iv_maxmessages = 123
  iv_starttime = '20150101000000.0000000'
).

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_payloads( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_messagepayload = lo_row_1->get_value( ).
    ENDIF.
  ENDLOOP.
ENDIF.