Skip to content

/AWS1/IF_SGF=>LISTRECORDS()

About ListRecords

Lists the RecordIdentifier values of all records stored in a FeatureGroup's OnlineStore. This enables you to discover which records exist without retrieving the full record data.

Method Signature

METHODS /AWS1/IF_SGF~LISTRECORDS
  IMPORTING
    !IV_FEATUREGROUPNAME TYPE /AWS1/SGFFEATUREGROUPNAMEORARN OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/SGFLISTRECORDSMAXRESULTS OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/SGFLISTRECORDSNEXTTOKEN OPTIONAL
    !IV_INCLUDESOFTDELETEDRECORDS TYPE /AWS1/SGFBOOLEAN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sgflistrecordsrsp
  RAISING
    /AWS1/CX_SGFACCESSFORBIDDEN
    /AWS1/CX_SGFINTERNALFAILURE
    /AWS1/CX_SGFRESOURCENOTFOUND
    /AWS1/CX_SGFSERVICEUNAVAILABLE
    /AWS1/CX_SGFVALIDATIONERROR
    /AWS1/CX_SGFCLIENTEXC
    /AWS1/CX_SGFSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_featuregroupname TYPE /AWS1/SGFFEATUREGROUPNAMEORARN /AWS1/SGFFEATUREGROUPNAMEORARN

The name or Amazon Resource Name (ARN) of the feature group to list records from.

Optional arguments:

iv_maxresults TYPE /AWS1/SGFLISTRECORDSMAXRESULTS /AWS1/SGFLISTRECORDSMAXRESULTS

The maximum number of record identifiers to return in a single page of results. For the InMemory tier, this value is a hint and not a strict requirement. The response may contain more or fewer results than the specified MaxResults.

iv_nexttoken TYPE /AWS1/SGFLISTRECORDSNEXTTOKEN /AWS1/SGFLISTRECORDSNEXTTOKEN

A token to resume pagination of ListRecords results.

iv_includesoftdeletedrecords TYPE /AWS1/SGFBOOLEAN /AWS1/SGFBOOLEAN

If set to true, the result includes records that have been soft deleted.

RETURNING

oo_output TYPE REF TO /aws1/cl_sgflistrecordsrsp /AWS1/CL_SGFLISTRECORDSRSP

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->listrecords(
  iv_featuregroupname = |string|
  iv_includesoftdeletedrecords = ABAP_TRUE
  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_recordidentifiers( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_valueasstring = lo_row_1->get_value( ).
    ENDIF.
  ENDLOOP.
  lv_listrecordsnexttoken = lo_result->get_nexttoken( ).
ENDIF.

List record identifiers from a feature group

List record identifiers from a feature group

DATA(lo_result) = lo_client->listrecords(
  iv_featuregroupname = |my-feature-group|
  iv_maxresults = 10
).