Ansicht
Dokumentation

ABENBDL_EXAMPLE_ROOT_ENTITY - BDL EXAMPLE ROOT ENTITY

ABENBDL_EXAMPLE_ROOT_ENTITY - BDL EXAMPLE ROOT ENTITY

Fill RESBD Structure from EBP Component Structure   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
Diese Dokumentation steht unter dem Copyright der SAP AG.
SAP E-Book

- Wurzelentität im Beispiel

Die CDS-View /DMO/I_Travel repräsentiert den Wurzelknoten des Business-Objekts. Der Wurzelknoten Travel dient zur Verwaltung der allgemeinen Flugbuchungsdaten, wie Reise-ID, Agentur-ID, Kundennummer, Beginn- und Enddatum einer Reise, Buchungsgebühr, Gesamtpreis, Währung, Beschreibung der Reise, Reisestatus und Datum der letzten Veränderung.

Die Reisedaten werden in der Datenbanktabelle /DMO/TRAVEL gespeichert.

@AbapCatalog.sqlViewName: 'ZDEMO_TRAVEL_DB'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.preserveKey: true
@EndUserText.label: 'Travel'
@Search.searchable: true
@ObjectModel.semanticKey: ['TravelID']
@ObjectModel.representativeKey: 'TravelID'

define root view /DMO/I_Travel
  as select from /dmo/travel as Travel

  composition [0..*] of /DMO/I_Booking  as _Booking

  association [1..1] to /DMO/I_Agency       as _Agency       on
     $projection.AgencyID = _Agency.AgencyID
  association [1..1] to /DMO/I_Customer     as _Customer     on
     $projection.CustomerID = _Customer.CustomerID
  association [0..*] to I_CurrencyText      as _CurrencyText on
     $projection.Currency_Code = _CurrencyText.Currency
  association [0..*] to /DMO/I_Status_Text  as _StatusText   on
     $projection.Status = _StatusText.Status

{
  @Search.defaultSearchElement: true
  @ObjectModel.readOnly: true
  key Travel.travel_id             as Travel_ID,

  @Search.defaultSearchElement: true
  @ObjectModel.text.association: '_Agency'
  @Consumption.valueHelpDefinition: [{
     entity: {name: '/DMO/I_Agency', element: 'Agency_ID' }}]
  Travel.agency_id                 as Agency_ID,

  @Search.defaultSearchElement: true
  @Consumption.valueHelpDefinition: [{
     entity: {name: '/DMO/I_Customer', element: 'CustomerID' }}]
  @ObjectModel.text.association: '_Customer'
  Travel.customer_id               as Customer_ID,

  Travel.begin_date                as Begin_Date,
  Travel.end_date                  as End_Date,

  @Semantics.currencyCode: true
  @ObjectModel.text.association: '_CurrencyText'
  @Consumption.valueHelpDefinition: [{
    entity: {name: 'I_CurrencyText', element: 'Currency' }}]
  Travel.currency_code             as Currency_Code,

  @Semantics.amount.currencyCode: 'Currency_Code'
  Travel.booking_fee               as Booking_Fee,

  @Semantics.amount.currencyCode: 'Currency_Code'
  @ObjectModel.readOnly: true
  Travel.total_price               as Total_Price,

  @Search.defaultSearchElement: true
  @Search.fuzzinessThreshold: 0.86
  Travel.description               as Description,

  @Consumption.valueHelpDefinition: [{
     entity: {name: '/DMO/I_Status_Text', element: 'Status' }}]
  @ObjectModel.text.association: '_StatusText'
  @ObjectModel.readOnly: true
  @UI: { lineItem: [ { position: 50, importance: #HIGH },
                     { type:       #FOR_ACTION,
                       dataAction: 'set_status_booked',
                       label:      'Set Status to Booked' } ]
         ,identification: [ { position: 80 } ]
         ,selectionField: [ { position: 60 }]
       }
  Travel.status                    as Status,

  Travel.lastchangedat             as LastChangedAt,

  /* Associations */
  @Search.defaultSearchElement: true
  _Booking,

  _Agency,
  _Customer,
  _StatusText,
  _CurrencyText
}





General Data in Customer Master   BAL_S_LOG - Application Log: Log header data  
Diese Dokumentation steht unter dem Copyright der SAP AG.

Length: 6176 Date: 20240523 Time: 162538     sap01-206 ( 32 ms )