Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // AbapCatalog controls ABAP runtime env and dictionary
- //sqlViewName defines name of generated by dictionary SQL view
- @AbapCatalog.sqlViewName: 'zkhrcccpark'
- @AbapCatalog.compiler.compareFilter: true
- // defines behavior of the auth check.
- // runtime engines uses status of this annotation for auth check
- // NOT_REQUIRED means that auth check is execunted only if a DCL role exists for this CDS
- @AccessControl.authorizationCheck: #NOT_REQUIRED
- // just describtion for the vies, could be represented on UI
- @EndUserText.label: 'Park consumption view'
- // defines if CDS view or entity is relevant for search scenarios
- @Search.searchable: true
- // enabling metadata extansions in additional dict object
- @Metadata.allowExtensions: true
- // ObjectModel annotations provide definition of structural and transactional aspects of business data model
- @ObjectModel: {
- // annotation defines performance parameters for CDS consuming
- usageType:{
- // dataClass annotation has indicator role, so that consumers of this CDS can define suitable caching stratagies for the selected data
- dataClass: #TRANSACTIONAL,
- // describes which performance characteristics a CDS model has
- serviceQuality: #A,
- // every view assigned to a size category, which defines result set or the set of data to be calculated or searched while consuming
- sizeCategory: #S
- },
- // defines the toot of the compositional hierarchy for the darft business object
- // to be crated (root of the BO tree I guess)
- semanticKey: 'ParkID',
- // defines the root of compositional hierarchy
- compositionRoot: true,
- // I guess this annotation describes the main column of a view
- representativeKey: 'ParkUUID',
- // makes thansactional requests to a consumption view be deligated to the
- // transactional runtime of the underlying BO view
- // (which is annotated with @ObjectModel.transactionalProcessingEnabled: true
- // in composite view, i guess)
- transactionalProcessingDelegated: true,
- // alowing creation of new instances. EXTERNAL_CALCULATION making create property be calculated in a BOPF property determination
- // it's like we making BOPF responsible for create activity
- createEnabled: 'EXTERNAL_CALCULATION',
- // alowing deletion. managing same as create
- deleteEnabled: 'EXTERNAL_CALCULATION',
- // alowing updating. managing same as updating
- updateEnabled: 'EXTERNAL_CALCULATION',
- draftEnabled: true
- }
- define view zkhr_cc_c_park
- as select from zkhr_cc_i_park
- // association to child consumption view car
- association [1..*] to zkhr_cc_c_car as _Car on $projection.ParkUUID = _Car.ParkUUID
- // association to child consumption view dates
- association [0..*] to zkhr_cc_c_dates as _Dates on $projection.ParkUUID = _Dates.ParkUUID
- // association to value help view
- association [1..1] to Zkhr_cc_i_parkvh as _ParkVH on $projection.ParkID = _ParkVH.ParkID
- // association to park status view (provides park status field value)
- association [1..1] to zkhr_cc_c_parkstatus as _ParkStatus on $projection.ParkStatus = _ParkStatus.StatusCode
- and _ParkStatus.Language = $session.system_language
- {
- // allows to show or hide data fields on the object page
- @UI.hidden: true
- key ParkUUID,
- // allowing making search with this field
- @Search: {
- // enabling freestyle search for the element, but not for all 'cause of performance
- defaultSearchElement: true,
- // describes the percent of match for search result
- fuzzinessThreshold: 0.9,
- // specifies how relevant the values of an element are for ranking
- // HIGH means that element has high importance
- ranking: #HIGH
- }
- // defines text from a specific element to discribe value on UI
- @ObjectModel: {
- text: {
- element: [ 'ParkName' ]
- }
- }
- // enables referencing to a CDS view or entity which provides help view for this field
- @Consumption: {
- valueHelp: '_ParkVH'
- }
- ParkID,
- // just provides human readable text which is not (opionally) language-dependent
- @Semantics.text: true
- // allowing making search with this field
- @Search: {
- // enabling freestyle search for the element, but not for all 'cause of performance
- defaultSearchElement: true,
- // describes the percent of match for search result
- fuzzinessThreshold: 0.7,
- // specifies how relevant the values of an element are for ranking
- // HIGH means that element has high importance
- ranking: #HIGH
- }
- @EndUserText.quickInfo: 'Park Name'
- ParkName,
- Capacity,
- // if readonly is true, then consumer not able to update the field
- @ObjectModel.readOnly: true
- CarsCount,
- // allows to show or hide data fields on the object page
- @UI.hidden: true
- // if readonly is true, then consumer not able to update the field
- @ObjectModel.readOnly: true
- @EndUserText.label: 'Capacity Criticality'
- CapacityCriticality,
- @ObjectModel: {
- // if readonly is true, then consumer not able to update the field
- readOnly: true,
- //defines associated CDS view which provides text description for the annotated field
- text: {
- association: '_ParkStatus'
- }
- }
- // enables referencing to a CDS view or entity which provides help view for this field
- @Consumption.valueHelp: '_ParkStatus'
- // allowing making search with this field
- @Search: {
- // enabling freestyle search for the element, but not for all 'cause of performance
- defaultSearchElement: true,
- // describes the percent of match for search result
- fuzzinessThreshold: 0.7,
- // specifies how relevant the values of an element are for ranking
- // HIGH means that element has high importance
- ranking: #HIGH
- }
- ParkStatus,
- @ObjectModel.readOnly: true
- crea_date_time,
- @ObjectModel.readOnly: true
- crea_uname,
- @ObjectModel.readOnly: true
- lchg_date_time,
- @ObjectModel.readOnly: true
- lchg_uname,
- @ObjectModel.readOnly: true
- imageUrl,
- @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
- _Car,
- _Dates,
- _ParkVH,
- _ParkStatus
- }
Add Comment
Please, Sign In to add comment