/AWS1/IF_IOS=>PUTASTMODELIFACERELATIONSHIP()
¶
About PutAssetModelInterfaceRelationship¶
Creates or updates an interface relationship between an asset model and an interface asset model. This operation applies an interface to an asset model.
Method Signature¶
METHODS /AWS1/IF_IOS~PUTASTMODELIFACERELATIONSHIP
IMPORTING
!IV_ASSETMODELID TYPE /AWS1/IOSCUSTOMID OPTIONAL
!IV_INTERFACEASSETMODELID TYPE /AWS1/IOSCUSTOMID OPTIONAL
!IO_PROPERTYMAPPINGCONF TYPE REF TO /AWS1/CL_IOSPRPMAPPINGCONF OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/IOSCLIENTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iosputastmdelifrela01
RAISING
/AWS1/CX_IOSCNFLCTOPERATIONEX
/AWS1/CX_IOSINTERNALFAILUREEX
/AWS1/CX_IOSINVALIDREQUESTEX
/AWS1/CX_IOSLIMITEXCEEDEDEX
/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_assetmodelid
TYPE /AWS1/IOSCUSTOMID
/AWS1/IOSCUSTOMID
¶
The ID of the asset model. This can be either the actual ID in UUID format, or else externalId: followed by the external ID.
iv_interfaceassetmodelid
TYPE /AWS1/IOSCUSTOMID
/AWS1/IOSCUSTOMID
¶
The ID of the interface asset model. This can be either the actual ID in UUID format, or else externalId: followed by the external ID.
io_propertymappingconf
TYPE REF TO /AWS1/CL_IOSPRPMAPPINGCONF
/AWS1/CL_IOSPRPMAPPINGCONF
¶
The configuration for mapping properties from the interface asset model to the asset model where the interface is applied. This configuration controls how properties are matched and created during the interface application process.
Optional arguments:¶
iv_clienttoken
TYPE /AWS1/IOSCLIENTTOKEN
/AWS1/IOSCLIENTTOKEN
¶
A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_iosputastmdelifrela01
/AWS1/CL_IOSPUTASTMDELIFRELA01
¶
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->putastmodelifacerelationship(
io_propertymappingconf = new /aws1/cl_iosprpmappingconf(
it_overrides = VALUE /aws1/cl_iospropertymapping=>tt_propertymappings(
(
new /aws1/cl_iospropertymapping(
iv_assetmodelpropertyid = |string|
iv_ifaceassetmodelpropertyid = |string|
)
)
)
iv_createmissingproperty = ABAP_TRUE
iv_matchbypropertyname = ABAP_TRUE
)
iv_assetmodelid = |string|
iv_clienttoken = |string|
iv_interfaceassetmodelid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_id = lo_result->get_assetmodelid( ).
lv_id = lo_result->get_interfaceassetmodelid( ).
lv_arn = lo_result->get_assetmodelarn( ).
lo_assetmodelstatus = lo_result->get_assetmodelstatus( ).
IF lo_assetmodelstatus IS NOT INITIAL.
lv_assetmodelstate = lo_assetmodelstatus->get_state( ).
lo_errordetails = lo_assetmodelstatus->get_error( ).
IF lo_errordetails IS NOT INITIAL.
lv_errorcode = lo_errordetails->get_code( ).
lv_errormessage = lo_errordetails->get_message( ).
LOOP AT lo_errordetails->get_details( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_detailederrorcode = lo_row_1->get_code( ).
lv_detailederrormessage = lo_row_1->get_message( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.