The ABAP RESTful Application Programming Model (RAP) defines the architecture for efficient end-to-end development of intrinsically SAP HANA-optimized Fiori apps on the Application Server ABAP. 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.
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 are working on Application Server ABAP 7.55 or higher.
- 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 Project in ADT that allows you to access your Application Server as mentioned above. Your log-on language is English.
- You have downloaded and installed the
zabapgit_standalone
report. Make sure to use the most recent version as indicated on the installation page. - You have installed the certificate files for github.com, see abapGit Documentation.
SAP uses a reserved namespace for the demo objects.
To enable the namespace in your customer system, follow the steps described in Setting Up a Namespace for Development. For step 8, enter the following values:
- Namespace:
/DMO/
- Namespace Role :
C
- Repair license:
32869948212895959389
- Short Text: Enter a suitable description for the namespace , for example
SAP Demo Scenarios
. - Owner:
SAP
Choose save
and write the changes to a transport.
To be able to import /DMO/ objects into your system, set the system change option. Proceed as follows:
- Go to Transport Organizer Tools (transaction
SE03
) - Go to Administration and start the program
Set System Change Option
. - In the table Namespace/Name Range table search for the /DMO/ namespace.
- In the column Modifiable change the entry to
Modifiable
. - Save the settings.
For more information, see Setting the System Change Option.
Use the zabapgit_standalone program to install the ABAP Flight Reference Scenario by executing the following steps:
- In your ABAP project, create the package
/DMO/FLIGHT
as target package for the demo content. UseHOME
as software component. Assign it to a new transport request that you only use for the demo content import. - In your ABAP project, run the program
zabapgit_standalone
. - Choose
New Online
and enter the following URL of this repositoryhttps://github.com/SAP/abap-platform-refscen-flight.git
. - In the package field, enter the newly created package
/DMO/FLIGHT
. In the branch field, select the branchABAP-platform-2020
. - Leave the other fields unchanged and choose
Create Online Repo
. - Enter your credentials for abapgit. You will see the available artifacts to import into your ABAP system.
- Choose
Pull
and confirm every subpackage on your transport request. - Select the package
/DMO/FLIGHT
to be overwritten with the demo content. In some cases, the shown ZABAPGIT dialogue offers you to delete the /DMO/ namespace locally. Do not delete the /DMO/ namespace locally because the pull operation will fail if no suiting namespace exists in your package. - You will get an information screen telling you to only make repairs when they are urgent, which you can confirm. You can also confirm the dialogue telling you that objects can only be created in the package of the namespace /DMO/.
- In the following screen, select all inactive objects and confirm the activation.
- Once the cloning has finished, refresh your project tree.
As a result of the installation procedure above, the ABAP system creates all development objects of the demo content and adds the following sub packages to the target package:
/DMO/FLIGHT_LEGACY
/DMO/FLIGHT_REUSE
/DMO/FLIGHT_READONLY
- represents a read-only list reporting app (see Developing Read-Only List Reporting Apps)./DMO/FLIGHT_MANAGED
- represents the transactional app with implementation type managed (see Developing Managed Transactional Apps)./DMO/FLIGHT_UNMANAGED
- represents the transactional app with implementation type unmanaged (see Developing Unmanaged Transactional Apps)./DMO/FLIGHT_DRAFT
- represents the transactional app with draft (see Developing Transactional Apps with Draft Capabilities).
NOTE: The demo packages do not include service definitions or service bindings. They must be created to complete the services (see configuration section). Then you can run, for example, the UI services with the Fiori Elements preview in the service binding.
NOTE: If you pull the repository again after a successfull import, make sure that you do not delete the local objects G4BA
, SUSH
and NSPC
.
To fill the demo database tables 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).
To create the missing development objects (service definition and service binding) for the read-only list reporting app (package /DMO/FLIGHT_READONLY
):
- Right-click the CDS entity
/DMO/I_CONNECTION_R
and chooseNew Service Definition
(see here for additional information). Use the name/DMO/FLIGHT_R
. - Include the CDS views that are relevant for the read-only scenario to be exposed in the service definition (see here for additional information). You can also directly copy the source code from Service Definition Read-Only /DMO/FLIGHT_R
- Activate the service definition.
- Right-click the newly created service definition
/DMO/FLIGHT_R
and chooseNew Service Binding
(see here for additional information). - Specify your own package and your own namespace when following the steps in the creation wizard. A service binding cannot be created in the namespace /DMO/.
- Choose the
Publish
button in the service binding editor.
To create the missing development objects (service definition and service binding ) for the transactional app with implementation type unmanaged (package /DMO/FLIGHT_UNMANAGED
):
- Right-click the CDS root entity
/DMO/I_TRAVEL_U
and chooseNew Service Definition
(see here for additional information). Use the name/DMO/TRAVEL_U
. - Include the CDS views that are relevant for the unmanaged scenario to be exposed in the service definition. You can also directly copy the source code from Service Definition Unmanaged /DMO/TRAVEL_U.
- Activate the service definition.
- Right-click the service definition
/DMO/TRAVEL_U
and chooseNew Service Binding
(see here for additional information). - Specify your own package and your own namespace when following the steps in the creation wizard. A service binding cannot be created in the namespace /DMO/.
- Choose the
Publish
button in the service binding editor.
To create the missing development objects (service definition and service binding ) for the transactional app with implementation type managed (package /DMO/FLIGHT_MANAGED
):
-
Right-click the CDS root projection entity
/DMO/C_TRAVEL_PROCESSOR_M
and chooseNew Service Definition
(see here for additional information). Use the name/DMO/UI_TRAVEL_PROCESSOR_M
. -
Include the CDS views that are relevant for the processor projection of the managed scenario to be exposed in the service definition. You can also directly copy the source code from Service Definition Processor Projection /DMO/UI_TRAVEL_PROCESSOR_M.
-
Activate the service definition.
-
Right-click the CDS root projection entity
/DMO/C_TRAVEL_APPROVER_M
and chooseNew Service Definition
(see here for additional information). Use the name/DMO/UI_TRAVEL_APPROVER_M
. -
Include the CDS views that are relevant for the approver projection of the managed scenario to be exposed in the service definition. You can also directly copy the source code from Service Definition Approver Projection /DMO/UI_TRAVEL_APPROVER_M.
-
Activate the service definition.
-
Right-click the service definition
/DMO/UI_TRAVEL_PROCESSOR_M
and chooseNew Service Binding
(see here for additional information). -
Specify your own package and your own namespace when following the steps in the creation wizard. A service binding cannot be created in the namespace /DMO/.
-
Use
ODATA V2 UI
binding type. -
Choose the
Publish
button in the service binding editor. -
Right-click the service definition
/DMO/UI_TRAVEL_APPROVER_M
and chooseNew Service Binding
(see here for additional information). -
Specify your own package and your own namespace when following the steps in the creation wizard. A service binding cannot be created in the namespace /DMO/.
-
Use
ODATA V2 UI
binding type. -
Choose the
Publish
button in the service binding editor.
To create the missing development objects (service definition and service binding ) for the transactional app with draft (package /DMO/FLIGHT_DRAFT
):
-
Right-click the CDS root projection entity
/DMO/C_TRAVEL_A_D
and chooseNew Service Definition
(see here for additional information). Use the name/DMO/UI_TRAVEL_A_D
. -
Include the CDS views that are relevant for the non-draft projection of the draft scenario to be exposed in the service definition. You can also directly copy the source code from Service Definition Draft Active Projection /DMO/UI_TRAVEL_A_D.
-
Activate the service definition.
-
Right-click the CDS root projection entity
/DMO/C_TRAVEL_D_D
and chooseNew Service Definition
(see here for additional information). Use the name/DMO/UI_TRAVEL_D_D
. -
Include the CDS views that are relevant for the draft projection of the draft scenario to be exposed in the service definition. You can also directly copy the source code from Service Definition Draft Draft Projection /DMO/UI_TRAVEL_D_D.
-
Activate the service definition.
-
Right-click the service definition
/DMO/UI_TRAVEL_A_D
and chooseNew Service Binding
(see here for additional information). -
Specify your own package and your own namespace when following the steps in the creation wizard. A service binding cannot be created in the namespace /DMO/.
-
Use
ODATA V2 UI
binding type. -
Choose the
Publish
button in the service binding editor. -
Right-click the service definition
/DMO/UI_TRAVEL_D_D
and chooseNew Service Binding
(see here for additional information). -
Specify your own package and your own namespace when following the steps in the creation wizard. A service binding cannot be created in the namespace /DMO/.
-
Use
ODATA V2 UI
binding type. -
Choose the
Publish
button in the service binding editor.
NOTE: In case the activation via the button in the service bindings is not possible, you can use Gateway tools /IWFND/MAINT_SERVICE
to activate the service, see here.
NOTE: The namespace /DMO/ is reserved for the demo content. Apart from the downloaded demo content and the development objects that need to be created to complete the scenario, 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-2020 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.