Skip to content

Latest commit

 

History

History
143 lines (103 loc) · 13.6 KB

README.md

File metadata and controls

143 lines (103 loc) · 13.6 KB

REUSE status

ABAP Flight Reference Scenario for the ABAP RESTful Application Programming Model on ABAP Platform

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.

Prerequisites

Make sure to fulfill the following requirements:

  • You are working on Application Server ABAP 7.56 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.

Set Up Namespace

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:

  1. Go to Transport Organizer Tools (transaction SE03)
  2. Go to Administration and start the program Set System Change Option.
  3. In the table Namespace/Name Range table search for the /DMO/ namespace.
  4. In the column Modifiable change the entry to Modifiable.
  5. Save the settings.

For more information, see Setting the System Change Option.

Download

Use the zabapgit_standalone program to install the ABAP Flight Reference Scenario by executing the following steps:

  1. In your ABAP project, create the package /DMO/FLIGHT as target package for the demo content. Use HOME as software component. Assign it to a new transport request that you only use for the demo content import.
  2. In your ABAP project, run the program zabapgit_standalone.
  3. Choose New Online and enter the following URL of this repository https://github.com/SAP/abap-platform-refscen-flight.git.
  4. In the package field, enter the newly created package /DMO/FLIGHT. In the branch field, select the branch ABAP-platform-2021.
  5. Leave the other fields unchanged and choose Create Online Repo.
  6. Enter your credentials for abapgit. You will see the available artifacts to import into your ABAP system.
  7. Choose Pull and confirm every subpackage on your transport request.
  8. 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.
  9. 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/.
  10. In the following screen, select all inactive objects and confirm the activation.
  11. 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:

NOTE: The demo packages do not include 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.

Configuration

To fill the demo database tables with sample business data:

  1. Expand the package structure in the Project Explorer /DMO/FLIGHT_LEGACY > Source Code Library > Classes.
  2. Select the data generator class /DMO/CL_FLIGHT_DATA_GENERATOR and press F9 (Run as Console Application).

Read-Only Scenario

To create the missing service bindings for the read-only list reporting app (package /DMO/FLIGHT_READONLY):

  1. Right-click the service definition /DMO/FLIGHT_R and choose New Service Binding (see here for additional information).
  2. 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/.
  3. Choose the Publish button in the service binding editor.

Unmanaged Scenario

To create the missing service bindings for the transactional app with implementation type unmanaged (package /DMO/FLIGHT_UNMANAGED):

  1. Right-click the service definition /DMO/TRAVEL_U and choose New Service Binding (see here for additional information).
  2. 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/.
  3. Choose the Publish button in the service binding editor.

Managed Scenario

To create the missing service bindings for the transactional app with implementation type managed (package /DMO/FLIGHT_MANAGED):

  1. Right-click the service definition /DMO/UI_TRAVEL_PROCESSOR_M and choose New Service Binding (see here for additional information).

  2. 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/.

  3. Use ODATA V2 UI binding type.

  4. Choose the Publish button in the service binding editor.

  5. Right-click the service definition /DMO/UI_TRAVEL_APPROVER_M and choose New Service Binding (see here for additional information).

  6. 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/.

  7. Use ODATA V2 UI binding type.

  8. Choose the Publish button in the service binding editor.

Draft Scenario

To create the missing service bindings for the transactional app with draft (package /DMO/FLIGHT_DRAFT):

  1. Right-click the service definition /DMO/UI_TRAVEL_A_D and choose New Service Binding (see here for additional information).

  2. 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/.

  3. Use ODATA V2 UI binding type.

  4. Choose the Publish button in the service binding editor.

  5. Right-click the service definition /DMO/UI_TRAVEL_D_D and choose New Service Binding (see here for additional information).

  6. 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/.

  7. Use ODATA V2 UI binding type.

  8. Choose the Publish button in the service binding editor.

Multi-inline-edit Scenario

To create the missing service bindings for the multi-inline-edit sceanrio (package /DMO/FLIGHT_REUSE_CARRIER):

  1. Right-click the service definition /DMO/UI_Carriers_S and choose New Service Binding (see here for additional information).
  2. 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/.
  3. Choose the Publish button in the service binding editor.

Augmentation Scenario

To create the missing service bindings for the augmentation sceanrio (package /DMO/FLIGHT_REUSE_SUPPLEMENT):

  1. Right-click the service definition /DMO/UI_Supplement and choose New Service Binding (see here for additional information).
  2. 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/.
  3. 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.

How to obtain support

This project is provided "as-is": there is no guarantee that raised issues will be answered or addressed in future releases.

License

Copyright (c) 2018-2021 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.