Add child Entity to Data Model App using RAP Cloud Environment
AGREGAR UNA ENTIDAD AL MODELO DE DATOS DE UNA APLICACIÓN ABAP RAP CLOUD.
Objetivo
Adecuar una aplicación para añadir una entidad (jerárquica inferior) al modelo de datos (CDS) con RestFul Application programming model en Eclipse utilizando ABAP Development Tools.
Prerequisitos
- Desarrollo de un servicio OData para una aplicación FIORI (Managed).
- Añadir lógica de negocio a una aplicación ABAP RAP ambiente Cloud.
La aplicación creada solo tiene la entidad Travel, que es como una tabla Header, ahora crearemos una tabla que será su Detail, es decir, por cada viaje podrán haber uno o más 1…* Bookings.
Pasos
- Crear persistencia de datos de Bookings.
- Crear definición de datos de Bookings.
- Ajustar definición de datos de Travel.
- Ajustar definición de behavior de Travel.
- Ajustar business services de la Aplicación.
- Visualizar Aplicación (Preview).
1.- Crear la persistencia de datos
Crearemos la Tabla Bookings.
Seleccionar el paquete de la aplicación.
En el menú de contexto seleccionar New -> Other ABAP Repository Object.
Seleccionar Database Table. Presionar Next.
Capturar nombre y descripción de la tabla a crear. Presionar Next.
Seleccionar un Transport Request. Presionar Finish.
Reemplazar la propuesta con el siguiente código.
A todo código se le puede dar formato con Shift + F1.
@EndUserText.label : ' Table for Bookings'
@AbapCatalog.enhancement.category : #NOT_EXTENSIBLE
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #A
@AbapCatalog.dataMaintenance : #NOT_ALLOWED
define table zrap100_book_m {
key client : abap.clnt not null;
key travel_id : /dmo/travel_id not null;
key booking_id : /dmo/booking_id not null;
booking_date : /dmo/booking_date;
customer_id : /dmo/customer_id;
carrier_id : /dmo/carrier_id;
connection_id : /dmo/connection_id;
flight_date : /dmo/flight_date;
booking_status : /dmo/booking_status;
@Semantics.amount.currencyCode : 'zrap100_book_m.currency_code'
flight_price : /dmo/flight_price;
currency_code : /dmo/currency_code;
local_last_changed_at : abp_locinst_lastchange_tstmpl;
}
Grabar (Ctrl+S) y Activar (CTRL+F3).
Volvemos a hacer exactamente lo mismo ahora para crear la tabla draft de datos.
Seleccionar el paquete de la aplicación.
En el menú de contexto seleccionar New -> Other ABAP Repository Object.
Seleccionar Database Table. Presionar Next.
Capturar nombre y descripción de la tabla a crear. Presionar Next.
Seleccionar un Transport Request. Presionar Finish.
Reemplazar la propuesta con el siguiente código.
A todo código se le puede dar formato con Shift + F1.
@EndUserText.label : ' Draft table for Bookings'
@AbapCatalog.enhancement.category : #EXTENSIBLE_ANY
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #A
@AbapCatalog.dataMaintenance : #RESTRICTED
define table zrap100_dbook {
key client : abap.clnt not null;
key travelid : /dmo/travel_id not null;
key bookingid : /dmo/booking_id not null;
bookingdate : /dmo/booking_date;
customerid : /dmo/customer_id;
carrierid : /dmo/carrier_id;
connectionid : /dmo/connection_id;
flightdate : /dmo/flight_date;
bookingstatus : /dmo/booking_status;
@Semantics.amount.currencyCode : 'zrap100_dbook.currencycode'
flightprice : /dmo/flight_price;
currencycode : /dmo/currency_code;
locallastchangedat : abp_locinst_lastchange_tstmpl;
"%admin" : include sych_bdl_draft_admin_inc;
}
Grabar (Ctrl+S) y Activar (CTRL+F3).
2.- Crear la definición de datos de Bookings
Seleccionar la tabla recién creadad de Bookings y dar clic al botón derecho del mouse para abrir el menú contextual.
Seleccionar la opción New Data Definition.
Capturar nombre y descripción de la vista para Bookings.
Presionar Next.
Seleccionar un Transport Request. Presionar Finish.
Reemplazar la propuesta con el siguiente código.
A todo código se le puede dar formato con Shift + F1.
@AccessControl.authorizationCheck: #CHECK
@Metadata.allowExtensions: true
@EndUserText.label: 'CDS View for Booking'
define view entity ZR_RAP100_BOOK_M
as select from zrap100_book_m as Booking
association to parent ZR_RAP100_TRAVEL_M as _Travel on $projection.TravelID = _Travel.TravelID
association [1..1] to /DMO/I_Customer as _Customer on $projection.CustomerID = _Customer.CustomerID
association [1..1] to /DMO/I_Carrier as _Carrier on $projection.CarrierID = _Carrier.AirlineID
association [1..1] to /DMO/I_Connection as _Connection on $projection.CarrierID = _Connection.AirlineID
and $projection.ConnectionID = _Connection.ConnectionID
association [1..1] to /DMO/I_Flight as _Flight on $projection.CarrierID = _Flight.AirlineID
and $projection.ConnectionID = _Flight.ConnectionID and $projection.FlightDate = _Flight.FlightDate
association [1..1] to /DMO/I_Booking_Status_VH as _BookingStatus on
$projection.BookingStatus = _BookingStatus.BookingStatus
association [0..1] to I_Currency as _Currency on $projection.CurrencyCode = _Currency.Currency
{
key travel_id as TravelID,
key booking_id as BookingID,
booking_date as BookingDate,
customer_id as CustomerID,
carrier_id as CarrierID,
connection_id as ConnectionID,
flight_date as FlightDate,
@Semantics.amount.currencyCode: 'CurrencyCode'
flight_price as FlightPrice,
currency_code as CurrencyCode,
booking_status as BookingStatus,
@Semantics.systemDateTime.localInstanceLastChangedAt: true
local_last_changed_at as LocalLastChangedAt,
_Travel,
_Customer,
_Carrier,
_Connection,
_Flight,
_BookingStatus,
_Currency
}
Grabar (Ctrl+S) y Activar (CTRL+F3).
Nota: Grabar sin las relaciones al Travel (en azul), posteriormente se puede activar de nuevo una vez que estén las asociaciones en el Travel.
Seleccionar la vista recién creada y dar clic al botón derecho del mouse para abrir el menú contextual.
Seleccionar la opción New Data Definition.
Capturar nombre y descripción de la projection para Bookings.
Presionar Next.
Seleccionar un Transport Request. Presionar Finish.
Reemplazar la propuesta con el siguiente código.
A todo código se le puede dar formato con Shift + F1.
@AccessControl.authorizationCheck: #CHECK
@Metadata.allowExtensions: true
@EndUserText.label: 'Projection View for Booking'
@ObjectModel.semanticKey: [ 'BookingID' ]
@Search.searchable: true
define view entity ZC_RAP100_BOOK_M
as projection on ZR_RAP100_BOOK_M
{
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.90
key TravelID,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.90
key BookingID,
BookingDate,
@Consumption.valueHelpDefinition: [ {
entity: {
name: '/DMO/I_Customer_StdVH',
element: 'CustomerID'
},
useForValidation: true
} ]
@ObjectModel.text.element: ['CustomerName'] //annotation added
CustomerID,
_Customer.LastName as CustomerName, //element added
@Consumption.valueHelpDefinition: [
{ entity: {name: '/DMO/I_Flight_StdVH', element: 'AirlineID'},
additionalBinding: [ { localElement: 'FlightDate', element: 'FlightDate', usage: #RESULT },
{ localElement: 'ConnectionID', element: 'ConnectionID', usage: #RESULT },
{ localElement: 'FlightPrice', element: 'Price', usage: #RESULT },
{ localElement: 'CurrencyCode', element: 'CurrencyCode', usage: #RESULT } ] } ]
@ObjectModel.text.element: ['CarrierName'] //annotation added
CarrierID,
_Carrier.Name as CarrierName, //element added
@Consumption.valueHelpDefinition: [
{ entity: { name: '/DMO/I_Flight_StdVH', element: 'ConnectionID'},
additionalBinding: [ { localElement: 'FlightDate', element: 'FlightDate', usage: #RESULT },
{ localElement: 'CarrierID', element: 'AirlineID', usage: #FILTER_AND_RESULT },
{ localElement: 'FlightPrice', element: 'Price', usage: #RESULT },
{ localElement: 'CurrencyCode', element: 'CurrencyCode', usage: #RESULT } ] } ]
ConnectionID,
@Consumption.valueHelpDefinition: [
{ entity: { name: '/DMO/I_Flight_StdVH', element: 'FlightDate'},
additionalBinding: [ { localElement: 'CarrierID', element: 'AirlineID', usage: #FILTER_AND_RESULT },
{ localElement: 'ConnectionID', element: 'ConnectionID', usage: #FILTER_AND_RESULT },
{ localElement: 'FlightPrice', element: 'Price', usage: #RESULT },
{ localElement: 'CurrencyCode', element: 'CurrencyCode', usage: #RESULT } ] } ]
FlightDate,
@Consumption.valueHelpDefinition: [
{ entity: { name: '/DMO/I_Flight_StdVH', element: 'Price'},
additionalBinding: [ { localElement: 'FlightDate', element: 'FlightDate', usage: #FILTER_AND_RESULT },
{ localElement: 'CarrierID', element: 'AirlineID', usage: #FILTER_AND_RESULT },
{ localElement: 'ConnectionID', element: 'ConnectionID', usage: #FILTER_AND_RESULT },
{ localElement: 'CurrencyCode', element: 'CurrencyCode', usage: #RESULT } ] } ]
@Semantics.amount.currencyCode: 'CurrencyCode'
FlightPrice,
@Consumption.valueHelpDefinition: [ {
entity: {
name: 'I_CurrencyStdVH',
element: 'Currency'
},
useForValidation: true
} ]
CurrencyCode,
@Consumption.valueHelpDefinition: [ {
entity: {
name: '/DMO/I_Booking_Status_VH',
element: 'BookingStatus'
},
useForValidation: true
} ]
@ObjectModel.text.element: ['BookingStatusText'] //annotation added
BookingStatus,
_BookingStatus._Text.Text as BookingStatusText : localized, //element added
LocalLastChangedAt,
// public associations
_Travel : redirected to parent ZC_RAP100_TRAVEL_M,
_Customer,
_Carrier,
_Connection,
_Flight,
_BookingStatus,
_Currency
}
Grabar (Ctrl+S) y Activar (CTRL+F3).
Nota: Grabar sin las relaciones al Travel (en azul), posteriormente se puede activar de nuevo una vez que estén las asociaciones en el Travel.
Seleccionar el BO recién creado (dar clic al botón derecho del mouse para abrir el menú contextual).
Seleccionar la opción New Metadata Extension.
Capturar nombre y descripción del metadata para Bookings.
Presionar Next.
Seleccionar un Transport Request. Presionar Finish.
Reemplazar la propuesta con el siguiente código.
A todo código se le puede dar formato con Shift + F1.
@Metadata.layer: #CUSTOMER
@UI: {
headerInfo: {
typeName: 'Booking',
typeNamePlural: 'Bookings',
title: {
type: #STANDARD,
label: 'Booking',
value: 'BookingID'
}
},
presentationVariant: [ {
sortOrder: [ {
by: 'TravelID',
direction: #DESC
} ],
visualizations: [ {
type: #AS_LINEITEM
} ]
} ]
}
annotate view ZC_RAP100_BOOK_M with
{
@UI.facet: [ {
id: 'idBooking',
purpose: #STANDARD,
type: #IDENTIFICATION_REFERENCE,
label: 'Booking',
position: 10
} ]
@UI.lineItem: [ {
position: 10 ,
importance: #HIGH
} ]
@UI.identification: [ {
position: 10
} ]
@UI.selectionField: [ {
position: 10
} ]
TravelID;
@UI.lineItem: [ {
position: 20 ,
importance: #HIGH
} ]
@UI.identification: [ {
position: 20
} ]
BookingID;
@UI.lineItem: [ {
position: 30 ,
importance: #HIGH
} ]
@UI.identification: [ {
position: 30
} ]
BookingDate;
@UI.lineItem: [ {
position: 40 ,
importance: #HIGH
} ]
@UI.identification: [ {
position: 40
} ]
@UI.textArrangement: #TEXT_FIRST
@UI.selectionField: [ {
position: 40
} ]
CustomerID;
@UI.lineItem: [ {
position: 50 ,
importance: #HIGH
} ]
@UI.identification: [ {
position: 50
} ]
CarrierID;
@UI.lineItem: [ {
position: 60 ,
importance: #HIGH
} ]
@UI.identification: [ {
position: 60
} ]
ConnectionID;
@UI.lineItem: [ {
position: 70 ,
importance: #HIGH
} ]
@UI.identification: [ {
position: 70
} ]
FlightDate;
@UI.lineItem: [ {
position: 80 ,
importance: #HIGH
} ]
@UI.identification: [ {
position: 80
} ]
@UI.textArrangement: #TEXT_ONLY
BookingStatus;
@UI.lineItem: [ {
position: 90 ,
importance: #HIGH
} ]
@UI.identification: [ {
position: 90
} ]
FlightPrice;
@UI.hidden: true
LocalLastChangedAt;
}
Grabar (Ctrl+S) y Activar (CTRL+F3).
3.- Ajustar la definición de datos de Travel
Seleccionar la Definición de Datos de Travel.
Ajustar el código de la siguiente manera.
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: '##GENERATED My RAP Travel Managed App'
define root view entity ZR_RAP100_TRAVEL_M
as select from zrap100_travel_m as Travel
association [0..1] to /DMO/I_Agency as _Agency on $projection.AgencyID = _Agency.AgencyID
association [0..1] to /DMO/I_Customer as _Customer on $projection.CustomerID = _Customer.CustomerID
association [1..1] to /DMO/I_Overall_Status_VH as _OverallStatus on
$projection.OverallStatus = _OverallStatus.OverallStatus
association [0..1] to I_Currency as _Currency on $projection.CurrencyCode = _Currency.Currency
composition [0..*] of ZR_RAP100_BOOK_M as _Booking
{
key travel_id as TravelID,
agency_id as AgencyID,
customer_id as CustomerID,
begin_date as BeginDate,
end_date as EndDate,
@Semantics.amount.currencyCode: 'CurrencyCode'
booking_fee as BookingFee,
@Semantics.amount.currencyCode: 'CurrencyCode'
total_price as TotalPrice,
currency_code as CurrencyCode,
description as Description,
overall_status as OverallStatus,
@Semantics.largeObject: { mimeType: 'MimeType', //case-sensitive
fileName: 'FileName', //case-sensitive
acceptableMimeTypes: ['image/png', 'image/jpeg'],
contentDispositionPreference: #ATTACHMENT }
attachment as Attachment,
@Semantics.mimeType: true
mime_type as MimeType,
file_name as FileName,
@Semantics.user.createdBy: true
created_by as CreatedBy,
@Semantics.systemDateTime.createdAt: true
created_at as CreatedAt,
@Semantics.user.localInstanceLastChangedBy: true
local_last_changed_by as LocalLastChangedBy,
@Semantics.systemDateTime.localInstanceLastChangedAt: true
local_last_changed_at as LocalLastChangedAt,
@Semantics.systemDateTime.lastChangedAt: true
last_changed_at as LastChangedAt,
//public associations
_Booking,
_Customer,
_Agency,
_OverallStatus,
_Currency
}
Grabar (Ctrl+S) y Activar (CTRL+F3).
Seleccionar el Projection de Travel.
Ajustar el código de la siguiente manera.
@AccessControl.authorizationCheck: #CHECK
@Metadata.allowExtensions: true
@EndUserText.label: '##GENERATED Travel App (DEV_100)'
@Search.searchable: true
@ObjectModel.semanticKey: ['TravelID'] //case-sensitive
define root view entity ZC_RAP100_TRAVEL_M
provider contract transactional_query
as projection on ZR_RAP100_TRAVEL_M
{
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.90
key TravelID,
@Search.defaultSearchElement: true
@ObjectModel.text.element: ['AgencyName'] //case-sensitive
@Consumption.valueHelpDefinition: [{ entity : {name: '/DMO/I_Agency_StdVH', element: 'AgencyID' },
useForValidation: true }]
AgencyID,
_Agency.Name as AgencyName,
@Search.defaultSearchElement: true
@ObjectModel.text.element: ['CustomerName'] //case-sensitive
@Consumption.valueHelpDefinition: [{ entity : {name: '/DMO/I_Customer_StdVH', element: 'CustomerID' },
useForValidation: true }]
CustomerID,
_Customer.LastName as CustomerName,
BeginDate,
EndDate,
BookingFee,
TotalPrice,
@Consumption.valueHelpDefinition: [{ entity: {name: 'I_CurrencyStdVH', element: 'Currency' },
useForValidation: true }]
CurrencyCode,
Description,
@ObjectModel.text.element: ['OverallStatusText'] //case-sensitive
@Consumption.valueHelpDefinition: [{ entity: {name: '/DMO/I_Overall_Status_VH', element: 'OverallStatus' },
useForValidation: true }]
OverallStatus,
_OverallStatus._Text.Text as OverallStatusText : localized,
Attachment,
MimeType,
FileName,
LocalLastChangedAt,
// public associations
_Booking : redirected to composition child ZC_RAP100_BOOK_M,
_Agency,
_Customer,
_OverallStatus,
_Currency
}
Grabar (Ctrl+S) y Activar (CTRL+F3).
Seleccionar el Metadata Extensión de Travel.
Ajustar el código de la siguiente manera.
@Metadata.layer: #CUSTOMER
@UI: {
headerInfo: {
typeName: 'Travel',
typeNamePlural: 'Travels',
imageUrl: 'Attachment', //case-sensitive
description: { type: #STANDARD, value: 'TravelID' } //case-sensitive
}
}
annotate view ZC_RAP100_TRAVEL_M with
{
@UI.facet: [ {
id: 'idCollection',
type: #COLLECTION,
label: 'Travel',
position: 10
},
{
id: 'idIdentification',
parentId: 'idCollection',
type: #IDENTIFICATION_REFERENCE,
label: 'General Information',
position: 10
},
{
id: 'idLineitem',
type: #LINEITEM_REFERENCE,
label: 'Booking',
position: 20 ,
targetElement: '_Booking'
} ]
//id: 'idIdentification',
//type: #IDENTIFICATION_REFERENCE,
//label: 'Travel',
//position: 10
//} ]
@UI.lineItem: [
{ position: 10 , importance: #HIGH }
,{ type: #FOR_ACTION, dataAction: 'copyTravel', label: 'Copy Travel' }
,{ type: #FOR_ACTION, dataAction: 'acceptTravel', label: 'Accept Travel' }
,{ type: #FOR_ACTION, dataAction: 'rejectTravel', label: 'Reject Travel' }
]
@UI.identification: [
{ position: 10 , importance: #HIGH }
,{ type: #FOR_ACTION, dataAction: 'deductDiscount', label: 'Deduct Discount' }
,{ type: #FOR_ACTION, dataAction: 'acceptTravel', label: 'Accept Travel' }
,{ type: #FOR_ACTION, dataAction: 'rejectTravel', label: 'Reject Travel' }
]
@UI.selectionField: [ {
position: 10
} ]
TravelID;
@UI: {
lineItem: [ { position: 20, importance: #HIGH } ],
identification: [ { position: 20 } ],
selectionField: [ { position: 20 } ]
}
AgencyID;
@UI: {
lineItem: [ { position: 30, importance: #HIGH } ],
identification: [ { position: 30 } ],
selectionField: [ { position: 30 } ]
}
CustomerID;
@UI: {
lineItem: [ { position: 40, importance: #MEDIUM } ],
identification: [ { position: 40 } ]
}
BeginDate;
@UI: {
lineItem: [ { position: 50, importance: #MEDIUM } ],
identification: [ { position: 50 } ]
}
EndDate;
@UI.identification: [ { position: 60 } ]
BookingFee;
@UI.identification: [ { position: 70 } ]
TotalPrice;
@UI.identification: [ { position: 90 } ]
Description;
@UI.lineItem: [ {
position: 100 ,
importance: #HIGH
} ]
@UI.identification: [ {
position: 100
} ]
@UI.textArrangement: #TEXT_ONLY
OverallStatus;
@UI.identification: [ { position: 110 } ]
Attachment;
@UI.hidden: true
MimeType;
@UI.hidden: true
FileName;
@UI.hidden: true
LocalLastChangedAt;
}
Grabar (Ctrl+S) y Activar (CTRL+F3).
4.- Ajustar la definición de behaviors de Travel
Seleccionar el Behavior de la Definición de Datos de Travel.
Ajustar el código de la siguiente manera.
managed implementation in class ZBP_R_RAP100_TRAVEL_M unique;
strict ( 2 );
with draft;
define behavior for ZR_RAP100_TRAVEL_M alias Travel
persistent table zrap100_travel_m
draft table zrap100_dtravel
etag master LocalLastChangedAt
lock master total etag LastChangedAt
authorization master ( global )
early numbering
{
field ( readonly )
TravelID;
field ( readonly )
CreatedAt,
CreatedBy,
LastChangedAt,
LocalLastChangedAt,
LocalLastChangedBy;
field ( mandatory )
CustomerID,
BeginDate,
EndDate;
create;
update;
delete;
determination setStatusToOpen on modify { create; }
validation validateCustomer on save { create; field CustomerID; }
validation validateDates on save { create; field BeginDate, EndDate; }
action deductDiscount parameter /dmo/a_travel_discount result [1] $self;
factory action copyTravel [1];
action acceptTravel result [1] $self;
action rejectTravel result [1] $self;
draft action Edit;
draft action Activate optimized;
draft action Discard;
draft action Resume;
draft determine action Prepare
{
validation validateCustomer;
validation validateDates; }
mapping for zrap100_travel_m
{
TravelID = travel_id;
AgencyID = agency_id;
CustomerID = customer_id;
BeginDate = begin_date;
EndDate = end_date;
BookingFee = booking_fee;
TotalPrice = total_price;
CurrencyCode = currency_code;
Description = description;
OverallStatus = overall_status;
Attachment = attachment;
MimeType = mime_type;
FileName = file_name;
CreatedBy = created_by;
CreatedAt = created_at;
LocalLastChangedBy = local_last_changed_by;
LocalLastChangedAt = local_last_changed_at;
LastChangedAt = last_changed_at;
}
association _Booking { create; with draft; }
}
define behavior for ZR_RAP100_BOOK_M alias Booking
//implementation in class ZBP_R_RAP100_BOOK_M unique
persistent table ZRAP100_BOOK_M
draft table ZRAP100_DBOOK
etag master LocalLastChangedAt
lock dependent by _Travel
authorization dependent by _Travel
{
field ( readonly )
TravelID,
LocalLastChangedAt;
field ( readonly : update )
BookingID;
update;
delete;
mapping for ZRAP100_BOOK_M
{
TravelID = TRAVEL_ID;
BookingID = BOOKING_ID;
BookingDate = BOOKING_DATE;
CustomerID = CUSTOMER_ID;
CarrierID = CARRIER_ID;
ConnectionID = CONNECTION_ID;
FlightDate = FLIGHT_DATE;
BookingStatus = BOOKING_STATUS;
FlightPrice = FLIGHT_PRICE;
CurrencyCode = CURRENCY_CODE;
LocalLastChangedAt = LOCAL_LAST_CHANGED_AT;
}
association _Travel { with draft; }
}
Grabar (Ctrl+S) y Activar (CTRL+F3).
Seleccionar el Behavior de la Projection de Travel.
Ajustar el código de la siguiente manera.
projection;
strict ( 2 );
use draft;
define behavior for ZC_RAP100_TRAVEL_M alias Travel
use etag
{
use create;
use update;
use delete;
use action Edit;
use action Activate;
use action Discard;
use action Resume;
use action Prepare;
use association _Booking { create; with draft; }
use action deductDiscount;
use action copyTravel;
use action acceptTravel;
use action rejectTravel;
}
define behavior for ZC_RAP100_BOOK_M alias Booking
use etag
{
use update;
use delete;
use association _Travel { with draft; }
}
Grabar (Ctrl+S) y Activar (CTRL+F3).
5.- Ajustar los Business Services.
Seleccionar el Service Definitión de la aplicación.
Agregar la nueva entidad Booking a exponer.
@EndUserText.label: 'Service definition for ZC_RAP100_TRAVEL_M'
define service ZUI_RAP100_TRAVEL_M_O4 {
expose ZC_RAP100_TRAVEL_M as Travel;
expose ZC_RAP100_BOOK_M as Booking;
}
Grabar (Ctrl+S) y Activar (CTRL+F3).
Seleccionar el Service Binding de la aplicación.
Presionar Unpublish.
Presionar de nuevo Publish.
6.- Visualizar la aplicación.
Presionar el botón Preview.
Presionar el botón Go.
Seleccionar algún registro existente.
Presionar el botón Create.
Capturar los datos del Booking.
Aquí podemos ver que aún nos faltaría la númeración automática, predeterminar datos con valores iniciales y hacer validaciones. Esto es posible con Determinations, Validations y Actions.
Presionar el botón Apply.
Presionar el botón Save.
El sistema confirmará los cambios con el mensaje Object Saved.
Continua…
Crear Virtual Elements a la aplicación creada.
Add BO-enhancements (Virtual Elements) using RAP Cloud Environment