/AWS1/IF_IOS=>LISTASSETPROPERTIES()¶
About ListAssetProperties¶
Retrieves a paginated list of properties associated with an asset. If you update properties associated with the model before you finish listing all the properties, you need to start all over again.
Method Signature¶
METHODS /AWS1/IF_IOS~LISTASSETPROPERTIES
IMPORTING
!IV_ASSETID TYPE /AWS1/IOSCUSTOMID OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/IOSNEXTTOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/IOSMAXRESULTS OPTIONAL
!IV_FILTER TYPE /AWS1/IOSLISTASSETPRPSFILTER OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ioslistassetprpsrsp
RAISING
/AWS1/CX_IOSINTERNALFAILUREEX
/AWS1/CX_IOSINVALIDREQUESTEX
/AWS1/CX_IOSRESOURCENOTFOUNDEX
/AWS1/CX_IOSTHROTTLINGEX
/AWS1/CX_IOSCLIENTEXC
/AWS1/CX_IOSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_assetid TYPE /AWS1/IOSCUSTOMID /AWS1/IOSCUSTOMID¶
The ID of the asset. This can be either the actual ID in UUID format, or else
externalId:followed by the external ID, if it has one. For more information, see Referencing objects with external IDs in the IoT SiteWise User Guide.
Optional arguments:¶
iv_nexttoken TYPE /AWS1/IOSNEXTTOKEN /AWS1/IOSNEXTTOKEN¶
The token to be used for the next set of paginated results.
iv_maxresults TYPE /AWS1/IOSMAXRESULTS /AWS1/IOSMAXRESULTS¶
The maximum number of results to return for each paginated request. If not specified, the default value is 50.
iv_filter TYPE /AWS1/IOSLISTASSETPRPSFILTER /AWS1/IOSLISTASSETPRPSFILTER¶
Filters the requested list of asset properties. You can choose one of the following options:
ALL– The list includes all asset properties for a given asset model ID.
BASE– The list includes only base asset properties for a given asset model ID.Default:
BASE
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ioslistassetprpsrsp /AWS1/CL_IOSLISTASSETPRPSRSP¶
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->listassetproperties(
iv_assetid = |string|
iv_filter = |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_assetpropertysummaries( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_id = lo_row_1->get_id( ).
lv_externalid = lo_row_1->get_externalid( ).
lv_propertyalias = lo_row_1->get_alias( ).
lv_propertyunit = lo_row_1->get_unit( ).
lo_propertynotification = lo_row_1->get_notification( ).
IF lo_propertynotification IS NOT INITIAL.
lv_propertynotificationtop = lo_propertynotification->get_topic( ).
lv_propertynotificationsta = lo_propertynotification->get_state( ).
ENDIF.
lv_id = lo_row_1->get_assetcompositemodelid( ).
LOOP AT lo_row_1->get_path( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_id = lo_row_3->get_id( ).
lv_name = lo_row_3->get_name( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.