/AWS1/IF_SGF=>GETRECORD()¶
About GetRecord¶
Use for OnlineStore serving from a FeatureStore. Only the
latest records stored in the OnlineStore can be retrieved. If no Record with
RecordIdentifierValue is found, then an empty result is returned.
Method Signature¶
METHODS /AWS1/IF_SGF~GETRECORD
IMPORTING
!IV_FEATUREGROUPNAME TYPE /AWS1/SGFFEATUREGROUPNAMEORARN OPTIONAL
!IV_RECORDIDVALUEASSTRING TYPE /AWS1/SGFVALUEASSTRING OPTIONAL
!IT_FEATURENAMES TYPE /AWS1/CL_SGFFEATURENAMES_W=>TT_FEATURENAMES OPTIONAL
!IV_EXPIRATIONTIMERESPONSE TYPE /AWS1/SGFEXPIRTIMERESPONSE OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sgfgetrecordresponse
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 from which you want to retrieve a record.
iv_recordidvalueasstring TYPE /AWS1/SGFVALUEASSTRING /AWS1/SGFVALUEASSTRING¶
The value that corresponds to
RecordIdentifiertype and uniquely identifies the record in theFeatureGroup.
Optional arguments:¶
it_featurenames TYPE /AWS1/CL_SGFFEATURENAMES_W=>TT_FEATURENAMES TT_FEATURENAMES¶
List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned.
iv_expirationtimeresponse TYPE /AWS1/SGFEXPIRTIMERESPONSE /AWS1/SGFEXPIRTIMERESPONSE¶
Parameter to request
ExpiresAtin response. IfEnabled,GetRecordwill return the value ofExpiresAt, if it is not null. IfDisabledand null,GetRecordwill return null.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_sgfgetrecordresponse /AWS1/CL_SGFGETRECORDRESPONSE¶
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->getrecord(
it_featurenames = VALUE /aws1/cl_sgffeaturenames_w=>tt_featurenames(
( new /aws1/cl_sgffeaturenames_w( |string| ) )
)
iv_expirationtimeresponse = |string|
iv_featuregroupname = |string|
iv_recordidvalueasstring = |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_record( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_featurename = lo_row_1->get_featurename( ).
lv_valueasstring = lo_row_1->get_valueasstring( ).
LOOP AT lo_row_1->get_valueasstringlist( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_valueasstring = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
lv_expiresat = lo_result->get_expiresat( ).
ENDIF.