Zum Hauptinhalt springen

5. Business Service erweitern

  • Die BO Projection View ZC_BookingTP inklusive einer Assoziation zur BO Projection View ZC_TravelTP erstellen
  • Die BO Projection View ZC_TravelTP um eine Assoziation zur BO Projection View ZC_BookingTP erweitern
  • Die Service Definition ZUI_TRAVEL um die BO Projection View ZC_BookingTP erweitern

BO Projection View ZC_BookingTP

@EndUserText.label: 'Booking'
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view entity ZC_BookingTP
as projection on ZR_BookingTP
{
key BookingUuid,
TravelUuid,
BookingId,
BookingDate,
CarrierId,
ConnectionId,
FlightDate,
FlightPrice,
CurrencyCode,

/* Associations */
_Travel : redirected to parent ZC_TravelTP
}

BO Projection View ZC_TravelTP

@EndUserText.label: 'Travel'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@Search.searchable: true
@Metadata.allowExtensions: true
define root view entity ZC_TravelTP
as projection on ZR_TravelTP
{
key TravelUuid,
TravelId,
AgencyId,
CustomerId,
BeginDate,
EndDate,
BookingFee,
TotalPrice,
CurrencyCode,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.7
Description,
Status,

/* Administrative Data */
CreatedBy,
CreatedAt,
LastChangedBy,
LastChangedAt,

/* Associations */
_Bookings : redirected to composition child ZC_BookingTP
}

Service Definition ZUI_TRAVEL

@EndUserText.label: 'Travel'
define service ZUI_TRAVEL {
expose ZC_TravelTP as Travel;
expose ZC_BookingTP as Booking;
}