The ABAP RESTful Application Programming Model (RAP) defines the architecture for efficient end-to-end development of intrinsically SAP HANA-optimized Fiori apps. It supports the development of all types of Fiori applications as well as Web APIs. It is based on technologies and frameworks such as Core Data Services (CDS) for defining semantically rich data models and a service model infrastructure for creating OData services with bindings to an OData protocol and ABAP-based application services for custom logic and SAPUI5-based user interfaces.
The ABAP Flight Reference Scenario provides sample data and services as well as legacy business logic to get familiar with RAP. You can check out the end-to-end scenarios or build your own app based on the sample data.
For more information, see Downloading the ABAP Flight Reference Scenario (SAP BTP / SAP S/4HANA Cloud).
Note:
The branches of this repository were renamed recently. If you have already linked an ABAP Package to a branch with an outdated name, unlink the repository first and then pull the link to the branch with the new name, as described in step 3 of the Download section.
Make sure to fulfill the following requirements:
- You have access to an ABAP Environment instance on SAP BTP or S/4HANA Cloud, public edition (see SAP BTP-ABAP Environment or SAP S/4HANA Cloud-Developer Extensibility).
- You have downloaded and installed ABAP Development Tools (ADT). Make sure to use the most recent version as indicated on the installation page.
- You have created an ABAP Cloud Project in ADT that allows you to access your ABAP Environment instance (see Creating an ABAP Cloud Project (SAP BTP / SAP S/4HANA Cloud)). Your log-on language is English.
- You have installed the abapGit plug-in for ADT from the update site
http://eclipse.abapgit.org/updatesite/
.
Use the abapGit plug-in to import the ABAP Flight Reference Scenario by executing the following steps:
- In your ABAP cloud project, create the ABAP package
/DMO/FLIGHT
(using the superpackage/DMO/SAP
) as the target package for the demo content to be downloaded (leave the suggested values unchanged when following the steps in the package creation wizard). - To add the abapGit Repositories view to the ABAP perspective, click
Window
>Show View
>Other...
from the menu bar and chooseabapGit Repositories
. - In the abapGit Repositories view, click the
+
icon to clone an abapGit repository. - Enter the following URL of this repository:
https://github.com/SAP-samples/abap-platform-refscen-flight.git
and choose Next. - Select the branch ABAP-platform-cloud and enter the newly created package
/DMO/FLIGHT
as the target package and choose Next. - Create a new transport request that you only use for this demo content installation (recommendation) and choose Finish to link the Git repository to your ABAP cloud project. The repository appears in the abapGit Repositories View with status Linked.
- Right-click on the new ABAP repository and choose
pull
to start the cloning of the repository contents. Note that this procedure may take a few minutes. - Once the cloning has finished, the status is set to
Pulled Successfully
. (Refresh theabapGit Repositories
view to see the progress of the import). Refresh the project tree. In case the status is set to ‘Pulled with errors’ and the authorization object /DMO/CNTRY reports the error ‘No authorization to change authorization field &/DMO/CNTRY&’, please raise a ticket on component BC-SEC-AUT-PFC.
As a result of the installation procedure above, the ABAP system creates an inactive version of all artifacts from the demo content and adds the following sub packages to the target package:
/DMO/FLIGHT_LEGACY
/DMO/FLIGHT_REUSE
The reuse package contains a package for the supplement business object/DMO/FLIGHT_REUSE_SUPPLEMENT
, which is reused in the other development scenarios. The reuse package also contains the package/DMO/FLIGHT_REUSE_CARRIER
, which contains a mulit-inline-edit scenario for maintaining carrier data (see Developing Transactional Apps with Multi-Inline-Edit Capabilities (SAP BTP / SAP S/4HANA Cloud)). Lastly, the reuse package contains the package/DMO/FLIGHT_REUSE_AGENCY
which incorporates a business object for administering agency master data, including the possibility of maintaining Large Objects. The business object is extensibility-enabled as described in the RAP extensibility guide (see Extend (SAP BTP / SAP S/4HANA Cloud)). This extensibility guide also contains examples on how to develop extensions for the business object. These code examples are contained in sub packages of the/DMO/FLIGHT_REUSE_AGENCY
package./DMO/FLIGHT_READONLY
- represents a read-only list reporting app (see Developing Read-Only List Reporting Apps (SAP BTP / SAP S/4HANA Cloud))./DMO/FLIGHT_MANAGED
- represents the transactional app with implementation type managed (see Developing Managed Transactional Apps (SAP BTP / SAP S/4HANA Cloud))./DMO/FLIGHT_UNMANAGED
- represents the transactional app with implementation type unmanaged (see Developing Unmanaged Transactional Apps (SAP BTP / SAP S/4HANA Cloud))./DMO/FLIGHT_DRAFT
- represents the transactional app with draft (see Developing Transactional Apps with Draft Capabilities (SAP BTP / SAP S/4HANA Cloud))./DMO/FLIGHT_HIERARCHY
- represents a readonly app showcasing hierarchies (see Implementing Hierarchies).
NOTE: The service bindings of the develop scenarios are imported with the warning: To enable activation of local service endpoint, generate service artifacts
.
To activate all development objects from the /DMO/FLIGHT
package:
- Click the mass-activation icon (Activate Inactive ABAP Development Objects) in the toolbar.
- In the dialog that appears, select all development objects in the transport request (that you created for the demo content installation) and choose
Activate
. (The activation may take a few minutes.) - Service definitions need a provider contract before they can be released for the release contract Extend (C0). The service definition /DMO/UI_AGENCY from the package /DMO/FLIGHT_REUSE_AGENCY is shipped without this release contract for maintenance reasons and does not contain a provider contract. If you want to release the service definition /DMO/UI_AGENCY for the release contract Extend (C0), you need to define a suitable provider contract first. You can also directly copy the source code from service_definition_agency. Activate the service definition after.
In case the mass-activation or the Service Bindings report the error ‘Failed to read the runtime table SRVD_RT_EXTENDS for service …’ and/or the error ‘An active version of the Service Definition … does not exist’, the respective Service Definition has not been imported properly. In this case, please proceed as follows:
- Delete the Service Bindings that are based on this Service Definition.
- Reactivate the Service Definition (make sure to edit / touch it before).
- Recreate the Service Bindings deleted in step 1.
To generate service artifacts for the service bindings:
- In each service binding, choose the button
Publish
or choosePublish local service endpoint
in the top right corner of the editor.
To fill the demo database tables for develop scenarios with sample business data:
- Expand the package structure in the Project Explorer
/DMO/FLIGHT_LEGACY
>Source Code Library
>Classes
. - Select the data generator class
/DMO/CL_FLIGHT_DATA_GENERATOR
and pressF9
(Run as Console Application).
NOTE: The namespace /DMO/ is reserved for the demo content. Apart from the downloaded demo content, do not use the namespace /DMO/ and do not create any development objects in the downloaded packages. You can access the development objects in /DMO/ from your own namespace.
This project is provided "as-is": there is no guarantee that raised issues will be answered or addressed in future releases.
Copyright (c) 2018-2023 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the SAP Sample Code License except as noted otherwise in the LICENSE file.