@ObjectModel: {
transactionalProcessingEnabled: true,
...
createEnabled: true | false -- no dynamic entity control support for creation operations
deleteEnabled: 'EXTERNAL_CALCULATION'
updateEnabled: 'EXTERNAL_CALCULATION'
...
}
define view <ViewName>
as select from <data_source>
{
...
}
METHOD define.
DATA:
lr_entity TYPE REF TO /iwbep/if_mgw_odata_entity_typ.
super->define( ).
DATA(lr_entityset) = model->get_entity_set( 'ZCDS_I_SOS_HOME_ITEM' ).
DATA(lr_anno) = lr_entityset->create_annotation( 'sap' ).
IF lr_anno IS BOUND.
lr_anno->add( iv_key = 'updatable-path' iv_value = 'zactive' ).
lr_anno->add( iv_key = 'deletable-path' iv_value = 'zactive' ).
ENDIF.
...
ENDMETHOD.
<Annotations Target="ZFIAP_SOS_HOME_SRV.ZFIAP_SOS_HOME_SRV_Entities/ZCDS_I_SOS_HOME_ITEM">
<Annotation Term="Capabilities.UpdateRestrictions">
<Record Type="Capabilities.UpdateRestrictionsType">
<PropertyValue Property="Updatable" Path="zactive"/>
</Record>
</Annotation>
</Annotations>
<EntityContainer Name="ZFIAP_SOS_HOME_SRV_Entities" m:IsDefaultEntityContainer="true" sap:supported-formats="atom json xlsx">
<EntitySet Name="ZCDS_C_SOS_HOME_TP" EntityType="ZFIAP_SOS_HOME_SRV.ZCDS_C_SOS_HOME_TPType" sap:creatable="false" sap:deletable="false" sap:content-version="1"/>
<EntitySet Name="ZCDS_I_SOS_HOME_ITEM" EntityType="ZFIAP_SOS_HOME_SRV.ZCDS_I_SOS_HOME_ITEMType" sap:content-version="1" sap:deletable-path="zactive" sap:updatable-path="zactive"/>
<AssociationSet Name="assoc_D9749EB9F873E67DF6F0EBC9B059C454" Association="ZFIAP_SOS_HOME_SRV.assoc_D9749EB9F873E67DF6F0EBC9B059C454" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:content-version="1">
<End EntitySet="ZCDS_C_SOS_HOME_TP" Role="FromRole_assoc_D9749EB9F873E67DF6F0EBC9B059C454"/>
<End EntitySet="ZCDS_I_SOS_HOME_ITEM" Role="ToRole_assoc_D9749EB9F873E67DF6F0EBC9B059C454"/>
</AssociationSet>
</EntityContainer>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
9 | |
5 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 |