├── .abapgit.xml ├── LICENSE ├── LICENSES └── Apache-2.0.txt ├── README.md ├── REUSE.toml ├── exercises ├── ex00 │ └── README.md ├── ex01 │ ├── README.md │ └── images │ │ ├── ex102.png │ │ ├── ex103.png │ │ ├── generatepackage.png │ │ ├── generatepackage2.png │ │ ├── generatepackage2x.png │ │ ├── generatepackage3.png │ │ ├── generatepackage3x.png │ │ ├── generatepackage4.png │ │ ├── package.png │ │ ├── package2.png │ │ ├── package2b.png │ │ ├── package3.png │ │ ├── publish.png │ │ ├── result.png │ │ ├── result2.png │ │ ├── start.png │ │ └── start2.png ├── ex02 │ ├── README.md │ ├── images │ │ ├── ex2.png │ │ ├── ex201a.png │ │ ├── ex202.png │ │ ├── ex203.png │ │ ├── ex204.png │ │ ├── ex205.png │ │ ├── ex206.png │ │ ├── ex207.png │ │ ├── ex208.png │ │ ├── ex209.png │ │ ├── ex210.png │ │ ├── ex2x1.png │ │ ├── ex2x10.png │ │ ├── ex2x11.png │ │ ├── ex2x12.png │ │ ├── ex2x13.png │ │ ├── ex2x14.png │ │ ├── ex2x15.png │ │ ├── ex2x2.png │ │ ├── ex2x3.png │ │ ├── ex2x4.png │ │ ├── ex2x5.png │ │ ├── ex2x6.png │ │ ├── ex2x7.png │ │ ├── ex2x8.png │ │ ├── ex2x9.png │ │ ├── interfacex.png │ │ ├── interfacex2.png │ │ └── test │ └── sources │ │ ├── EX02_DDLS_ZRAP110_C_BOOKINGTP.txt │ │ └── EX02_DDLS_ZRAP110_C_TRAVELTP.txt ├── ex03 │ ├── README.md │ ├── images │ │ ├── ex301.png │ │ ├── ex302.png │ │ ├── ex303.png │ │ ├── ex304.png │ │ ├── ex305.png │ │ ├── ex306.png │ │ ├── ex307.png │ │ ├── ex308.png │ │ ├── ex309.png │ │ ├── ex310.png │ │ ├── ex311.png │ │ ├── ex312.png │ │ ├── ex313.png │ │ ├── ex314.png │ │ ├── ex315.png │ │ ├── ex316.png │ │ ├── ex317.png │ │ ├── ex318.png │ │ ├── ex319.png │ │ ├── ex320.png │ │ ├── ex321.png │ │ ├── ex322.png │ │ ├── ex323.png │ │ ├── ex324.png │ │ ├── ex3x1.png │ │ ├── ex3x2.png │ │ ├── ex3x3.png │ │ ├── ex3x4.png │ │ ├── ex3x5.png │ │ ├── ex3x6.png │ │ ├── ex3x7.png │ │ ├── ex3xx1.png │ │ ├── ex3xx10.png │ │ ├── ex3xx2.png │ │ ├── ex3xx3.png │ │ ├── ex3xx4.png │ │ ├── ex3xx5.png │ │ ├── ex3xx6.png │ │ ├── ex3xx7.png │ │ ├── ex3xx8.png │ │ └── ex3xx9.png │ └── sources │ │ └── EX03_BDEF_ZRAP110_R_TRAVELTP.txt ├── ex04 │ ├── README.md │ ├── images │ │ ├── ex401.png │ │ ├── ex402.png │ │ ├── ex403.png │ │ ├── ex404.png │ │ ├── ex405.png │ │ ├── ex406.png │ │ ├── ex407.png │ │ ├── ex408.png │ │ ├── ex409.png │ │ ├── ex4x02.png │ │ ├── ex4x03.png │ │ ├── ex4x1.png │ │ ├── ex4x2.png │ │ ├── ex4x3.png │ │ ├── ex4x4.png │ │ ├── m1.png │ │ ├── m2.png │ │ ├── m22.png │ │ ├── m3.png │ │ ├── m4.png │ │ ├── y1.png │ │ ├── y2.png │ │ └── y3.png │ └── sources │ │ ├── EX04_DDLX_ZRAP110_C_BookingTP.txt │ │ └── EX04_DDLX_ZRAP110_C_TravelTP.txt ├── ex05 │ ├── README.md │ ├── images │ │ ├── ex501.png │ │ ├── ex502.png │ │ ├── ex504.png │ │ ├── ex505.png │ │ ├── ex510.png │ │ ├── ex510b.png │ │ └── test │ └── sources │ │ ├── EX05_DDLX_ZRAP110_C_BookingTP.txt │ │ └── EX05_DDLX_ZRAP110_C_TravelTP.txt ├── ex06 │ ├── README.md │ ├── images │ │ ├── ex601.png │ │ └── ex602.png │ └── sources │ │ └── EX06_CLASS_ZRAP110_BP_TRAVELTP.txt ├── ex07 │ ├── README.md │ ├── images │ │ ├── ex701.png │ │ ├── ex702.png │ │ └── ex703.png │ └── sources │ │ └── EX07_CLASS_ZRAP110_BP_TRAVELTP.txt ├── ex08 │ ├── README.md │ └── images │ │ └── ex801.png ├── ex09 │ ├── README.md │ └── images │ │ ├── ex901.png │ │ ├── ex902.png │ │ ├── ex903.png │ │ ├── ex904.png │ │ ├── ex904a.png │ │ ├── ex905.png │ │ ├── ex906.png │ │ ├── ex907.png │ │ ├── ex9x1.png │ │ ├── ex9x2.png │ │ ├── ex9x3.png │ │ └── test ├── ex10 │ ├── README.md │ └── images │ │ ├── ex10x1.png │ │ ├── ex10x2.png │ │ ├── ex10x3.png │ │ ├── ex10x4.png │ │ └── ex10x5.png ├── ex11 │ ├── README.md │ ├── images │ │ ├── ex1101.png │ │ ├── ex1102.png │ │ ├── ex1103.png │ │ ├── ex1104.png │ │ ├── ex1105.png │ │ ├── ex1106.png │ │ ├── ex1107.png │ │ ├── ex1108.png │ │ ├── ex1109.png │ │ ├── ex1121.png │ │ ├── ex1122.png │ │ ├── ex1123.png │ │ ├── ex1124.png │ │ ├── ex1125.png │ │ ├── ex1126.png │ │ ├── ex1127.png │ │ ├── ex1128.png │ │ ├── ex1129.png │ │ ├── ex112x.png │ │ ├── ex112x2.png │ │ ├── ex112x3.png │ │ ├── ex112x3b.png │ │ ├── ex112x4.png │ │ ├── ex112x4b.png │ │ ├── ex112x5.png │ │ ├── ex112x6.png │ │ ├── ex1130.png │ │ ├── ex1131.png │ │ ├── ex11x1.png │ │ ├── ex11x10.png │ │ ├── ex11x11.png │ │ ├── ex11x12.png │ │ ├── ex11x13.png │ │ ├── ex11x2.png │ │ ├── ex11x3.png │ │ ├── ex11x4.png │ │ ├── ex11x5.png │ │ ├── ex11x6.png │ │ ├── ex11x7.png │ │ ├── ex11x8.png │ │ ├── ex11x9.png │ │ ├── meshx.png │ │ ├── meshx2.png │ │ └── meshx3.png │ └── sources │ │ └── EX11_CLASS_ZRAP110_TRAVEL_EVENT_HANDLER_LocalTypes.txt ├── ex11b │ └── README.md ├── ex12 │ ├── README.md │ └── images │ │ ├── ex1201.png │ │ └── ex1202.png └── images │ ├── abap_perspective.png │ ├── adt_activate.png │ ├── adt_bdef.png │ ├── adt_class.png │ ├── adt_ddls.png │ ├── adt_ddlx.png │ ├── adt_evtb.png │ ├── adt_open_object.png │ ├── adt_package.png │ ├── adt_save.png │ ├── adt_shortcuts.png │ ├── adt_srvb.png │ ├── adt_srvd.png │ ├── adt_tabl.png │ ├── find01.png │ ├── rap110_datamodel.png │ ├── rap110_travelapp.png │ ├── rap110_travelapp01.png │ ├── rap110_travelapp02.png │ ├── rap_bigpicture.png │ ├── steampunk_systemlogon1.png │ ├── steampunk_systemlogon2.png │ └── ui_gear.png └── src ├── f398756b08995e262f45fb131e52f2ht.sush.xml ├── package.devc.xml ├── zrap110_a_create_travel_sol.ddls.asddls ├── zrap110_a_create_travel_sol.ddls.baseinfo ├── zrap110_a_create_travel_sol.ddls.xml ├── zrap110_a_daystoflight_sol.ddls.asddls ├── zrap110_a_daystoflight_sol.ddls.baseinfo ├── zrap110_a_daystoflight_sol.ddls.xml ├── zrap110_a_travel_sol.ddls.asddls ├── zrap110_a_travel_sol.ddls.baseinfo ├── zrap110_a_travel_sol.ddls.xml ├── zrap110_abooksol.tabl.xml ├── zrap110_atravsol.tabl.xml ├── zrap110_bp_bookingtp_sol.clas.abap ├── zrap110_bp_bookingtp_sol.clas.locals_imp.abap ├── zrap110_bp_bookingtp_sol.clas.xml ├── zrap110_bp_traveltp_sol.clas.abap ├── zrap110_bp_traveltp_sol.clas.locals_imp.abap ├── zrap110_bp_traveltp_sol.clas.xml ├── zrap110_c_bookingtp_sol.ddls.asddls ├── zrap110_c_bookingtp_sol.ddls.baseinfo ├── zrap110_c_bookingtp_sol.ddls.xml ├── zrap110_c_bookingtp_sol.ddlx.asddlxs ├── zrap110_c_bookingtp_sol.ddlx.xml ├── zrap110_c_traveltp_sol.bdef.asbdef ├── zrap110_c_traveltp_sol.bdef.xml ├── zrap110_c_traveltp_sol.ddls.asddls ├── zrap110_c_traveltp_sol.ddls.baseinfo ├── zrap110_c_traveltp_sol.ddls.xml ├── zrap110_c_traveltp_sol.ddlx.asddlxs ├── zrap110_c_traveltp_sol.ddlx.xml ├── zrap110_calc_book_elem_sol.clas.abap ├── zrap110_calc_book_elem_sol.clas.xml ├── zrap110_calc_trav_elem_sol.clas.abap ├── zrap110_calc_trav_elem_sol.clas.xml ├── zrap110_dbooksol.tabl.xml ├── zrap110_dtravsol.tabl.xml ├── zrap110_eml_playground_sol.clas.abap ├── zrap110_eml_playground_sol.clas.xml ├── zrap110_etravsol.tabl.xml ├── zrap110_r_bookingtp_sol.ddls.asddls ├── zrap110_r_bookingtp_sol.ddls.baseinfo ├── zrap110_r_bookingtp_sol.ddls.xml ├── zrap110_r_traveltp_sol.bdef.asbdef ├── zrap110_r_traveltp_sol.bdef.xml ├── zrap110_r_traveltp_sol.ddls.asddls ├── zrap110_r_traveltp_sol.ddls.baseinfo ├── zrap110_r_traveltp_sol.ddls.xml ├── zrap110_travel_event_handl_sol.clas.abap ├── zrap110_travel_event_handl_sol.clas.locals_imp.abap ├── zrap110_travel_event_handl_sol.clas.xml ├── zrap110_ui_travel_o4_sol.srvb.xml ├── zrap110_ui_travel_o4_sol_0001_g4ba.sco2.xml ├── zrap110_ui_travel_o4_sol__00001_ibs.sia6.xml ├── zrap110_ui_travel_o4_sol__00002_ibs.sia6.xml ├── zrap110_ui_travel_sol.srvd.srvdsrv ├── zrap110_ui_travel_sol.srvd.xml └── zrap110sol.nrob.xml /.abapgit.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | E 6 | /src/ 7 | FULL 8 | 9 | /.gitignore 10 | /LICENSE 11 | /README.md 12 | /package.json 13 | /.travis.yml 14 | /.gitlab-ci.yml 15 | /abaplint.json 16 | /azure-pipelines.yml 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /REUSE.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | SPDX-PackageName = "abap-platform-rap110" 3 | SPDX-PackageSupplier = "ospo@sap.com" 4 | SPDX-PackageDownloadLocation = "https://github.com/sap-samples/abap-platform-rap110" 5 | SPDX-PackageComment = "The code in this project may include calls to APIs (\"API Calls\") of\n SAP or third-party products or services developed outside of this project\n (\"External Products\").\n \"APIs\" means application programming interfaces, as well as their respective\n specifications and implementing code that allows software to communicate with\n other software.\n API Calls to External Products are not licensed under the open source license\n that governs this project. The use of such API Calls and related External\n Products are subject to applicable additional agreements with the relevant\n provider of the External Products. In no event shall the open source license\n that governs this project grant any rights in or to any External Products,or\n alter, expand or supersede any terms of the applicable additional agreements.\n If you have a valid license agreement with SAP for the use of a particular SAP\n External Product, then you may make use of any API Calls included in this\n project's code for that SAP External Product, subject to the terms of such\n license agreement. If you do not have a valid license agreement for the use of\n a particular SAP External Product, then you may only make use of any API Calls\n in this project for that SAP External Product for your internal, non-productive\n and non-commercial test and evaluation of such API Calls. Nothing herein grants\n you any rights to use or access any SAP External Product, or provide any third\n parties the right to use of access any SAP External Product, through API Calls." 6 | 7 | [[annotations]] 8 | path = "**" 9 | precedence = "aggregate" 10 | SPDX-FileCopyrightText = "2024 SAP SE or an SAP affiliate company and abap-platform-rap110 contributors" 11 | SPDX-License-Identifier = "Apache-2.0" 12 | -------------------------------------------------------------------------------- /exercises/ex00/README.md: -------------------------------------------------------------------------------- 1 | [Home - RAP110](../../README.md) 2 | 3 | # Exercise 0: Getting Started 4 | 5 | ## Introduction 6 | 7 | 18 | 19 | - [Create an ABAP Cloud Project in ADT](#create-an-abap-cloud-project-in-adt) 20 | - [Helpful Information](#helpful-information) 21 | - Find/Replace 22 | - ABAP Pretty Printer 23 | - Modern ABAP Syntax 24 | - Useful ADT Shortcuts 25 | - [Summary](#summary) 26 | 27 | 38 | 39 | > **Note:** 40 | > The screenshots in this document have been taken using the suffix or assigned suffix **`810`** and the system **`D23`**. 41 | > We **do not recommend** using assigned suffix **`810`** or **`000`**. 42 | > 43 | > Please note that ADT dialogs and views as well as SAP Fiori UIs may change in upcoming releases. 44 | 45 | 55 | 56 | 66 | 67 | ## Create an ABAP Cloud Project in ADT 68 | [^Top of page](#) 69 | 70 | > If not done already, you will first create an **ABAP Cloud Project** in your ADT installation to create a connection to the SAP BTP ABAP environment system. 71 | 72 | 78 | 79 |
80 | 🔵 Click to expand! 81 | 82 | 1. If not done already, open the **ABAP** perspective as shown in the screenshot below. 83 | 84 | ![Open ABAP Perspective](../images/abap_perspective.png) 85 | 86 | 2. If not done already, now create the **ABAP Cloud Project** as shown in the screenshots below. 87 | 88 | For **step 4** in the screenshot below, you will either import or copy and paste the 🔑 **service key** of the SAP BTP ABAP environment system on which you'll be performing the exercises. Then click **_Next_** to continue. 89 | 90 | ![Create ABAP Project Cloud 1/2](../images/steampunk_systemlogon1.png) 91 | 92 | For **step 7** in the screenshot below, use the email and password of your ABAP user to log in to the system. 93 | 94 | You can keep the default **_Project name_** and click **_Finish_** to create the new ABAP Cloud Project in the **_Project Explorer_** view. 95 | 96 | ![Create ABAP Project Cloud 2/2](../images/steampunk_systemlogon2.png) 97 | 98 |
99 | 100 | 101 | ## Helpful Information 102 | [^Top of page](#) 103 | 104 | > This section contains some helpful information for the exercises: _Find/Replace_ functionality, modern ABAP syntax, and useful ADT shortcuts. 105 | 106 |
107 | 🔵 Click to expand! 108 | 109 | ### Find/Replace 110 | 111 | In the course of these exercises you will frequently see the task to "_replace the placeholder **`###`** with your assigned suffix_", where *###* is your assigned suffix. 112 | 113 | For this it's recommended to make use of the **Find/Replace** feature of the Eclipse Editor. It can be opened either via the menu (**_Edit -> Find/Replace..._**) or via **Ctrl+F**. 114 | 115 | ![find and replace](../images/find01.png) 116 | 117 | Choosing **Replace All** allows you to replace all ocurrences of **`###`** with your assigned suffix. 118 | 119 | ### ABAP Pretty Printer (ABAP Formatter) 120 | 121 | For this make use of the shortcut **`Shift + F1`** 122 | 123 | ### Modern ABAP Syntax 124 | 125 | The modern, declarative, and expression-oriented ABAP language syntax will be used in the different exercises. It allows developers to write more simple and concise source code using new language features like inline declarations, constructor expressions. 126 | 127 | > **Find more information in the ABAP Keyword Documentation**: [ABAP - Programming Language](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_reference.htm) 128 | 129 | 130 | ### Useful ADT Shortcuts 131 | 132 | Here are some useful ADT keyboard shortcuts for the ABAP development in Eclipse. 133 | 134 | ![ADT Shortcuts](../images/adt_shortcuts.png) 135 | 136 | More useful ADT shortcuts can be found here: [Link](https://blogs.sap.com/2013/11/21/useful-keyboard-shortcuts-for-abap-in-eclipse/). 137 | 138 | > **Info**: You can display the full list of available shortcuts in the **Show Key Assit** in ADT by pressing **Ctrl+Shift+L**. 139 | 140 |
141 | 142 | 143 | ## Summary 144 | [^Top of page](#) 145 | 146 | You can continue with the next exercise - **[Exercise 1: Inspect your Exercise Package - RAP BO & Business Service](../ex01/README.md)** 147 | 148 | --- 149 | -------------------------------------------------------------------------------- /exercises/ex01/images/ex102.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/ex102.png -------------------------------------------------------------------------------- /exercises/ex01/images/ex103.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/ex103.png -------------------------------------------------------------------------------- /exercises/ex01/images/generatepackage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/generatepackage.png -------------------------------------------------------------------------------- /exercises/ex01/images/generatepackage2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/generatepackage2.png -------------------------------------------------------------------------------- /exercises/ex01/images/generatepackage2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/generatepackage2x.png -------------------------------------------------------------------------------- /exercises/ex01/images/generatepackage3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/generatepackage3.png -------------------------------------------------------------------------------- /exercises/ex01/images/generatepackage3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/generatepackage3x.png -------------------------------------------------------------------------------- /exercises/ex01/images/generatepackage4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/generatepackage4.png -------------------------------------------------------------------------------- /exercises/ex01/images/package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/package.png -------------------------------------------------------------------------------- /exercises/ex01/images/package2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/package2.png -------------------------------------------------------------------------------- /exercises/ex01/images/package2b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/package2b.png -------------------------------------------------------------------------------- /exercises/ex01/images/package3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/package3.png -------------------------------------------------------------------------------- /exercises/ex01/images/publish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/publish.png -------------------------------------------------------------------------------- /exercises/ex01/images/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/result.png -------------------------------------------------------------------------------- /exercises/ex01/images/result2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/result2.png -------------------------------------------------------------------------------- /exercises/ex01/images/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/start.png -------------------------------------------------------------------------------- /exercises/ex01/images/start2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex01/images/start2.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex201a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex201a.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex202.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex202.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex203.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex203.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex204.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex204.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex205.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex205.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex206.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex206.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex207.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex207.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex208.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex208.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex209.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex209.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex210.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex210.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2x1.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2x10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2x10.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2x11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2x11.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2x12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2x12.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2x13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2x13.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2x14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2x14.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2x15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2x15.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2x2.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2x3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2x3.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2x4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2x4.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2x5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2x5.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2x6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2x6.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2x7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2x7.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2x8.png -------------------------------------------------------------------------------- /exercises/ex02/images/ex2x9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/ex2x9.png -------------------------------------------------------------------------------- /exercises/ex02/images/interfacex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/interfacex.png -------------------------------------------------------------------------------- /exercises/ex02/images/interfacex2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex02/images/interfacex2.png -------------------------------------------------------------------------------- /exercises/ex02/images/test: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /exercises/ex02/sources/EX02_DDLS_ZRAP110_C_BOOKINGTP.txt: -------------------------------------------------------------------------------- 1 | @AccessControl.authorizationCheck: #CHECK 2 | @Metadata.allowExtensions: true 3 | @EndUserText.label: 'Projection View forBooking' 4 | @ObjectModel.semanticKey: [ 'BookingID' ] 5 | @Search.searchable: true 6 | define view entity ZRAP110_C_BOOKINGTP_### 7 | as projection on ZRAP110_R_BOOKINGTP_### 8 | { 9 | @Search.defaultSearchElement: true 10 | @Search.fuzzinessThreshold: 0.90 11 | key TravelID, 12 | 13 | @Search.defaultSearchElement: true 14 | @Search.fuzzinessThreshold: 0.90 15 | key BookingID, 16 | 17 | BookingDate, 18 | 19 | @Consumption.valueHelpDefinition: [ { 20 | entity: { 21 | name: '/DMO/I_Customer_StdVH', 22 | element: 'CustomerID' 23 | }, 24 | useForValidation: true 25 | } ] 26 | @ObjectModel.text.element: ['CustomerName'] //annotation added 27 | CustomerID, 28 | _Customer.LastName as CustomerName, //element added 29 | 30 | @Consumption.valueHelpDefinition: [ 31 | { entity: {name: '/DMO/I_Flight_StdVH', element: 'AirlineID'}, 32 | additionalBinding: [ { localElement: 'FlightDate', element: 'FlightDate', usage: #RESULT }, 33 | { localElement: 'ConnectionID', element: 'ConnectionID', usage: #RESULT }, 34 | { localElement: 'FlightPrice', element: 'Price', usage: #RESULT }, 35 | { localElement: 'CurrencyCode', element: 'CurrencyCode', usage: #RESULT } ] } ] 36 | @ObjectModel.text.element: ['CarrierName'] //annotation added 37 | CarrierID, 38 | _Carrier.Name as CarrierName, //element added 39 | 40 | @Consumption.valueHelpDefinition: [ 41 | { entity: { name: '/DMO/I_Flight_StdVH', element: 'ConnectionID'}, 42 | additionalBinding: [ { localElement: 'FlightDate', element: 'FlightDate', usage: #RESULT }, 43 | { localElement: 'CarrierID', element: 'AirlineID', usage: #FILTER_AND_RESULT }, 44 | { localElement: 'FlightPrice', element: 'Price', usage: #RESULT }, 45 | { localElement: 'CurrencyCode', element: 'CurrencyCode', usage: #RESULT } ] } ] 46 | ConnectionID, 47 | 48 | @Consumption.valueHelpDefinition: [ 49 | { entity: { name: '/DMO/I_Flight_StdVH', element: 'FlightDate'}, 50 | additionalBinding: [ { localElement: 'CarrierID', element: 'AirlineID', usage: #FILTER_AND_RESULT }, 51 | { localElement: 'ConnectionID', element: 'ConnectionID', usage: #FILTER_AND_RESULT }, 52 | { localElement: 'FlightPrice', element: 'Price', usage: #RESULT }, 53 | { localElement: 'CurrencyCode', element: 'CurrencyCode', usage: #RESULT } ] } ] 54 | FlightDate, 55 | 56 | @Consumption.valueHelpDefinition: [ 57 | { entity: { name: '/DMO/I_Flight_StdVH', element: 'Price'}, 58 | additionalBinding: [ { localElement: 'FlightDate', element: 'FlightDate', usage: #FILTER_AND_RESULT }, 59 | { localElement: 'CarrierID', element: 'AirlineID', usage: #FILTER_AND_RESULT }, 60 | { localElement: 'ConnectionID', element: 'ConnectionID', usage: #FILTER_AND_RESULT }, 61 | { localElement: 'CurrencyCode', element: 'CurrencyCode', usage: #RESULT } ] } ] 62 | @Semantics.amount.currencyCode: 'CurrencyCode' 63 | FlightPrice, 64 | 65 | @Consumption.valueHelpDefinition: [ { 66 | entity: { 67 | name: 'I_CurrencyStdVH', 68 | element: 'Currency' 69 | }, 70 | useForValidation: true 71 | } ] 72 | CurrencyCode, 73 | 74 | @Consumption.valueHelpDefinition: [ { 75 | entity: { 76 | name: '/DMO/I_Booking_Status_VH', 77 | element: 'BookingStatus' 78 | }, 79 | useForValidation: true 80 | } ] 81 | @ObjectModel.text.element: ['BookingStatusText'] //annotation added 82 | BookingStatus, 83 | _BookingStatus._Text.Text as BookingStatusText : localized, //element added 84 | 85 | // @ObjectModel.virtualElementCalculatedBy: 'ABAP:ZRAP110_CALC_BOOK_ELEM_###' 86 | // @EndUserText.label: 'Booking Status Indicator' 87 | // virtual BookingStatusIndicator : abap.int1, 88 | // 89 | // @ObjectModel.virtualElementCalculatedBy: 'ABAP:ZRAP110_CALC_BOOK_ELEM_###' 90 | // @EndUserText.label: 'Initial Days to Flight' 91 | // virtual InitialDaysToFlight : abap.int1, 92 | // 93 | // @ObjectModel.virtualElementCalculatedBy: 'ABAP:ZRAP110_CALC_BOOK_ELEM_###' 94 | // @EndUserText.label: 'Remaining Days to Flight' 95 | // virtual RemainingDaysToFlight : abap.int1, 96 | // 97 | // @ObjectModel.virtualElementCalculatedBy: 'ABAP:ZRAP110_CALC_BOOK_ELEM_###' 98 | // @EndUserText.label: 'Days to Flight Indicator' 99 | // virtual DaysToFlightIndicator : abap.int1, 100 | 101 | LocalLastChangedAt, 102 | 103 | // public associations 104 | _Travel : redirected to parent ZRAP110_C_TRAVELTP_###, 105 | _Customer, 106 | _Carrier, 107 | _Connection, 108 | _Flight, 109 | _BookingStatus, 110 | _Currency 111 | 112 | } 113 | -------------------------------------------------------------------------------- /exercises/ex02/sources/EX02_DDLS_ZRAP110_C_TRAVELTP.txt: -------------------------------------------------------------------------------- 1 | @AccessControl.authorizationCheck: #CHECK 2 | @Metadata.allowExtensions: true 3 | @EndUserText.label: 'Projection View forTravel' 4 | @ObjectModel.semanticKey: [ 'TravelID' ] 5 | @Search.searchable: true 6 | define root view entity ZRAP110_C_TRAVELTP_### 7 | provider contract transactional_query 8 | as projection on ZRAP110_R_TRAVELTP_### 9 | { 10 | @Search.defaultSearchElement: true 11 | @Search.fuzzinessThreshold: 0.90 12 | key TravelID, 13 | 14 | @Consumption.valueHelpDefinition: [ { 15 | entity: { 16 | name: '/DMO/I_Agency_StdVH', 17 | element: 'AgencyID' 18 | } 19 | } ] 20 | @Search.defaultSearchElement: true 21 | @ObjectModel.text.element: ['AgencyName'] //associated text element specified 22 | AgencyID, 23 | _Agency.Name as AgencyName, //element added 24 | 25 | @Consumption.valueHelpDefinition: [ { 26 | entity: { 27 | name: '/DMO/I_Customer_StdVH', 28 | element: 'CustomerID' 29 | } 30 | } ] 31 | @Search.defaultSearchElement: true 32 | @ObjectModel.text.element: ['CustomerName'] //associated text element specified 33 | CustomerID, 34 | _Customer.LastName as CustomerName, //element added 35 | 36 | BeginDate, 37 | EndDate, 38 | @Semantics.amount.currencyCode: 'CurrencyCode' 39 | BookingFee, 40 | @Semantics.amount.currencyCode: 'CurrencyCode' 41 | TotalPrice, 42 | 43 | @Consumption.valueHelpDefinition: [ { 44 | entity: { 45 | name: 'I_CurrencyStdVH', 46 | element: 'Currency' 47 | }, 48 | useForValidation: true 49 | } ] 50 | CurrencyCode, 51 | 52 | Description, 53 | 54 | @Consumption.valueHelpDefinition: [ { 55 | entity: { 56 | name: '/DMO/I_Overall_Status_VH', 57 | element: 'OverallStatus' 58 | }, 59 | useForValidation: true 60 | } ] 61 | @ObjectModel.text.element: ['OverallStatusText'] //associated text element specified 62 | OverallStatus, 63 | _OverallStatus._Text.Text as OverallStatusText : localized, //element added 64 | 65 | // @ObjectModel.virtualElementCalculatedBy: 'ABAP:ZRAP110_CALC_TRAV_ELEM_###' 66 | // @EndUserText.label: 'Overall Status Indicator' 67 | // virtual OverallStatusIndicator : abap.int2, 68 | 69 | Attachment, 70 | MimeType, 71 | FileName, 72 | LocalLastChangedAt, 73 | 74 | ////admin fields removed: LastChangedAt, LocalLastChangedBy, LocalCreatedAt, CreatedBy, 75 | 76 | // public associations 77 | _Booking : redirected to composition child ZRAP110_C_BOOKINGTP_###, 78 | _Agency, 79 | _Customer, 80 | _OverallStatus, 81 | _Currency 82 | 83 | } 84 | -------------------------------------------------------------------------------- /exercises/ex03/images/ex301.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex301.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex302.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex302.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex303.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex303.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex304.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex304.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex305.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex305.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex306.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex306.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex307.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex307.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex308.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex308.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex309.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex309.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex310.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex311.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex311.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex312.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex312.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex313.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex313.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex314.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex314.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex315.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex315.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex316.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex316.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex317.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex317.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex318.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex318.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex319.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex319.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex320.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex320.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex321.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex321.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex322.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex322.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex323.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex323.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex324.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex324.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3x1.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3x2.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3x3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3x3.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3x4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3x4.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3x5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3x5.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3x6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3x6.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3x7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3x7.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3xx1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3xx1.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3xx10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3xx10.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3xx2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3xx2.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3xx3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3xx3.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3xx4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3xx4.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3xx5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3xx5.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3xx6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3xx6.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3xx7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3xx7.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3xx8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3xx8.png -------------------------------------------------------------------------------- /exercises/ex03/images/ex3xx9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex03/images/ex3xx9.png -------------------------------------------------------------------------------- /exercises/ex03/sources/EX03_BDEF_ZRAP110_R_TRAVELTP.txt: -------------------------------------------------------------------------------- 1 | managed implementation in class zrap110_BP_TravelTP_### unique; 2 | strict ( 2 ); 3 | with draft; 4 | define behavior for ZRAP110_R_TRAVELTP_### alias Travel 5 | persistent table ZRAP110_ATRAV### 6 | draft table ZRAP110_DTRAV### 7 | etag master LocalLastChangedAt 8 | lock master total etag LastChangedAt 9 | authorization master( global ) 10 | late numbering 11 | 12 | { 13 | field ( readonly ) 14 | LocalLastChangedAt, 15 | LastChangedAt; 16 | 17 | field ( readonly ) TravelID; 18 | field ( readonly ) TotalPrice; 19 | field ( mandatory ) BeginDate, EndDate; 20 | 21 | create; 22 | update ( features : instance ); 23 | delete ( features : instance ); 24 | 25 | //action(s) 26 | action ( features : instance ) acceptTravel result [1] $self; 27 | action ( features : instance ) rejectTravel result [1] $self; 28 | internal action recalcTotalPrice; 29 | static factory action createTravel parameter ZRAP110_A_Create_Travel_### [1]; 30 | determine action checkDates 31 | { 32 | validation validateDates; 33 | } 34 | 35 | // validation(s) 36 | validation validateCustomer on save { create; field CustomerID; } 37 | validation validateAgency on save { create; field AgencyID; } 38 | validation validateDates on save { create; field BeginDate, EndDate; } 39 | 40 | //determination(s) 41 | determination setInitialTravelValues on modify { create; } 42 | determination calculateTotalPrice on modify { create; field BookingFee, CurrencyCode; } 43 | 44 | draft action ( features : instance ) Edit; 45 | draft action Activate optimized; 46 | draft action Discard; 47 | draft action Resume; 48 | draft determine action Prepare 49 | { 50 | validation validateCustomer; 51 | validation validateAgency; 52 | validation validateDates; 53 | validation Booking~validateBookingStatus; 54 | } 55 | 56 | mapping for ZRAP110_ATRAV### 57 | { 58 | TravelID = TRAVEL_ID; 59 | AgencyID = AGENCY_ID; 60 | CustomerID = CUSTOMER_ID; 61 | BeginDate = BEGIN_DATE; 62 | EndDate = END_DATE; 63 | BookingFee = BOOKING_FEE; 64 | TotalPrice = TOTAL_PRICE; 65 | CurrencyCode = CURRENCY_CODE; 66 | Description = DESCRIPTION; 67 | Attachment = ATTACHMENT; 68 | MimeType = MIME_TYPE; 69 | FileName = FILE_NAME; 70 | OverallStatus = OVERALL_STATUS; 71 | CreatedBy = CREATED_BY; 72 | CreatedAt = CREATED_AT; 73 | LocalLastChangedBy = LOCAL_LAST_CHANGED_BY; 74 | LocalLastChangedAt = LOCAL_LAST_CHANGED_AT; 75 | LastChangedAt = LAST_CHANGED_AT; 76 | } 77 | 78 | // create booking by association 79 | association _Booking { create ( features:instance ); with draft; } 80 | } 81 | 82 | define behavior for ZRAP110_R_BOOKINGTP_### alias Booking 83 | implementation in class zrap110_BP_BookingTP_### unique 84 | persistent table ZRAP110_ABOOK### 85 | draft table ZRAP110_DBOOK### 86 | etag master LocalLastChangedAt 87 | lock dependent by _Travel 88 | authorization dependent by _Travel 89 | late numbering 90 | 91 | { 92 | field ( readonly ) 93 | TravelID, 94 | LocalLastChangedAt; 95 | 96 | //static field control 97 | field ( readonly ) BookingID; 98 | field ( mandatory ) CustomerID, CarrierID, Flightdate, BookingStatus; 99 | 100 | update; 101 | delete; 102 | 103 | //validation(s) 104 | validation validateBookingStatus on save { create; field BookingStatus; } 105 | 106 | //determination(s) 107 | determination setInitialBookingValues on modify { create; } //copy & paste 108 | determination calculateTotalPrice on modify { create; field FlightPrice, CurrencyCode; } //** 109 | 110 | //function(s) 111 | function getDaysToFlight result [1] ZRAP110_A_DaysToFlight_###; 112 | 113 | mapping for ZRAP110_ABOOK### 114 | { 115 | TravelID = TRAVEL_ID; 116 | BookingID = BOOKING_ID; 117 | BookingDate = BOOKING_DATE; 118 | CustomerID = CUSTOMER_ID; 119 | CarrierID = CARRIER_ID; 120 | ConnectionID = CONNECTION_ID; 121 | FlightDate = FLIGHT_DATE; 122 | FlightPrice = FLIGHT_PRICE; 123 | CurrencyCode = CURRENCY_CODE; 124 | BookingStatus = BOOKING_STATUS; 125 | LocalLastChangedAt = LOCAL_LAST_CHANGED_AT; 126 | } 127 | 128 | association _Travel { with draft; } 129 | } 130 | -------------------------------------------------------------------------------- /exercises/ex04/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Exercise 4: Implement the Base BO Behavior - Late Numbering 3 | 4 | ## Introduction 5 | 6 | In the previous exercise (see [Exercise 3](../ex03/README.md)), you've enhanced the BO Behavior Definition and Projection. 7 | 8 | In the present exercise, you will define and implement the base BO behavior for late numbering. 9 | 10 | ### Exercises 11 | 12 | - [4.1 - Implement the Late Numbering](#exercise-41-implement-the-late-numbering) 13 | - [4.2 - Preview and Test the Enhanced Travel App](#exercise-42-preview-and-test-the-enhanced-travel-app) 14 | - [Summary](#summary) 15 | 16 | > **Reminder**: Do not forget to replace the suffix placeholder **`###`** with your choosen or assigned assigned suffix in the exercise steps below. 17 | 18 | ### About Numbering 19 | 20 |
21 | Click to expand! 22 | 23 | > Numbering is about setting values for primary key fields of entity instances during runtime. Different types of numbering are supported in RAP which can be divided into two main categories: 24 | > - **Early numbering**: In an early numbering scenario, the primary key value is set instantly after the modify request for the `CREATE` is executed. The key values can be passed externally by the consumer or can be set internally by the framework or an implementation of the `FOR NUMBERING` method. The latter will be implemented in the present exercise. 25 | > - 📌**Late numbering**: In a late numbering scenario, the key values are always assigned internally without consumer interaction after the point of no return in the interaction phase has passed, and the `SAVE` sequence is triggered. 26 | > 27 | > **Further reading**: [Numbering](https://help.sap.com/docs/btp/sap-abap-restful-application-programming-model/numbering) 28 | 29 |
30 | 31 | ## Exercise 4.1: Implement the Late Numbering 32 | [^Top of page](#) 33 | 34 | > Implement the late numbering for the _travel_ and the _booking_ BO entities in the behavior implementation class ![ABAP class](../images/adt_class.png)**`ZRAP110_BP_TRAVELTP_###`**, aka **behavior pool**. Both, the primary key of the _travel_ and the _booking_ instances will be implemented in the same class: _create_ travel entity instances and _create_ booking instance _by association_. Late numbering was defined in [Exercise 3.2](../ex03#exercise-32-define-the-late-numbering-and-the-static-field-control). 35 | > 36 | > Late numbering is always implemented in the method `adjust_numbers` of the local saver class of the root entity. 37 | > 38 | > PS: A simplified implementation of number ranges is provided in this exercise. 39 | 40 |
41 | 🔵 Click to expand! 42 | 43 | 1. Open the behavior implementation class of the _Travel_ entity ![ABAP class](../images/adt_class.png)**`ZRAP110_BP_TRAVELTP_###`** and navigate to the method **`adjust_numbers`** of the local saver class **`LSC_TRAVEL`** 44 | 45 | 2. Insert the source code provided below in the method implementation as shown on the screenshot. 46 | 47 | Replace all occurences of the placeholder `###` with your assigned suffix using **Ctrl+F**. 48 | 49 | ```ABAP 50 | DATA: travel_id_max TYPE /dmo/travel_id. 51 | 52 | "Root BO entity: Travel 53 | IF mapped-travel IS NOT INITIAL. 54 | TRY. 55 | "get numbers 56 | cl_numberrange_runtime=>number_get( 57 | EXPORTING 58 | nr_range_nr = '01' 59 | object = 'ZRAP110###' "Fallback: '/DMO/TRV_M' 60 | quantity = CONV #( lines( mapped-travel ) ) 61 | IMPORTING 62 | number = DATA(number_range_key) 63 | returncode = DATA(number_range_return_code) 64 | returned_quantity = DATA(number_range_returned_quantity) 65 | ). 66 | CATCH cx_number_ranges INTO DATA(lx_number_ranges). 67 | RAISE SHORTDUMP TYPE cx_number_ranges 68 | EXPORTING 69 | previous = lx_number_ranges. 70 | ENDTRY. 71 | 72 | ASSERT number_range_returned_quantity = lines( mapped-travel ). 73 | travel_id_max = number_range_key - number_range_returned_quantity. 74 | LOOP AT mapped-travel ASSIGNING FIELD-SYMBOL(). 75 | travel_id_max += 1. 76 | -TravelID = travel_id_max. 77 | ENDLOOP. 78 | ENDIF. 79 | "--------------insert the code for the booking entity below --------- 80 | 81 | ``` 82 | 83 | Travel MDE 84 | 85 | 3. Enhance the logic for drawing primary keys for _Booking_ BO entity instances created by association. 86 | 87 | Insert the source code provided below after the `ENDIF` of the previoud code block. 88 | 89 | Replace all occurences of the placeholder `###` with your assigned suffix using **Ctrl+F**. 90 | 91 | ```ABAP 92 | "Child BO entity: Booking 93 | IF mapped-booking IS NOT INITIAL. 94 | READ ENTITIES OF ZRAP110_R_TravelTP_### IN LOCAL MODE 95 | ENTITY Booking BY \_Travel 96 | FROM VALUE #( FOR booking IN mapped-booking WHERE ( %tmp-TravelID IS INITIAL ) 97 | ( %pid = booking-%pid 98 | %key = booking-%tmp ) ) 99 | LINK DATA(booking_to_travel_links). 100 | 101 | LOOP AT mapped-booking ASSIGNING FIELD-SYMBOL(). 102 | -TravelID = 103 | COND #( WHEN -%tmp-TravelID IS INITIAL 104 | THEN mapped-travel[ %pid = booking_to_travel_links[ source-%pid = -%pid ]-target-%pid ]-TravelID 105 | ELSE -%tmp-TravelID ). 106 | ENDLOOP. 107 | 108 | LOOP AT mapped-booking INTO DATA(mapped_booking) GROUP BY mapped_booking-TravelID. 109 | SELECT MAX( booking_id ) FROM zrap110_abook### WHERE travel_id = @mapped_booking-TravelID INTO @DATA(max_booking_id) . 110 | LOOP AT GROUP mapped_booking ASSIGNING . 111 | max_booking_id += 10. 112 | -BookingID = max_booking_id. 113 | ENDLOOP. 114 | ENDLOOP. 115 | ENDIF. 116 | ``` 117 | 118 | Travel MDE 119 | 120 | 4. Save ![save icon](../images/adt_save.png) and activate ![activate icon](../images/adt_activate.png) the changes. 121 | 122 |
123 | 124 | ## Exercise 4.2: Preview and Test the Enhanced Travel App 125 | [^Top of page](#) 126 | 127 | > You can now preview and test the changes by creating a new _travel_ instance with _booking_ instances in the _Travel_ app. 128 | 129 |
130 | 🔵 Click to expand! 131 | 132 | 1. Refresh your application in the browser using **F5** if the browser is still open - 133 | or go to your service binding ![srvb icon](../images/adt_srvb.png)**`ZRAP110_UI_TRAVEL_O4_###`** and start the Fiori elements App preview for the **`Travel`** entity set. 134 | 135 | 2. Create a new _Travel_ instance. 136 | 137 | Travel MDE 138 | 139 | 3. Enter all information and click **Create** under **Booking**. 140 | 141 | Travel MDE 142 | 143 | 4. Now enter all information for booking and click **Apply**. 144 | 145 | Travel MDE 146 | 147 | 5. Click **Create**. 148 | 149 | Travel MDE 150 | 151 | 6. Check your result. 152 | 153 | Travel MDE 154 | 155 |
156 | 157 | ## Summary 158 | [^Top of page](#) 159 | 160 | Now that you've... 161 | - implemented the late numbering for the _travel_ and _booking_ BO entities, 162 | - previewed and test the enhanced Fiori elements app, 163 | 164 | you can continue with the next exercise – **[Exercise 5: Adjust the UI Semantics in the Metadata Extensions](../ex05/README.md)** 165 | 166 | --- 167 | -------------------------------------------------------------------------------- /exercises/ex04/images/ex401.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/ex401.png -------------------------------------------------------------------------------- /exercises/ex04/images/ex402.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/ex402.png -------------------------------------------------------------------------------- /exercises/ex04/images/ex403.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/ex403.png -------------------------------------------------------------------------------- /exercises/ex04/images/ex404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/ex404.png -------------------------------------------------------------------------------- /exercises/ex04/images/ex405.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/ex405.png -------------------------------------------------------------------------------- /exercises/ex04/images/ex406.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/ex406.png -------------------------------------------------------------------------------- /exercises/ex04/images/ex407.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/ex407.png -------------------------------------------------------------------------------- /exercises/ex04/images/ex408.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/ex408.png -------------------------------------------------------------------------------- /exercises/ex04/images/ex409.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/ex409.png -------------------------------------------------------------------------------- /exercises/ex04/images/ex4x02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/ex4x02.png -------------------------------------------------------------------------------- /exercises/ex04/images/ex4x03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/ex4x03.png -------------------------------------------------------------------------------- /exercises/ex04/images/ex4x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/ex4x1.png -------------------------------------------------------------------------------- /exercises/ex04/images/ex4x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/ex4x2.png -------------------------------------------------------------------------------- /exercises/ex04/images/ex4x3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/ex4x3.png -------------------------------------------------------------------------------- /exercises/ex04/images/ex4x4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/ex4x4.png -------------------------------------------------------------------------------- /exercises/ex04/images/m1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/m1.png -------------------------------------------------------------------------------- /exercises/ex04/images/m2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/m2.png -------------------------------------------------------------------------------- /exercises/ex04/images/m22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/m22.png -------------------------------------------------------------------------------- /exercises/ex04/images/m3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/m3.png -------------------------------------------------------------------------------- /exercises/ex04/images/m4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/m4.png -------------------------------------------------------------------------------- /exercises/ex04/images/y1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/y1.png -------------------------------------------------------------------------------- /exercises/ex04/images/y2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/y2.png -------------------------------------------------------------------------------- /exercises/ex04/images/y3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex04/images/y3.png -------------------------------------------------------------------------------- /exercises/ex04/sources/EX04_DDLX_ZRAP110_C_BookingTP.txt: -------------------------------------------------------------------------------- 1 | @Metadata.layer: #CUSTOMER 2 | @UI: { 3 | headerInfo: { 4 | typeName: 'Booking', 5 | typeNamePlural: 'Bookings', 6 | title: { 7 | type: #STANDARD, 8 | label: 'Booking', 9 | value: 'BookingID' 10 | } 11 | }, 12 | presentationVariant: [ { 13 | sortOrder: [ { 14 | by: 'TravelID', 15 | direction: #DESC 16 | } ], 17 | visualizations: [ { 18 | type: #AS_LINEITEM 19 | } ] 20 | } ] 21 | } 22 | annotate view ZRAP110_C_BOOKINGTP_### with 23 | { 24 | @UI.facet: [ { 25 | id: 'idBooking', 26 | purpose: #STANDARD, 27 | type: #IDENTIFICATION_REFERENCE, 28 | label: 'Booking', 29 | position: 10 30 | } ] 31 | @UI.lineItem: [ { 32 | position: 10 , 33 | importance: #HIGH 34 | } ] 35 | @UI.identification: [ { 36 | position: 10 37 | } ] 38 | @UI.selectionField: [ { 39 | position: 10 40 | } ] 41 | TravelID; 42 | 43 | @UI.lineItem: [ { 44 | position: 20 , 45 | importance: #HIGH 46 | } ] 47 | @UI.identification: [ { 48 | position: 20 49 | } ] 50 | BookingID; 51 | 52 | @UI.lineItem: [ { 53 | position: 30 , 54 | importance: #HIGH 55 | } ] 56 | @UI.identification: [ { 57 | position: 30 58 | } ] 59 | BookingDate; 60 | 61 | @UI.lineItem: [ { 62 | position: 40 , 63 | importance: #HIGH 64 | } ] 65 | @UI.identification: [ { 66 | position: 40 67 | } ] 68 | @UI.textArrangement: #TEXT_FIRST 69 | @UI.selectionField: [ { 70 | position: 40 71 | } ] 72 | CustomerID; 73 | 74 | @UI.lineItem: [ { 75 | position: 50 , 76 | importance: #HIGH 77 | } ] 78 | @UI.identification: [ { 79 | position: 50 80 | } ] 81 | CarrierID; 82 | 83 | @UI.lineItem: [ { 84 | position: 60 , 85 | importance: #HIGH 86 | } ] 87 | @UI.identification: [ { 88 | position: 60 89 | } ] 90 | ConnectionID; 91 | 92 | @UI.lineItem: [ { 93 | position: 70 , 94 | importance: #HIGH 95 | } ] 96 | @UI.identification: [ { 97 | position: 70 98 | } ] 99 | FlightDate; 100 | 101 | @UI.lineItem: [ { 102 | position: 80 , 103 | importance: #HIGH 104 | } ] 105 | @UI.identification: [ { 106 | position: 80 107 | } ] 108 | FlightPrice; 109 | 110 | @UI: { lineItem: [ { position: 100, criticality: 'BookingStatusIndicator', importance: #HIGH } ], //Enhanced ( New: Criticality ) 111 | identification: [ { position: 100, criticality: 'BookingStatusIndicator' } ], //Enhanced ( New: Criticality ) 112 | textArrangement: #TEXT_ONLY } 113 | BookingStatus; 114 | 115 | @UI: { 116 | dataPoint: { title: 'Days to Flight Indicator', 117 | criticality: 'DaysToFlightIndicator', 118 | targetValue: #(InitialDaysToFlight), 119 | visualization: #PROGRESS }, 120 | lineItem: [{ type: #AS_DATAPOINT, position: 110, importance: #HIGH}], 121 | identification: [{ type: #AS_DATAPOINT, position: 110 }] } 122 | RemainingDaysToFlight; 123 | 124 | @UI.hidden: true 125 | LocalLastChangedAt; 126 | } 127 | -------------------------------------------------------------------------------- /exercises/ex04/sources/EX04_DDLX_ZRAP110_C_TravelTP.txt: -------------------------------------------------------------------------------- 1 | @Metadata.layer: #CUSTOMER 2 | @UI: { 3 | headerInfo: { 4 | typeName: 'Travel', 5 | typeNamePlural: 'Travels', 6 | title: { 7 | type: #STANDARD, 8 | label: 'Travel', 9 | value: 'TravelID' 10 | } 11 | }, 12 | presentationVariant: [ { 13 | sortOrder: [ { 14 | by: 'TravelID', 15 | direction: #DESC 16 | } ], 17 | visualizations: [ { 18 | type: #AS_LINEITEM 19 | } ] 20 | } ] 21 | } 22 | annotate view ZRAP110_C_TRAVELTP_### with 23 | { 24 | @UI.facet: [ { 25 | id: 'idCollection', 26 | type: #COLLECTION, 27 | label: 'Travel', 28 | position: 10 29 | }, 30 | { 31 | id: 'idIdentification', 32 | parentId: 'idCollection', 33 | type: #IDENTIFICATION_REFERENCE, 34 | label: 'General Information', 35 | position: 10 36 | }, 37 | { 38 | id: 'idLineitem', 39 | type: #LINEITEM_REFERENCE, 40 | label: 'Booking', 41 | position: 20 , 42 | targetElement: '_Booking' 43 | } ] 44 | 45 | @UI.lineItem: [ 46 | { position: 10 , importance: #HIGH } 47 | ,{ type: #FOR_ACTION, dataAction: 'acceptTravel', label: 'Accept Travel' } 48 | ,{ type: #FOR_ACTION, dataAction: 'rejectTravel', label: 'Reject Travel' } 49 | ] 50 | @UI.identification: [ 51 | { position: 10 , importance: #HIGH } 52 | ,{ type: #FOR_ACTION, dataAction: 'acceptTravel', label: 'Accept Travel' } //added line 53 | ,{ type: #FOR_ACTION, dataAction: 'rejectTravel', label: 'Reject Travel' } //added line 54 | ] 55 | @UI.selectionField: [ { 56 | position: 10 57 | } ] 58 | TravelID; 59 | 60 | @UI.lineItem: [ { 61 | position: 20 , 62 | importance: #HIGH 63 | } ] 64 | @UI.identification: [ { 65 | position: 20 66 | } ] 67 | @UI.selectionField: [ { 68 | position: 20 69 | } ] 70 | AgencyID; 71 | 72 | @UI.lineItem: [ { 73 | position: 30 , 74 | importance: #HIGH 75 | } ] 76 | @UI.identification: [ { 77 | position: 30 78 | } ] 79 | @UI.textArrangement: #TEXT_FIRST 80 | @UI.selectionField: [ { 81 | position: 30 82 | } ] 83 | CustomerID; 84 | 85 | @UI.identification: [ { 86 | position: 40 87 | } ] 88 | BeginDate; 89 | 90 | @UI.identification: [ { 91 | position: 50 92 | } ] 93 | EndDate; 94 | 95 | @UI.identification: [ { 96 | position: 60 97 | } ] 98 | BookingFee; 99 | 100 | @UI.identification: [ { 101 | position: 70 102 | } ] 103 | TotalPrice; 104 | 105 | @UI.identification: [ { 106 | position: 90 107 | } ] 108 | Description; 109 | 110 | @UI.lineItem: [ { 111 | position: 100 , 112 | importance: #HIGH 113 | ,criticality: 'OverallStatusIndicator' //added line 114 | } ] 115 | @UI.identification: [ { 116 | position: 100 117 | ,criticality: 'OverallStatusIndicator' //added line 118 | } ] 119 | @UI.textArrangement: #TEXT_ONLY 120 | OverallStatus; 121 | 122 | @UI.identification: [ { 123 | position: 110 , 124 | label: 'Upload a File' 125 | } ] 126 | Attachment; 127 | 128 | @UI.hidden: true 129 | MimeType; 130 | 131 | @UI.hidden: true 132 | FileName; 133 | 134 | @UI.lineItem: [ { 135 | position: 140 , 136 | importance: #HIGH 137 | } ] 138 | @UI.identification: [ { 139 | position: 140 140 | } ] 141 | createdby; 142 | 143 | @UI.lineItem: [ { 144 | position: 150 , 145 | importance: #HIGH 146 | } ] 147 | @UI.identification: [ { 148 | position: 150 149 | } ] 150 | localcreatedat; 151 | 152 | @UI.lineItem: [ { 153 | position: 160 , 154 | importance: #HIGH 155 | } ] 156 | @UI.identification: [ { 157 | position: 160 158 | } ] 159 | locallastchangedby; 160 | 161 | @UI.hidden: true 162 | LocalLastChangedAt; 163 | 164 | @UI.hidden: true 165 | lastchangedat; 166 | } 167 | -------------------------------------------------------------------------------- /exercises/ex05/images/ex501.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex05/images/ex501.png -------------------------------------------------------------------------------- /exercises/ex05/images/ex502.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex05/images/ex502.png -------------------------------------------------------------------------------- /exercises/ex05/images/ex504.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex05/images/ex504.png -------------------------------------------------------------------------------- /exercises/ex05/images/ex505.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex05/images/ex505.png -------------------------------------------------------------------------------- /exercises/ex05/images/ex510.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex05/images/ex510.png -------------------------------------------------------------------------------- /exercises/ex05/images/ex510b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex05/images/ex510b.png -------------------------------------------------------------------------------- /exercises/ex05/images/test: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /exercises/ex05/sources/EX05_DDLX_ZRAP110_C_BookingTP.txt: -------------------------------------------------------------------------------- 1 | @Metadata.layer: #CUSTOMER 2 | @UI: { 3 | headerInfo: { 4 | typeName: 'Booking', 5 | typeNamePlural: 'Bookings', 6 | title: { 7 | type: #STANDARD, 8 | label: 'Booking', 9 | value: 'BookingID' 10 | } 11 | }, 12 | presentationVariant: [ { 13 | sortOrder: [ { 14 | by: 'TravelID', 15 | direction: #DESC 16 | } ], 17 | visualizations: [ { 18 | type: #AS_LINEITEM 19 | } ] 20 | } ] 21 | } 22 | annotate view ZRAP110_C_BOOKINGTP_### with 23 | { 24 | @UI.facet: [ { 25 | id: 'idBooking', 26 | purpose: #STANDARD, 27 | type: #IDENTIFICATION_REFERENCE, 28 | label: 'Booking', 29 | position: 10 30 | } ] 31 | @UI.lineItem: [ { 32 | position: 10 , 33 | importance: #HIGH 34 | } ] 35 | @UI.identification: [ { 36 | position: 10 37 | } ] 38 | @UI.selectionField: [ { 39 | position: 10 40 | } ] 41 | TravelID; 42 | 43 | @UI.lineItem: [ { 44 | position: 20 , 45 | importance: #HIGH 46 | } ] 47 | @UI.identification: [ { 48 | position: 20 49 | } ] 50 | BookingID; 51 | 52 | @UI.lineItem: [ { 53 | position: 30 , 54 | importance: #HIGH 55 | } ] 56 | @UI.identification: [ { 57 | position: 30 58 | } ] 59 | BookingDate; 60 | 61 | @UI.lineItem: [ { 62 | position: 40 , 63 | importance: #HIGH 64 | } ] 65 | @UI.identification: [ { 66 | position: 40 67 | } ] 68 | @UI.textArrangement: #TEXT_FIRST 69 | @UI.selectionField: [ { 70 | position: 40 71 | } ] 72 | CustomerID; 73 | 74 | @UI.lineItem: [ { 75 | position: 50 , 76 | importance: #HIGH 77 | } ] 78 | @UI.identification: [ { 79 | position: 50 80 | } ] 81 | CarrierID; 82 | 83 | @UI.lineItem: [ { 84 | position: 60 , 85 | importance: #HIGH 86 | } ] 87 | @UI.identification: [ { 88 | position: 60 89 | } ] 90 | ConnectionID; 91 | 92 | @UI.lineItem: [ { 93 | position: 70 , 94 | importance: #HIGH 95 | } ] 96 | @UI.identification: [ { 97 | position: 70 98 | } ] 99 | FlightDate; 100 | 101 | @UI.lineItem: [ { 102 | position: 80 , 103 | importance: #HIGH 104 | } ] 105 | @UI.identification: [ { 106 | position: 80 107 | } ] 108 | FlightPrice; 109 | 110 | @UI: { lineItem: [ { position: 100, criticality: 'BookingStatusIndicator', importance: #HIGH } ], //Enhanced ( New: Criticality ) 111 | identification: [ { position: 100, criticality: 'BookingStatusIndicator' } ], //Enhanced ( New: Criticality ) 112 | textArrangement: #TEXT_ONLY } 113 | BookingStatus; 114 | 115 | @UI: { 116 | dataPoint: { title: 'Days to Flight Indicator', 117 | criticality: 'DaysToFlightIndicator', 118 | targetValue: #(InitialDaysToFlight), 119 | visualization: #PROGRESS }, 120 | lineItem: [{ type: #AS_DATAPOINT, position: 110, importance: #HIGH}], 121 | identification: [{ type: #AS_DATAPOINT, position: 110 }] } 122 | RemainingDaysToFlight; 123 | 124 | @UI.hidden: true 125 | LocalLastChangedAt; 126 | } 127 | -------------------------------------------------------------------------------- /exercises/ex05/sources/EX05_DDLX_ZRAP110_C_TravelTP.txt: -------------------------------------------------------------------------------- 1 | @Metadata.layer: #CUSTOMER 2 | @UI: { 3 | headerInfo: { 4 | typeName: 'Travel', 5 | typeNamePlural: 'Travels', 6 | title: { 7 | type: #STANDARD, 8 | label: 'Travel', 9 | value: 'TravelID' 10 | } 11 | }, 12 | presentationVariant: [ { 13 | sortOrder: [ { 14 | by: 'TravelID', 15 | direction: #DESC 16 | } ], 17 | visualizations: [ { 18 | type: #AS_LINEITEM 19 | } ] 20 | } ] 21 | } 22 | annotate view ZRAP110_C_TRAVELTP_### with 23 | { 24 | @UI.facet: [ { 25 | id: 'idCollection', 26 | type: #COLLECTION, 27 | label: 'Travel', 28 | position: 10 29 | }, 30 | { 31 | id: 'idIdentification', 32 | parentId: 'idCollection', 33 | type: #IDENTIFICATION_REFERENCE, 34 | label: 'General Information', 35 | position: 10 36 | }, 37 | { 38 | id: 'idLineitem', 39 | type: #LINEITEM_REFERENCE, 40 | label: 'Booking', 41 | position: 20 , 42 | targetElement: '_Booking' 43 | } ] 44 | 45 | @UI.lineItem: [ 46 | { position: 10 , importance: #HIGH } 47 | ,{ type: #FOR_ACTION, dataAction: 'acceptTravel', label: 'Accept Travel' } //added line 48 | ,{ type: #FOR_ACTION, dataAction: 'rejectTravel', label: 'Reject Travel' } //added line 49 | ] 50 | @UI.identification: [ 51 | { position: 10 , importance: #HIGH } 52 | ,{ type: #FOR_ACTION, dataAction: 'acceptTravel', label: 'Accept Travel' } //added line 53 | ,{ type: #FOR_ACTION, dataAction: 'rejectTravel', label: 'Reject Travel' } //added line 54 | ] 55 | @UI.selectionField: [ { 56 | position: 10 57 | } ] 58 | TravelID; 59 | 60 | @UI.lineItem: [ { 61 | position: 20 , 62 | importance: #HIGH 63 | } ] 64 | @UI.identification: [ { 65 | position: 20 66 | } ] 67 | @UI.selectionField: [ { 68 | position: 20 69 | } ] 70 | AgencyID; 71 | 72 | @UI.lineItem: [ { 73 | position: 30 , 74 | importance: #HIGH 75 | } ] 76 | @UI.identification: [ { 77 | position: 30 78 | } ] 79 | @UI.textArrangement: #TEXT_LAST 80 | @UI.selectionField: [ { 81 | position: 30 82 | } ] 83 | CustomerID; 84 | 85 | @UI.identification: [ { 86 | position: 40 87 | } ] 88 | BeginDate; 89 | 90 | @UI.identification: [ { 91 | position: 50 92 | } ] 93 | EndDate; 94 | 95 | @UI.identification: [ { 96 | position: 60 97 | } ] 98 | BookingFee; 99 | 100 | @UI.identification: [ { 101 | position: 70 102 | } ] 103 | TotalPrice; 104 | 105 | @UI.identification: [ { 106 | position: 90 107 | } ] 108 | Description; 109 | 110 | @UI.lineItem: [ { 111 | position: 100 , 112 | importance: #HIGH 113 | ,criticality: 'OverallStatusIndicator' //added line 114 | } ] 115 | @UI.identification: [ { 116 | position: 100 117 | ,criticality: 'OverallStatusIndicator' //added line 118 | } ] 119 | @UI.textArrangement: #TEXT_ONLY 120 | OverallStatus; 121 | 122 | @UI.identification: [ { 123 | position: 110 , 124 | label: 'Upload a File' 125 | } ] 126 | Attachment; 127 | 128 | @UI.hidden: true 129 | MimeType; 130 | 131 | @UI.hidden: true 132 | FileName; 133 | 134 | @UI.hidden: true 135 | LocalLastChangedAt; 136 | } 137 | -------------------------------------------------------------------------------- /exercises/ex06/images/ex601.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex06/images/ex601.png -------------------------------------------------------------------------------- /exercises/ex06/images/ex602.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex06/images/ex602.png -------------------------------------------------------------------------------- /exercises/ex07/images/ex701.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex07/images/ex701.png -------------------------------------------------------------------------------- /exercises/ex07/images/ex702.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex07/images/ex702.png -------------------------------------------------------------------------------- /exercises/ex07/images/ex703.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex07/images/ex703.png -------------------------------------------------------------------------------- /exercises/ex08/images/ex801.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex08/images/ex801.png -------------------------------------------------------------------------------- /exercises/ex09/images/ex901.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex09/images/ex901.png -------------------------------------------------------------------------------- /exercises/ex09/images/ex902.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex09/images/ex902.png -------------------------------------------------------------------------------- /exercises/ex09/images/ex903.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex09/images/ex903.png -------------------------------------------------------------------------------- /exercises/ex09/images/ex904.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex09/images/ex904.png -------------------------------------------------------------------------------- /exercises/ex09/images/ex904a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex09/images/ex904a.png -------------------------------------------------------------------------------- /exercises/ex09/images/ex905.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex09/images/ex905.png -------------------------------------------------------------------------------- /exercises/ex09/images/ex906.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex09/images/ex906.png -------------------------------------------------------------------------------- /exercises/ex09/images/ex907.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex09/images/ex907.png -------------------------------------------------------------------------------- /exercises/ex09/images/ex9x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex09/images/ex9x1.png -------------------------------------------------------------------------------- /exercises/ex09/images/ex9x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex09/images/ex9x2.png -------------------------------------------------------------------------------- /exercises/ex09/images/ex9x3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex09/images/ex9x3.png -------------------------------------------------------------------------------- /exercises/ex09/images/test: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /exercises/ex10/README.md: -------------------------------------------------------------------------------- 1 | [Home - RAP110](../../README.md) 2 | 3 | # Exercise 10: Implement the Base BO Behavior - Functions 4 | 5 | ## Introduction 6 | 7 | In the previous exercise, you've defined side effects for the _Travel_ BO (see [Exercise 9](../ex09/README.md)). 8 | 9 | In this exercise, you will implement the function **`getDaysToFlight`** that you've defined in [Exercise 3](../ex03/README.md). This function will be used to determine all the day to flight related virtual elements defined in the _booking_ BO projection view (see [Exercise 4](../ex04/README.md)). 10 | 11 | ### Exercises: 12 | - [10.1 - Implement the Functions of the _Booking_ BO Entity](#exercise-101-implement-the-functions-of-the-booking-bo-entity) 13 | - [10.2 - Test Function using EML](#exercise-102-test-function-using-eml) 14 | - [Summary](#summary) 15 | 16 | > **Reminder**: Do not forget to replace the suffix placeholder **`###`** with your choosen or assigned assigned suffix in the exercise steps below. 17 | 18 | ### About Functions 19 |
20 | Click to expand! 21 | 22 | > A function in RAP is a custom read-operation that is part of the business logic. 23 | > 24 | > Functions perform calculations or reads on business objects without causing any side effects. 25 | > Functions don't issue any locks on database tables and you can't modify or persist any data computed in a function implementation. 26 | > 27 | > **Further reading**: [Functions](https://help.sap.com/docs/btp/sap-abap-restful-application-programming-model/functions) 28 | 29 |
30 | 31 | 32 | ## Exercise 10.1: Implement the Functions of the _Booking_ BO Entity 33 | [^Top of page](#) 34 | 35 | > Implement the only one function that was defined in [Exercise 3.6](../ex06/README.md): `getDaysToFlight`. 36 | 37 |
38 | 🔵 Click to expand! 39 | 40 | ### Exercise 10.1.1: Implement the Function `getDaysToFlight` of the _Booking_ BO Entity 41 | 42 | > Implement the the Function `getDaysToFlight` for the _booking_ entity in the behavior implementation class ![ABAP class](../images/adt_class.png)**`ZRAP110_BP_BookingTP_###`**. This function can be used to determine the values of the virtual elements of the _Booking_ BO projection view: **`BookingStatusIndicator`**, **`InitialDaysToFlight`**, **`RemainingDaysToFlight`**, and **`DaysToFlightIndicator`**. 43 | > 44 | > This function can, for example, be used at runtime to calculate the virtual elements via direct EML calls. 45 | > 46 | 47 |
48 | 🟣 Click to expand! 49 | 50 | 1. Open the behavior implementation class of the _Travel_ entity ![ABAP class](../images/adt_class.png)**`ZRAP110_BP_BOOKINGTP_###`** and navigate to the method **`getDaysToFlight`** of the local handler class **`lhc_booking`** 51 | 52 | 2. Implement the function method **`getDaysToFlight`**. 53 | 54 | For that, replace the empty method implementation of **`getDaysToFlight`** with the source code provided below and 55 | replace all occurences of the placeholder `###` with your assigned suffix using **Ctrl+F**. 56 | 57 | ```ABAP 58 | ************************************************************************** 59 | * Instance-bound function for calculating virtual elements via EML calls 60 | ************************************************************************** 61 | METHOD getDaysToFlight. 62 | DATA: 63 | c_booking_entity TYPE ZRAP110_C_BookingTP_###, 64 | bookings_result TYPE TABLE FOR FUNCTION RESULT zrap110_r_traveltp_###\\booking~getdaystoflight, 65 | booking_result LIKE LINE OF bookings_result. 66 | 67 | "read relevant data 68 | READ ENTITIES OF ZRAP110_R_TravelTP_### IN LOCAL MODE 69 | ENTITY booking 70 | FIELDS ( TravelID BookingStatus BookingID FlightDate BookingDate ) 71 | * ALL FIELDS 72 | WITH CORRESPONDING #( keys ) 73 | RESULT DATA(bookings). 74 | 75 | LOOP AT bookings ASSIGNING FIELD-SYMBOL(). 76 | c_booking_entity = CORRESPONDING #( ). 77 | "set relevant transfered data 78 | booking_result = CORRESPONDING #( ). 79 | "calculate virtual elements 80 | booking_result-%param 81 | = CORRESPONDING #( zrap110_calc_book_elem_###=>calculate_days_to_flight( c_booking_entity ) 82 | MAPPING booking_status_indicator = BookingStatusIndicator 83 | days_to_flight_indicator = DaysToFlightIndicator 84 | initial_days_to_flight = InitialDaysToFlight 85 | remaining_days_to_flight = RemainingDaysToFlight ). 86 | "append 87 | APPEND booking_result TO bookings_result. 88 | ENDLOOP. 89 | 90 | result = bookings_result. 91 | 92 | ENDMETHOD. 93 | ``` 94 | 95 | 4. Save ![save icon](../images/adt_save.png) and activate ![activate icon](../images/adt_activate.png) the changes. 96 | 97 |
98 | 99 |
100 | 101 | ## Exercise 10.2: Test Function using EML 102 | [^Top of page](#) 103 | 104 | > Implement a READ FUNCTION in an ABAP class to test the implemented function. 105 | 106 |
107 | 🔵 Click to expand! 108 | 109 | 1. Open the class **`ZRAP110_EML_PLAYGROUND_###`** and uncomment following coding: 110 | 111 | ```ABAP 112 | "execute function getDaysToFlight 113 | READ ENTITIES OF ZRAP110_R_TravelTP_### 114 | ENTITY Booking 115 | EXECUTE getDaysToFlight 116 | FROM VALUE #( FOR link IN travels_to_bookings ( %tky = link-target-%tky ) ) 117 | RESULT DATA(days_to_flight). 118 | 119 | "output result structure 120 | LOOP AT days_to_flight ASSIGNING FIELD-SYMBOL(). 121 | out->write( | TravelID = { -%tky-TravelID } | ). 122 | out->write( | BookingID = { -%tky-BookingID } | ). 123 | out->write( | RemainingDaysToFlight = { -%param-remaining_days_to_flight } | ). 124 | out->write( | InitialDaysToFlight = { -%param-initial_days_to_flight } | ). 125 | out->write( | --------------- | ). 126 | ENDLOOP. 127 | ``` 128 | 129 | BO Behavior Definition 130 | 131 | 2. Start your **_Travel_** App and copy a **Travel ID** from a former created entry of your choice. 132 | 133 | BO Behavior Definition 134 | 135 | 3. Go back to your class **`ZRAP110_EML_PLAYGROUND_###`** and **paste** your **Travel ID** on the corresponding space. 136 | 137 | BO Behavior Definition 138 | 139 | 4. Save ![save icon](../images/adt_save.png) and activate ![activate icon](../images/adt_activate.png) the changes. 140 | 141 | 5. Right-click your class, select **Run As** > **ABAP Application (Console)** (or press **F9**). 142 | 143 | BO Behavior Definition 144 | 145 | 6. Check your result. 146 | 147 | BO Behavior Definition 148 | 149 |
150 | 151 | 152 | 153 | ## Summary 154 | [^Top of page](#) 155 | 156 | Now that you've... 157 | - implemented a function with a return structure as output parameter, and 158 | - determined the values of virtual elements via an EML call using a function, 159 | 160 | you can continue with the next exercise – **[Exercise 11: Enhance the BO Behavior with Business Events](../ex11/README.md)** 161 | 162 | --- 163 | 164 | -------------------------------------------------------------------------------- /exercises/ex10/images/ex10x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex10/images/ex10x1.png -------------------------------------------------------------------------------- /exercises/ex10/images/ex10x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex10/images/ex10x2.png -------------------------------------------------------------------------------- /exercises/ex10/images/ex10x3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex10/images/ex10x3.png -------------------------------------------------------------------------------- /exercises/ex10/images/ex10x4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex10/images/ex10x4.png -------------------------------------------------------------------------------- /exercises/ex10/images/ex10x5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex10/images/ex10x5.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1101.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1101.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1102.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1102.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1103.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1103.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1104.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1104.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1105.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1105.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1106.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1106.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1107.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1107.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1108.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1108.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1109.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1109.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1121.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1121.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1122.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1122.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1123.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1123.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1124.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1124.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1125.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1126.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1126.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1127.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1127.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1128.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1129.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1129.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex112x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex112x.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex112x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex112x2.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex112x3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex112x3.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex112x3b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex112x3b.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex112x4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex112x4.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex112x4b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex112x4b.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex112x5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex112x5.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex112x6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex112x6.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1130.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1130.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex1131.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex1131.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex11x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex11x1.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex11x10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex11x10.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex11x11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex11x11.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex11x12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex11x12.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex11x13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex11x13.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex11x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex11x2.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex11x3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex11x3.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex11x4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex11x4.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex11x5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex11x5.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex11x6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex11x6.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex11x7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex11x7.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex11x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex11x8.png -------------------------------------------------------------------------------- /exercises/ex11/images/ex11x9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/ex11x9.png -------------------------------------------------------------------------------- /exercises/ex11/images/meshx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/meshx.png -------------------------------------------------------------------------------- /exercises/ex11/images/meshx2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/meshx2.png -------------------------------------------------------------------------------- /exercises/ex11/images/meshx3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex11/images/meshx3.png -------------------------------------------------------------------------------- /exercises/ex11/sources/EX11_CLASS_ZRAP110_TRAVEL_EVENT_HANDLER_LocalTypes.txt: -------------------------------------------------------------------------------- 1 | CLASS lhe_travel DEFINITION INHERITING FROM cl_abap_behavior_event_handler. 2 | PRIVATE SECTION. 3 | METHODS get_uuid RETURNING VALUE(uuid) TYPE sysuuid_x16. 4 | 5 | METHODS on_travel_accepted FOR ENTITY EVENT 6 | accepted FOR travel~travel_accepted. 7 | 8 | METHODS on_travel_rejected FOR ENTITY EVENT 9 | rejected FOR travel~travel_rejected. 10 | ENDCLASS. 11 | 12 | 13 | CLASS lhe_travel IMPLEMENTATION. 14 | 15 | METHOD get_uuid. 16 | TRY. 17 | uuid = cl_system_uuid=>create_uuid_x16_static( ) . 18 | CATCH cx_uuid_error. 19 | ENDTRY. 20 | ENDMETHOD. 21 | 22 | METHOD on_travel_accepted. 23 | "close the active modify phase 24 | cl_abap_tx=>save( ). 25 | "loop over transfered travel instances and do the needful :) 26 | LOOP AT accepted REFERENCE INTO DATA(lr_accepted). 27 | DATA lr_travel_accepted TYPE zrap110_etrav###. 28 | MOVE-CORRESPONDING lr_accepted->* TO lr_travel_accepted. 29 | lr_travel_accepted-uuid = get_uuid( ). 30 | lr_travel_accepted-travel_id = lr_accepted->%key-TravelID. 31 | lr_travel_accepted-event_name = 'travel_accepted'. 32 | lr_travel_accepted-created_at = utclong_current( ). 33 | "insert to db 34 | INSERT zrap110_etrav### FROM @lr_travel_accepted. 35 | ENDLOOP. 36 | 37 | ENDMETHOD. 38 | 39 | METHOD on_travel_rejected. 40 | "close the active modify phase 41 | cl_abap_tx=>save( ). 42 | "loop over transfered travel instances and do the needful :) 43 | LOOP AT rejected REFERENCE INTO DATA(lr_rejected). 44 | DATA lr_travel_rejected TYPE zrap110_etrav###. 45 | lr_travel_rejected-uuid = get_uuid( ). 46 | lr_travel_rejected-travel_id = lr_rejected->%key-TravelID. 47 | lr_travel_rejected-event_name = 'travel_rejected'. 48 | lr_travel_rejected-created_at = utclong_current( ). 49 | "insert to db 50 | INSERT zrap110_etrav### FROM @lr_travel_rejected. 51 | ENDLOOP. 52 | ENDMETHOD. 53 | 54 | ENDCLASS. 55 | -------------------------------------------------------------------------------- /exercises/ex12/README.md: -------------------------------------------------------------------------------- 1 | [Home - RAP110](../../README.md) 2 | 3 | # Exercise 12: Implement the Base BO Behavior - Dynamic Feature Control 4 | 5 | ## Introduction 6 | In the previous exercise, you've defined and raised a business event in the _Travel_ BO entity in your _Travel_ App (see [Exercise 11](../ex11/README.md)). 7 | 8 | In this exercise, you will implement the dynamic instance feature control for some of the standard and non-standard operations of the _Travel_ BO entity as defined in [Exercise 3](../ex03/README.md) . 9 | 10 | ### Exercises: 11 | - [12.1 - Implement the Dynamic Instance Feature Control](#exercise-121-implement-the-dynamic-instance-feature-control-for-the-travel-bo-entity) 12 | - [12.2 - Preview and Test the Enhanced App](#exercise-122-preview-and-test-the-enhanced-travel-app) 13 | - [Summary](#summary) 14 | - [Appendix](#appendix) 15 | 16 | > **Reminder**: Do not forget to replace the suffix placeholder **`###`** with your choosen or assigned assigned suffix in the exercise steps below. 17 | 18 | ### About Dynamic Feature Control 19 | > As an application developer you may want to determine based on certain attributes of your business object entity, which fields should be read-only or mandatory or which functionality like update or actions are allowed. As this property is related to an instance of this business object it is called Dynamic Feature Control. 20 | > 21 | > **Further reading**: [Adding Static and Dynamic Feature Control](https://help.sap.com/docs/btp/sap-abap-restful-application-programming-model/adding-static-and-dynamic-feature-control) 22 | 23 | 24 | ## Exercise 12.1: Implement the Dynamic Instance Feature Control for the _Travel_ BO Entity 25 | [^Top of page](#) 26 | 27 | > Implement the dynamic instance feature control for the standard operations **`update`** and **`delete`**, the draft action **`Edit`**, and the instance actions **`acceptTravel`**, and **`rejectTravel`**. 28 | > 29 | > Folowing behavior is expected on the UI based on the overall status (`OverallStatus`) of a _Travel_ entity instance: 30 | > - If overall status is _open_, all standard and nonstandard operations should be enabled. 31 | > - If overall status is _accepted_, then operations `acceptTravel`, `draft action Edit`, `delete` and `update` should be disabled. 32 | > - If overall status is _rejected_, then operations `rejectTravel`, `draft action Edit`, `delete` and `update` should be disabled. 33 | 34 |
35 | 🔵 Click to expand! 36 | 37 | 1. Implement the following logic in the instance feature control method **`get_instance_features`** in the implementation part of the local handler class of the _Travel_ behavior pool ![ABAP class](../images/adt_class.png)**`ZRAP110_BP_TRAVELTP_###`**. 38 | 39 | The business logic consists of the following steps: 40 | 1. Read the relevant data of the transferred _travel_ instances. 41 | Only the fields **`TravelID`** and **`OverallStatus`** are needed to determine the operation state in the present scenario. 42 | 2. Evaluate the conditions and determine the state of the different operations. 43 | The `COND` operator is used inline in the present scenario for the purpose. 44 | 3. Set the result set appropriately. 45 | 46 | For that, insert the code snippet provided below into the method implementation of the instance feature control method `get_instance_features`. 47 | Replace the placeholder **`###`** with your assigned suffix. 48 | 49 | ```ABAP 50 | ************************************************************************** 51 | * Instance-bound dynamic feature control 52 | ************************************************************************** 53 | METHOD get_instance_features. 54 | " read relevant travel instance data 55 | READ ENTITIES OF ZRAP110_R_TravelTP_### IN LOCAL MODE 56 | ENTITY travel 57 | FIELDS ( TravelID OverallStatus ) 58 | WITH CORRESPONDING #( keys ) 59 | RESULT DATA(travels) 60 | FAILED failed. 61 | 62 | " evaluate the conditions, set the operation state, and set result parameter 63 | result = VALUE #( FOR travel IN travels 64 | ( %tky = travel-%tky 65 | 66 | %features-%update = COND #( WHEN travel-OverallStatus = travel_status-accepted 67 | THEN if_abap_behv=>fc-o-disabled ELSE if_abap_behv=>fc-o-enabled ) 68 | 69 | %features-%delete = COND #( WHEN travel-OverallStatus = travel_status-open 70 | THEN if_abap_behv=>fc-o-enabled ELSE if_abap_behv=>fc-o-disabled ) 71 | 72 | %action-Edit = COND #( WHEN travel-OverallStatus = travel_status-accepted 73 | THEN if_abap_behv=>fc-o-disabled ELSE if_abap_behv=>fc-o-enabled ) 74 | 75 | %action-acceptTravel = COND #( WHEN travel-OverallStatus = travel_status-accepted 76 | THEN if_abap_behv=>fc-o-disabled ELSE if_abap_behv=>fc-o-enabled ) 77 | 78 | %action-rejectTravel = COND #( WHEN travel-OverallStatus = travel_status-rejected 79 | THEN if_abap_behv=>fc-o-disabled ELSE if_abap_behv=>fc-o-enabled ) 80 | ) ). 81 | ENDMETHOD. 82 | ``` 83 | 84 | Your source code should look like this: 85 | 86 | ![Travel Behavior Pool](images/ex1201.png) 87 | 88 | 2. Save ![save icon](../images/adt_save.png) and activate ![activate icon](../images/adt_activate.png) the changes. 89 | 90 | You're through with the implementation. 91 | 92 |
93 | 94 | ## Exercise 12.2: Preview and Test the enhanced _Travel_ App 95 | [^Top of page](#) 96 | 97 | Now the SAP Fiori elements app can be tested. 98 | 99 |
100 | 🔵 Click to expand! 101 | 102 | You can either refresh your application in the browser using **F5** if the browser is still open - or go to your service binding **`ZRAP110_UI_TRAVEL_O4_###`** and start the Fiori elements App preview for the **`Travel`** entity set. 103 | 104 | You can go ahead and test the logic of the dynamic feature control implemented in the backend. 105 | 106 | For example, select a _travel_ instance that has the overall status _**Accepted**_, and check the state of the _**Accepted**_, the _**Edit**_, and the _**Delete**_ buttons. They all shall be disable. 107 | 108 | ![Travel Behavior Pool](images/ex1202.png) 109 | 110 | > Remember the implemented dynamic BO behavior expected on the UI: 111 | > - If a _travel_ instance has the overall status _**Accepted**_ (**`A`**) or _**Rejected**_ (**`X`**), then the button _**Edit**_ and _**Delete**_ must be disabled for the given instance. 112 | > - In addition, following toggle behavior (enable/disable) should be displayed for both instance actions: 113 | > - If the overall status _**Accepted**_ (**`A`**), then the action _**Accept Travel**_ must be disabled. 114 | > - If the overall status _**Rejected**_ (**`X`**), then the action _**Reject Travel**_ must be disabled. 115 | 116 |
117 | 118 | ## Summary 119 | [^Top of page](#) 120 | 121 | Now that you've... 122 | - defined the dynamic instance feature control for standard and non-standard operations in the behavior definition, 123 | - implemented it in the behavior pool, and 124 | - previewed and tested the enhanced Fiori elements _Travel_ app, 125 | 126 | you are done with this hands-on. **Congratulations!** 🎉🎉🎉 127 | 128 | In this hands-on session, you have hopefully have some more insights into new RAP features! 129 | 130 | Thank you for attending this workshop! 131 | 132 | [Go to the RAP110 entry page](../../README.md#sap-teched-2023) 133 | 134 | --- 135 | 136 | ## Appendix 137 | [^Top of page](#) 138 | 139 | > ℹ **Optional Exercise**: [Develop and Run a Fiori Application with SAP Business Application Studio](https://developers.sap.com/tutorials/abap-environment-deploy-cf-production.html) 140 | > 141 | > You can follow the tutorial steps to create and deploy a productive version of your _Travel_ app using the SAP Fiori tools in SAP Business Application Studio. 142 | 143 | 144 | -------------------------------------------------------------------------------- /exercises/ex12/images/ex1201.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex12/images/ex1201.png -------------------------------------------------------------------------------- /exercises/ex12/images/ex1202.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/ex12/images/ex1202.png -------------------------------------------------------------------------------- /exercises/images/abap_perspective.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/abap_perspective.png -------------------------------------------------------------------------------- /exercises/images/adt_activate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/adt_activate.png -------------------------------------------------------------------------------- /exercises/images/adt_bdef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/adt_bdef.png -------------------------------------------------------------------------------- /exercises/images/adt_class.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/adt_class.png -------------------------------------------------------------------------------- /exercises/images/adt_ddls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/adt_ddls.png -------------------------------------------------------------------------------- /exercises/images/adt_ddlx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/adt_ddlx.png -------------------------------------------------------------------------------- /exercises/images/adt_evtb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/adt_evtb.png -------------------------------------------------------------------------------- /exercises/images/adt_open_object.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/adt_open_object.png -------------------------------------------------------------------------------- /exercises/images/adt_package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/adt_package.png -------------------------------------------------------------------------------- /exercises/images/adt_save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/adt_save.png -------------------------------------------------------------------------------- /exercises/images/adt_shortcuts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/adt_shortcuts.png -------------------------------------------------------------------------------- /exercises/images/adt_srvb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/adt_srvb.png -------------------------------------------------------------------------------- /exercises/images/adt_srvd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/adt_srvd.png -------------------------------------------------------------------------------- /exercises/images/adt_tabl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/adt_tabl.png -------------------------------------------------------------------------------- /exercises/images/find01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/find01.png -------------------------------------------------------------------------------- /exercises/images/rap110_datamodel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/rap110_datamodel.png -------------------------------------------------------------------------------- /exercises/images/rap110_travelapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/rap110_travelapp.png -------------------------------------------------------------------------------- /exercises/images/rap110_travelapp01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/rap110_travelapp01.png -------------------------------------------------------------------------------- /exercises/images/rap110_travelapp02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/rap110_travelapp02.png -------------------------------------------------------------------------------- /exercises/images/rap_bigpicture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/rap_bigpicture.png -------------------------------------------------------------------------------- /exercises/images/steampunk_systemlogon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/steampunk_systemlogon1.png -------------------------------------------------------------------------------- /exercises/images/steampunk_systemlogon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/steampunk_systemlogon2.png -------------------------------------------------------------------------------- /exercises/images/ui_gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/abap-platform-rap110/573e269e38e84a6c952f925d270a1a29f0511f9e/exercises/images/ui_gear.png -------------------------------------------------------------------------------- /src/f398756b08995e262f45fb131e52f2ht.sush.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | F398756B08995E262F45FB131E52F2 7 | HT 8 | R3TR G4BA ZRAP110_UI_TRAVEL_O4_SOL 9 | ZRAP110_SOL 10 | 5 11 | 12 | 13 | 14 | F398756B08995E262F45FB131E52F2 15 | HT 16 | S_START 17 | X 18 | 19 | 20 | 21 | 22 | S_START 23 | Start Authorization Check for TADIR Objects 24 | AAAB 25 | X 26 | S_PROFGEN_START_AUTH 27 | BC-SEC-AUT-CHK 28 | Check 29 | Check 30 | No 31 | 3 32 | Okay 33 | @08@ 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | RAP110: Solution Package 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/zrap110_a_create_travel_sol.ddls.asddls: -------------------------------------------------------------------------------- 1 | @EndUserText.label: 'Parameter for Creating Travel+Booking' 2 | define abstract entity ZRAP110_A_CREATE_TRAVEL_SOL 3 | { 4 | @Consumption.valueHelpDefinition: [ { 5 | entity : { 6 | name : '/DMO/I_Customer_StdVH', 7 | element : 'CustomerID' 8 | } 9 | } ] 10 | customer_id : /dmo/customer_id; 11 | @Consumption.valueHelpDefinition: [ { 12 | entity : { 13 | name : '/DMO/I_Flight_StdVH', 14 | element : 'AirlineID' 15 | }, 16 | additionalBinding: [ { 17 | localElement: 'flight_date', 18 | element : 'FlightDate', 19 | usage : #RESULT 20 | }, { 21 | localElement: 'connection_id', 22 | element : 'ConnectionID', 23 | usage : #RESULT 24 | } ] 25 | } ] 26 | carrier_id : /dmo/carrier_id; 27 | @Consumption.valueHelpDefinition: [ { 28 | entity : { 29 | name : '/DMO/I_Flight_StdVH', 30 | element : 'AirlineID' 31 | }, 32 | additionalBinding: [ { 33 | localElement: 'flight_date', 34 | element : 'FlightDate', 35 | usage : #RESULT 36 | }, { 37 | localElement: 'carrier_id', 38 | element : 'AirlineID', 39 | usage : #FILTER_AND_RESULT 40 | } ] 41 | } ] 42 | connection_id : /dmo/connection_id; 43 | @Consumption.valueHelpDefinition: [ { 44 | entity : { 45 | name : '/DMO/I_Flight_StdVH', 46 | element : 'AirlineID' 47 | }, 48 | additionalBinding: [ { 49 | localElement: 'carrier_id', 50 | element : 'AirlineID', 51 | usage : #FILTER_AND_RESULT 52 | }, { 53 | localElement: 'connection_id', 54 | element : 'ConnectionID', 55 | usage : #FILTER_AND_RESULT 56 | } ] 57 | } ] 58 | flight_date : /dmo/flight_date; 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/zrap110_a_create_travel_sol.ddls.baseinfo: -------------------------------------------------------------------------------- 1 | { 2 | "BASEINFO": 3 | { 4 | "FROM": 5 | [], 6 | "ASSOCIATED": 7 | [], 8 | "BASE": 9 | [], 10 | "ANNO_REF": 11 | [], 12 | "SCALAR_FUNCTION": 13 | [], 14 | "VERSION":0, 15 | "ANNOREF_EVALUATION_ERROR":"" 16 | } 17 | } -------------------------------------------------------------------------------- /src/zrap110_a_create_travel_sol.ddls.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_A_CREATE_TRAVEL_SOL 7 | E 8 | Parameter for Creating Travel+Booking 9 | A 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/zrap110_a_daystoflight_sol.ddls.asddls: -------------------------------------------------------------------------------- 1 | @EndUserText.label: 'Abstract entity for Days To Flight' 2 | define abstract entity ZRAP110_A_DAYSTOFLIGHT_SOL 3 | { 4 | initial_days_to_flight : abap.int4; 5 | remaining_days_to_flight : abap.int4; 6 | booking_status_indicator : abap.int4; 7 | days_to_flight_indicator : abap.int4; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/zrap110_a_daystoflight_sol.ddls.baseinfo: -------------------------------------------------------------------------------- 1 | { 2 | "BASEINFO": 3 | { 4 | "FROM": 5 | [], 6 | "ASSOCIATED": 7 | [], 8 | "BASE": 9 | [], 10 | "ANNO_REF": 11 | [], 12 | "SCALAR_FUNCTION": 13 | [], 14 | "VERSION":0, 15 | "ANNOREF_EVALUATION_ERROR":"" 16 | } 17 | } -------------------------------------------------------------------------------- /src/zrap110_a_daystoflight_sol.ddls.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_A_DAYSTOFLIGHT_SOL 7 | E 8 | Abstract entity for Days To Flight 9 | A 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/zrap110_a_travel_sol.ddls.asddls: -------------------------------------------------------------------------------- 1 | @EndUserText.label: 'Parameter for Creating Travel+Booking' 2 | define abstract entity ZRAP110_A_TRAVEL_SOL 3 | { 4 | travel_id : /dmo/travel_id; 5 | agency_id : /dmo/agency_id; 6 | customer_id : /dmo/customer_id; 7 | overall_status : /dmo/overall_status; 8 | description : /dmo/description; 9 | @Semantics.amount.currencyCode: 'currency_code' 10 | total_price : /dmo/total_price; 11 | currency_code : /dmo/currency_code; 12 | begin_date : /dmo/begin_date; 13 | end_date : /dmo/end_date; 14 | email_address : /dmo/email_address; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/zrap110_a_travel_sol.ddls.baseinfo: -------------------------------------------------------------------------------- 1 | { 2 | "BASEINFO": 3 | { 4 | "FROM": 5 | [], 6 | "ASSOCIATED": 7 | [], 8 | "BASE": 9 | [], 10 | "ANNO_REF": 11 | [], 12 | "SCALAR_FUNCTION": 13 | [], 14 | "VERSION":0, 15 | "ANNOREF_EVALUATION_ERROR":"" 16 | } 17 | } -------------------------------------------------------------------------------- /src/zrap110_a_travel_sol.ddls.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_A_TRAVEL_SOL 7 | E 8 | Parameter for Creating Travel+Booking 9 | A 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/zrap110_abooksol.tabl.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_ABOOKSOL 7 | E 8 | TRANSP 9 | X 10 | Table for entity ZRAP110_R_BOOKINGTP_005 11 | E 12 | N 13 | A 14 | 1 15 | 16 | 17 | ZRAP110_ABOOKSOL 18 | A 19 | 0 20 | APPL0 21 | N 22 | 23 | 24 | 25 | MANDT 26 | X 27 | 0 28 | C 29 | 000006 30 | X 31 | CLNT 32 | 000003 33 | CLNT 34 | 35 | 36 | TRAVEL_ID 37 | X 38 | /DMO/TRAVEL_ID 39 | 0 40 | X 41 | E 42 | 43 | 44 | BOOKING_ID 45 | X 46 | /DMO/BOOKING_ID 47 | 0 48 | X 49 | E 50 | 51 | 52 | BOOKING_DATE 53 | /DMO/BOOKING_DATE 54 | 0 55 | T 56 | E 57 | 58 | 59 | CUSTOMER_ID 60 | /DMO/CUSTOMER_ID 61 | 0 62 | E 63 | 64 | 65 | CARRIER_ID 66 | /DMO/CARRIER_ID 67 | 0 68 | E 69 | 70 | 71 | CONNECTION_ID 72 | /DMO/CONNECTION_ID 73 | 0 74 | E 75 | 76 | 77 | FLIGHT_DATE 78 | /DMO/FLIGHT_DATE 79 | 0 80 | T 81 | E 82 | 83 | 84 | BOOKING_STATUS 85 | /DMO/BOOKING_STATUS 86 | 0 87 | X 88 | F 89 | E 90 | 91 | 92 | FLIGHT_PRICE 93 | /DMO/FLIGHT_PRICE 94 | 0 95 | ZRAP110_ABOOKSOL 96 | CURRENCY_CODE 97 | E 98 | 99 | 100 | CURRENCY_CODE 101 | /DMO/CURRENCY_CODE 102 | 0 103 | E 104 | 105 | 106 | LOCAL_LAST_CHANGED_AT 107 | ABP_LOCINST_LASTCHANGE_TSTMPL 108 | 0 109 | E 110 | 111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /src/zrap110_atravsol.tabl.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_ATRAVSOL 7 | E 8 | TRANSP 9 | X 10 | Table for entity ZRAP110_R_TRAVELTP_005 11 | E 12 | N 13 | A 14 | 1 15 | 16 | 17 | ZRAP110_ATRAVSOL 18 | A 19 | 0 20 | APPL0 21 | N 22 | 23 | 24 | 25 | MANDT 26 | X 27 | 0 28 | C 29 | 000006 30 | X 31 | CLNT 32 | 000003 33 | CLNT 34 | 35 | 36 | TRAVEL_ID 37 | X 38 | /DMO/TRAVEL_ID 39 | 0 40 | X 41 | E 42 | 43 | 44 | AGENCY_ID 45 | /DMO/AGENCY_ID 46 | 0 47 | E 48 | 49 | 50 | CUSTOMER_ID 51 | /DMO/CUSTOMER_ID 52 | 0 53 | E 54 | 55 | 56 | BEGIN_DATE 57 | /DMO/BEGIN_DATE 58 | 0 59 | T 60 | E 61 | 62 | 63 | END_DATE 64 | /DMO/END_DATE 65 | 0 66 | T 67 | E 68 | 69 | 70 | BOOKING_FEE 71 | /DMO/BOOKING_FEE 72 | 0 73 | ZRAP110_ATRAVSOL 74 | CURRENCY_CODE 75 | E 76 | 77 | 78 | TOTAL_PRICE 79 | /DMO/TOTAL_PRICE 80 | 0 81 | ZRAP110_ATRAVSOL 82 | CURRENCY_CODE 83 | E 84 | 85 | 86 | CURRENCY_CODE 87 | /DMO/CURRENCY_CODE 88 | 0 89 | E 90 | 91 | 92 | DESCRIPTION 93 | /DMO/DESCRIPTION 94 | 0 95 | E 96 | 97 | 98 | OVERALL_STATUS 99 | /DMO/OVERALL_STATUS 100 | 0 101 | X 102 | F 103 | E 104 | 105 | 106 | ATTACHMENT 107 | /DMO/ATTACHMENT 108 | 0 109 | E 110 | 111 | 112 | MIME_TYPE 113 | /DMO/MIME_TYPE 114 | 0 115 | E 116 | 117 | 118 | FILE_NAME 119 | /DMO/FILENAME 120 | 0 121 | E 122 | 123 | 124 | LAST_CHANGED_AT 125 | ABP_LASTCHANGE_TSTMPL 126 | 0 127 | E 128 | 129 | 130 | CREATED_BY 131 | ABP_CREATION_USER 132 | 0 133 | E 134 | 135 | 136 | CREATED_AT 137 | ABP_CREATION_TSTMPL 138 | 0 139 | E 140 | 141 | 142 | LOCAL_LAST_CHANGED_BY 143 | ABP_LOCINST_LASTCHANGE_USER 144 | 0 145 | E 146 | 147 | 148 | LOCAL_LAST_CHANGED_AT 149 | ABP_LOCINST_LASTCHANGE_TSTMPL 150 | 0 151 | E 152 | 153 | 154 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /src/zrap110_bp_bookingtp_sol.clas.abap: -------------------------------------------------------------------------------- 1 | class ZRAP110_BP_BOOKINGTP_SOL definition 2 | public 3 | abstract 4 | final 5 | for behavior of ZRAP110_R_TRAVELTP_SOL . 6 | 7 | public section. 8 | protected section. 9 | private section. 10 | ENDCLASS. 11 | 12 | 13 | 14 | CLASS ZRAP110_BP_BOOKINGTP_SOL IMPLEMENTATION. 15 | ENDCLASS. 16 | -------------------------------------------------------------------------------- /src/zrap110_bp_bookingtp_sol.clas.locals_imp.abap: -------------------------------------------------------------------------------- 1 | CLASS lhc_booking DEFINITION INHERITING FROM cl_abap_behavior_handler. 2 | 3 | PRIVATE SECTION. 4 | CONSTANTS: 5 | "booking status 6 | BEGIN OF booking_status, 7 | new TYPE c LENGTH 1 VALUE 'N', "New 8 | booked TYPE c LENGTH 1 VALUE 'B', "Booked 9 | canceled TYPE c LENGTH 1 VALUE 'X', "Canceled 10 | END OF booking_status. 11 | 12 | METHODS getDaysToFlight FOR READ 13 | IMPORTING keys FOR FUNCTION Booking~getDaysToFlight RESULT result. 14 | 15 | METHODS calculateTotalPrice FOR DETERMINE ON MODIFY 16 | IMPORTING keys FOR Booking~calculateTotalPrice. 17 | 18 | METHODS setInitialBookingValues FOR DETERMINE ON MODIFY 19 | IMPORTING keys FOR Booking~setInitialBookingValues. 20 | 21 | METHODS validateBookingStatus FOR VALIDATE ON SAVE 22 | IMPORTING keys FOR Booking~validateBookingStatus. 23 | 24 | ENDCLASS. 25 | 26 | CLASS lhc_booking IMPLEMENTATION. 27 | 28 | ************************************************************************** 29 | * Instance-bound function for calculating virtual elements via EML calls 30 | ************************************************************************** 31 | METHOD getDaysToFlight. 32 | DATA: 33 | c_booking_entity TYPE ZRAP110_C_BookingTP_SOL, 34 | bookings_result TYPE TABLE FOR FUNCTION RESULT zrap110_r_traveltp_SOL\\booking~getdaystoflight, 35 | booking_result LIKE LINE OF bookings_result. 36 | 37 | "read relevant data 38 | READ ENTITIES OF ZRAP110_R_TravelTP_SOL IN LOCAL MODE 39 | ENTITY booking 40 | FIELDS ( TravelID BookingStatus BookingID FlightDate BookingDate ) 41 | * ALL FIELDS 42 | WITH CORRESPONDING #( keys ) 43 | RESULT DATA(bookings). 44 | 45 | LOOP AT bookings ASSIGNING FIELD-SYMBOL(). 46 | c_booking_entity = CORRESPONDING #( ). 47 | "set relevant transfered data 48 | booking_result = CORRESPONDING #( ). 49 | "calculate virtual elements 50 | booking_result-%param 51 | = CORRESPONDING #( zrap110_calc_book_elem_SOL=>calculate_days_to_flight( c_booking_entity ) 52 | MAPPING booking_status_indicator = BookingStatusIndicator 53 | days_to_flight_indicator = DaysToFlightIndicator 54 | initial_days_to_flight = InitialDaysToFlight 55 | remaining_days_to_flight = RemainingDaysToFlight ). 56 | "append 57 | APPEND booking_result TO bookings_result. 58 | ENDLOOP. 59 | 60 | result = bookings_result. 61 | 62 | ENDMETHOD. 63 | ************************************************************************** 64 | * Determination calculateTotalPrice 65 | ************************************************************************** 66 | METHOD calculateTotalPrice. 67 | " Read all parent IDs 68 | READ ENTITIES OF ZRAP110_R_TravelTP_SOL IN LOCAL MODE 69 | ENTITY Booking BY \_Travel 70 | FIELDS ( TravelID ) 71 | WITH CORRESPONDING #( keys ) 72 | RESULT DATA(travels). 73 | 74 | " Trigger Re-Calculation on Root Node 75 | MODIFY ENTITIES OF ZRAP110_R_TravelTP_SOL IN LOCAL MODE 76 | ENTITY Travel 77 | EXECUTE reCalcTotalPrice 78 | FROM CORRESPONDING #( travels ). 79 | ENDMETHOD. 80 | 81 | ************************************************************************** 82 | * Determination setInitialBookingValues: 83 | * Set initial values for BookingDate, BookingStatus, and CustomerID 84 | ************************************************************************** 85 | METHOD setInitialBookingValues. 86 | 87 | "Read all travels for the requested bookings 88 | " If multiple bookings of the same travel are requested, the travel is returned only once. 89 | READ ENTITIES OF ZRAP110_R_TravelTP_SOL IN LOCAL MODE 90 | ENTITY Booking BY \_Travel 91 | FIELDS ( CustomerID ) 92 | WITH CORRESPONDING #( keys ) 93 | RESULT DATA(travels) LINK DATA(booking_to_travel). 94 | 95 | "Read all bookings 96 | READ ENTITIES OF ZRAP110_R_TravelTP_SOL IN LOCAL MODE 97 | ENTITY Booking 98 | FIELDS ( TravelID CustomerID BookingDate ) 99 | WITH CORRESPONDING #( keys ) 100 | RESULT DATA(bookings). 101 | 102 | DATA: update TYPE TABLE FOR UPDATE zrap110_r_traveltp_SOL\\Booking. 103 | update = CORRESPONDING #( bookings ). 104 | DELETE update WHERE CustomerID IS NOT INITIAL AND BookingDate IS NOT INITIAL AND BookingStatus IS NOT INITIAL. 105 | 106 | LOOP AT update ASSIGNING FIELD-SYMBOL(). 107 | IF -CustomerID IS INITIAL. 108 | -CustomerID = travels[ KEY id %tky = booking_to_travel[ KEY id source-%tky = -%tky ]-target-%tky ]-CustomerID. 109 | -%control-CustomerID = if_abap_behv=>mk-on. 110 | ENDIF. 111 | 112 | IF -BookingDate IS INITIAL. 113 | -BookingDate = cl_abap_context_info=>get_system_date( ). 114 | -%control-BookingDate = if_abap_behv=>mk-on. 115 | ENDIF. 116 | 117 | IF -BookingStatus IS INITIAL. 118 | -BookingStatus = booking_status-new. 119 | -%control-BookingStatus = if_abap_behv=>mk-on. 120 | ENDIF. 121 | ENDLOOP. 122 | 123 | IF update IS NOT INITIAL. 124 | MODIFY ENTITIES OF ZRAP110_R_TravelTP_SOL IN LOCAL MODE 125 | ENTITY Booking 126 | UPDATE FROM update. 127 | ENDIF. 128 | 129 | ENDMETHOD. 130 | METHOD validateBookingStatus. 131 | READ ENTITIES OF ZRAP110_R_TravelTP_SOL IN LOCAL MODE 132 | ENTITY booking 133 | FIELDS ( BookingStatus ) 134 | WITH CORRESPONDING #( keys ) 135 | RESULT DATA(bookings). 136 | 137 | LOOP AT bookings INTO DATA(booking). 138 | CASE booking-BookingStatus. 139 | WHEN booking_status-new. " New 140 | WHEN booking_status-canceled. " Canceled 141 | WHEN booking_status-booked. " Booked 142 | WHEN OTHERS. 143 | APPEND VALUE #( %tky = booking-%tky ) TO failed-booking. 144 | APPEND VALUE #( %tky = booking-%tky 145 | %msg = NEW /dmo/cm_flight_messages( 146 | textid = /dmo/cm_flight_messages=>status_invalid 147 | status = booking-BookingStatus 148 | severity = if_abap_behv_message=>severity-error ) 149 | %element-BookingStatus = if_abap_behv=>mk-on 150 | %path = VALUE #( travel-TravelId = booking-TravelId ) 151 | ) TO reported-booking. 152 | ENDCASE. 153 | ENDLOOP. 154 | ENDMETHOD. 155 | ENDCLASS. 156 | 157 | *"* use this source file for the definition and implementation of 158 | *"* local helper classes, interface definitions and type 159 | *"* declarations 160 | -------------------------------------------------------------------------------- /src/zrap110_bp_bookingtp_sol.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_BP_BOOKINGTP_SOL 7 | E 8 | Behavior implementation 9 | 06 10 | 1 11 | X 12 | X 13 | X 14 | ZRAP110_R_TRAVELTP_SOL 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/zrap110_bp_traveltp_sol.clas.abap: -------------------------------------------------------------------------------- 1 | class ZRAP110_BP_TRAVELTP_SOL definition 2 | public 3 | abstract 4 | final 5 | for behavior of ZRAP110_R_TRAVELTP_SOL . 6 | 7 | public section. 8 | protected section. 9 | private section. 10 | ENDCLASS. 11 | 12 | 13 | 14 | CLASS ZRAP110_BP_TRAVELTP_SOL IMPLEMENTATION. 15 | ENDCLASS. 16 | -------------------------------------------------------------------------------- /src/zrap110_bp_traveltp_sol.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_BP_TRAVELTP_SOL 7 | E 8 | Behavior implementation 9 | 06 10 | 1 11 | X 12 | X 13 | X 14 | ZRAP110_R_TRAVELTP_SOL 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/zrap110_c_bookingtp_sol.ddls.asddls: -------------------------------------------------------------------------------- 1 | @AccessControl.authorizationCheck: #CHECK 2 | @Metadata.allowExtensions: true 3 | @EndUserText.label: 'Projection View forBooking' 4 | @ObjectModel.semanticKey: [ 'BookingID' ] 5 | @Search.searchable: true 6 | define view entity ZRAP110_C_BOOKINGTP_SOL 7 | as projection on ZRAP110_R_BOOKINGTP_SOL 8 | { 9 | @Search.defaultSearchElement: true 10 | @Search.fuzzinessThreshold: 0.90 11 | key TravelID, 12 | 13 | @Search.defaultSearchElement: true 14 | @Search.fuzzinessThreshold: 0.90 15 | key BookingID, 16 | 17 | BookingDate, 18 | 19 | @Consumption.valueHelpDefinition: [ { 20 | entity: { 21 | name: '/DMO/I_Customer_StdVH', 22 | element: 'CustomerID' 23 | }, 24 | useForValidation: true 25 | } ] 26 | @ObjectModel.text.element: ['CustomerName'] //annotation added 27 | CustomerID, 28 | _Customer.LastName as CustomerName, //element added 29 | 30 | @Consumption.valueHelpDefinition: [ 31 | { entity: {name: '/DMO/I_Flight_StdVH', element: 'AirlineID'}, 32 | additionalBinding: [ { localElement: 'FlightDate', element: 'FlightDate', usage: #RESULT }, 33 | { localElement: 'ConnectionID', element: 'ConnectionID', usage: #RESULT }, 34 | { localElement: 'FlightPrice', element: 'Price', usage: #RESULT }, 35 | { localElement: 'CurrencyCode', element: 'CurrencyCode', usage: #RESULT } ] } ] 36 | @ObjectModel.text.element: ['CarrierName'] //annotation added 37 | CarrierID, 38 | _Carrier.Name as CarrierName, //element added 39 | 40 | @Consumption.valueHelpDefinition: [ 41 | { entity: { name: '/DMO/I_Flight_StdVH', element: 'ConnectionID'}, 42 | additionalBinding: [ { localElement: 'FlightDate', element: 'FlightDate', usage: #RESULT }, 43 | { localElement: 'CarrierID', element: 'AirlineID', usage: #FILTER_AND_RESULT }, 44 | { localElement: 'FlightPrice', element: 'Price', usage: #RESULT }, 45 | { localElement: 'CurrencyCode', element: 'CurrencyCode', usage: #RESULT } ] } ] 46 | ConnectionID, 47 | 48 | @Consumption.valueHelpDefinition: [ 49 | { entity: { name: '/DMO/I_Flight_StdVH', element: 'FlightDate'}, 50 | additionalBinding: [ { localElement: 'CarrierID', element: 'AirlineID', usage: #FILTER_AND_RESULT }, 51 | { localElement: 'ConnectionID', element: 'ConnectionID', usage: #FILTER_AND_RESULT }, 52 | { localElement: 'FlightPrice', element: 'Price', usage: #RESULT }, 53 | { localElement: 'CurrencyCode', element: 'CurrencyCode', usage: #RESULT } ] } ] 54 | FlightDate, 55 | 56 | @Consumption.valueHelpDefinition: [ 57 | { entity: { name: '/DMO/I_Flight_StdVH', element: 'Price'}, 58 | additionalBinding: [ { localElement: 'FlightDate', element: 'FlightDate', usage: #FILTER_AND_RESULT }, 59 | { localElement: 'CarrierID', element: 'AirlineID', usage: #FILTER_AND_RESULT }, 60 | { localElement: 'ConnectionID', element: 'ConnectionID', usage: #FILTER_AND_RESULT }, 61 | { localElement: 'CurrencyCode', element: 'CurrencyCode', usage: #RESULT } ] } ] 62 | @Semantics.amount.currencyCode: 'CurrencyCode' 63 | FlightPrice, 64 | 65 | @Consumption.valueHelpDefinition: [ { 66 | entity: { 67 | name: 'I_CurrencyStdVH', 68 | element: 'Currency' 69 | }, 70 | useForValidation: true 71 | } ] 72 | CurrencyCode, 73 | 74 | @Consumption.valueHelpDefinition: [ { 75 | entity: { 76 | name: '/DMO/I_Booking_Status_VH', 77 | element: 'BookingStatus' 78 | }, 79 | useForValidation: true 80 | } ] 81 | @ObjectModel.text.element: ['BookingStatusText'] //annotation added 82 | BookingStatus, 83 | _BookingStatus._Text.Text as BookingStatusText : localized, //element added 84 | 85 | @ObjectModel.virtualElementCalculatedBy: 'ABAP:ZRAP110_CALC_BOOK_ELEM_SOL' 86 | @EndUserText.label: 'Booking Status Indicator' 87 | virtual BookingStatusIndicator : abap.int1, 88 | 89 | @ObjectModel.virtualElementCalculatedBy: 'ABAP:ZRAP110_CALC_BOOK_ELEM_SOL' 90 | @EndUserText.label: 'Initial Days to Flight' 91 | virtual InitialDaysToFlight : abap.int1, 92 | 93 | @ObjectModel.virtualElementCalculatedBy: 'ABAP:ZRAP110_CALC_BOOK_ELEM_SOL' 94 | @EndUserText.label: 'Remaining Days to Flight' 95 | virtual RemainingDaysToFlight : abap.int1, 96 | 97 | @ObjectModel.virtualElementCalculatedBy: 'ABAP:ZRAP110_CALC_BOOK_ELEM_SOL' 98 | @EndUserText.label: 'Days to Flight Indicator' 99 | virtual DaysToFlightIndicator : abap.int1, 100 | 101 | LocalLastChangedAt, 102 | 103 | // public associations 104 | _Travel : redirected to parent ZRAP110_C_TRAVELTP_SOL, 105 | _Customer, 106 | _Carrier, 107 | _Connection, 108 | _Flight, 109 | _BookingStatus, 110 | _Currency 111 | 112 | } 113 | -------------------------------------------------------------------------------- /src/zrap110_c_bookingtp_sol.ddls.baseinfo: -------------------------------------------------------------------------------- 1 | { 2 | "BASEINFO": 3 | { 4 | "FROM": 5 | [ 6 | "/DMO/I_BOOKING_STATUS_VH", 7 | "/DMO/I_BOOKING_STATUS_VH_TEXT", 8 | "/DMO/I_CARRIER", 9 | "/DMO/I_CUSTOMER", 10 | "ZRAP110_R_BOOKINGTP_SOL" 11 | ], 12 | "ASSOCIATED": 13 | [ 14 | "/DMO/I_BOOKING_STATUS_VH", 15 | "/DMO/I_CARRIER", 16 | "/DMO/I_CONNECTION", 17 | "/DMO/I_CUSTOMER", 18 | "/DMO/I_FLIGHT", 19 | "I_CURRENCY", 20 | "ZRAP110_C_TRAVELTP_SOL", 21 | "ZRAP110_R_TRAVELTP_SOL" 22 | ], 23 | "BASE": 24 | [ 25 | "ZRAP110_R_BOOKINGTP_SOL" 26 | ], 27 | "ANNO_REF": 28 | [], 29 | "SCALAR_FUNCTION": 30 | [], 31 | "VERSION":0, 32 | "ANNOREF_EVALUATION_ERROR":"" 33 | } 34 | } -------------------------------------------------------------------------------- /src/zrap110_c_bookingtp_sol.ddls.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_C_BOOKINGTP_SOL 7 | E 8 | Projection View for Booking 9 | P 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/zrap110_c_bookingtp_sol.ddlx.asddlxs: -------------------------------------------------------------------------------- 1 | @Metadata.layer: #CUSTOMER 2 | @UI: { 3 | headerInfo: { 4 | typeName: 'Booking', 5 | typeNamePlural: 'Bookings', 6 | title: { 7 | type: #STANDARD, 8 | label: 'Booking', 9 | value: 'BookingID' 10 | } 11 | }, 12 | presentationVariant: [ { 13 | sortOrder: [ { 14 | by: 'TravelID', 15 | direction: #DESC 16 | } ], 17 | visualizations: [ { 18 | type: #AS_LINEITEM 19 | } ] 20 | } ] 21 | } 22 | annotate view ZRAP110_C_BOOKINGTP_SOL with 23 | { 24 | @UI.facet: [ { 25 | id: 'idBooking', 26 | purpose: #STANDARD, 27 | type: #IDENTIFICATION_REFERENCE, 28 | label: 'Booking', 29 | position: 10 30 | } ] 31 | @UI.lineItem: [ { 32 | position: 10 , 33 | importance: #HIGH 34 | } ] 35 | @UI.identification: [ { 36 | position: 10 37 | } ] 38 | @UI.selectionField: [ { 39 | position: 10 40 | } ] 41 | TravelID; 42 | 43 | @UI.lineItem: [ { 44 | position: 20 , 45 | importance: #HIGH 46 | } ] 47 | @UI.identification: [ { 48 | position: 20 49 | } ] 50 | BookingID; 51 | 52 | @UI.lineItem: [ { 53 | position: 30 , 54 | importance: #HIGH 55 | } ] 56 | @UI.identification: [ { 57 | position: 30 58 | } ] 59 | BookingDate; 60 | 61 | @UI.lineItem: [ { 62 | position: 40 , 63 | importance: #HIGH 64 | } ] 65 | @UI.identification: [ { 66 | position: 40 67 | } ] 68 | @UI.textArrangement: #TEXT_FIRST 69 | @UI.selectionField: [ { 70 | position: 40 71 | } ] 72 | CustomerID; 73 | 74 | @UI.lineItem: [ { 75 | position: 50 , 76 | importance: #HIGH 77 | } ] 78 | @UI.identification: [ { 79 | position: 50 80 | } ] 81 | CarrierID; 82 | 83 | @UI.lineItem: [ { 84 | position: 60 , 85 | importance: #HIGH 86 | } ] 87 | @UI.identification: [ { 88 | position: 60 89 | } ] 90 | ConnectionID; 91 | 92 | @UI.lineItem: [ { 93 | position: 70 , 94 | importance: #HIGH 95 | } ] 96 | @UI.identification: [ { 97 | position: 70 98 | } ] 99 | FlightDate; 100 | 101 | @UI.lineItem: [ { 102 | position: 80 , 103 | importance: #HIGH 104 | } ] 105 | @UI.identification: [ { 106 | position: 80 107 | } ] 108 | FlightPrice; 109 | 110 | @UI: { lineItem: [ { position: 100, criticality: 'BookingStatusIndicator', importance: #HIGH } ], //Enhanced ( New: Criticality ) 111 | identification: [ { position: 100, criticality: 'BookingStatusIndicator' } ], //Enhanced ( New: Criticality ) 112 | textArrangement: #TEXT_ONLY } 113 | BookingStatus; 114 | 115 | @UI: { 116 | dataPoint: { title: 'Days to Flight Indicator', 117 | criticality: 'DaysToFlightIndicator', 118 | targetValue: #(InitialDaysToFlight), 119 | visualization: #PROGRESS }, 120 | lineItem: [{ type: #AS_DATAPOINT, position: 110, importance: #HIGH}], 121 | identification: [{ type: #AS_DATAPOINT, position: 110 }] } 122 | RemainingDaysToFlight; 123 | 124 | @UI.hidden: true 125 | LocalLastChangedAt; 126 | } -------------------------------------------------------------------------------- /src/zrap110_c_bookingtp_sol.ddlx.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | ZRAP110_C_BOOKINGTP_SOL 8 | MDE for Booking 9 | EN 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/zrap110_c_traveltp_sol.bdef.asbdef: -------------------------------------------------------------------------------- 1 | projection; 2 | strict ( 2 ); 3 | use draft; 4 | use side effects; 5 | define behavior for ZRAP110_C_TRAVELTP_SOL alias Travel 6 | use etag 7 | 8 | { 9 | use create; 10 | use update; 11 | use delete; 12 | 13 | use action Edit; 14 | use action Activate; 15 | use action Discard; 16 | use action Resume; 17 | use action Prepare; 18 | use action acceptTravel; 19 | use action rejectTravel; 20 | use action createTravel; 21 | 22 | use action checkDates; 23 | 24 | use association _Booking { create; with draft; } 25 | } 26 | 27 | define behavior for ZRAP110_C_BOOKINGTP_SOL alias Booking 28 | use etag 29 | 30 | { 31 | use update; 32 | use delete; 33 | side effects 34 | { field BookingDate affects field DaysToFlightIndicator, field InitialDaysToFlight, field RemainingDaysToFlight; 35 | field FlightDate affects field DaysToFlightIndicator, field InitialDaysToFlight, field RemainingDaysToFlight; 36 | field ConnectionID affects field DaysToFlightIndicator, field InitialDaysToFlight, field RemainingDaysToFlight; 37 | field CarrierID affects field DaysToFlightIndicator, field InitialDaysToFlight, field RemainingDaysToFlight; } 38 | 39 | use association _Travel { with draft; } 40 | } -------------------------------------------------------------------------------- /src/zrap110_c_traveltp_sol.bdef.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_C_TRAVELTP_SOL 7 | BDEF/BDO 8 | Behavior for ZRAP110_C_TRAVELTP_SOL 9 | 60 10 | EN 11 | 12 | 13 | ./zrap110_c_traveltp_sol/source/main/versions 14 | http://www.sap.com/adt/relations/versions 15 | Historic versions 16 | 17 | 18 | ./zrap110_c_traveltp_sol/source/main 19 | http://www.sap.com/adt/relations/source 20 | text/plain 21 | Source Content 22 | 23 | 24 | ./zrap110_c_traveltp_sol/source/main 25 | http://www.sap.com/adt/relations/source 26 | text/html 27 | Source Content (HTML) 28 | 29 | 30 | EN 31 | 5 32 | ./zrap110_c_traveltp_sol/source/main 33 | ABAP_SOURCE 34 | true 35 | true 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/zrap110_c_traveltp_sol.ddls.asddls: -------------------------------------------------------------------------------- 1 | @AccessControl.authorizationCheck: #CHECK 2 | @Metadata.allowExtensions: true 3 | @EndUserText.label: 'Projection View forTravel' 4 | @ObjectModel.semanticKey: [ 'TravelID' ] 5 | @Search.searchable: true 6 | define root view entity ZRAP110_C_TRAVELTP_SOL 7 | provider contract transactional_query 8 | as projection on ZRAP110_R_TRAVELTP_SOL 9 | { 10 | @Search.defaultSearchElement: true 11 | @Search.fuzzinessThreshold: 0.90 12 | key TravelID, 13 | 14 | @Consumption.valueHelpDefinition: [ { 15 | entity: { 16 | name: '/DMO/I_Agency_StdVH', 17 | element: 'AgencyID' 18 | } 19 | } ] 20 | @Search.defaultSearchElement: true 21 | @ObjectModel.text.element: ['AgencyName'] //associated text element specified 22 | AgencyID, 23 | _Agency.Name as AgencyName, //element added 24 | 25 | @Consumption.valueHelpDefinition: [ { 26 | entity: { 27 | name: '/DMO/I_Customer_StdVH', 28 | element: 'CustomerID' 29 | } 30 | } ] 31 | @Search.defaultSearchElement: true 32 | @ObjectModel.text.element: ['CustomerName'] //associated text element specified 33 | CustomerID, 34 | _Customer.LastName as CustomerName, //element added 35 | 36 | BeginDate, 37 | EndDate, 38 | @Semantics.amount.currencyCode: 'CurrencyCode' 39 | BookingFee, 40 | @Semantics.amount.currencyCode: 'CurrencyCode' 41 | TotalPrice, 42 | 43 | @Consumption.valueHelpDefinition: [ { 44 | entity: { 45 | name: 'I_CurrencyStdVH', 46 | element: 'Currency' 47 | }, 48 | useForValidation: true 49 | } ] 50 | CurrencyCode, 51 | 52 | Description, 53 | 54 | @Consumption.valueHelpDefinition: [ { 55 | entity: { 56 | name: '/DMO/I_Overall_Status_VH', 57 | element: 'OverallStatus' 58 | }, 59 | useForValidation: true 60 | } ] 61 | @ObjectModel.text.element: ['OverallStatusText'] //associated text element specified 62 | OverallStatus, 63 | _OverallStatus._Text.Text as OverallStatusText : localized, //element added 64 | 65 | @ObjectModel.virtualElementCalculatedBy: 'ABAP:ZRAP110_CALC_TRAV_ELEM_SOL' 66 | @EndUserText.label: 'Overall Status Indicator' 67 | virtual OverallStatusIndicator : abap.int2, 68 | 69 | Attachment, 70 | MimeType, 71 | FileName, 72 | LocalLastChangedAt, 73 | 74 | ////admin fields removed: LastChangedAt, LocalLastChangedBy, LocalCreatedAt, CreatedBy, 75 | 76 | // public associations 77 | _Booking : redirected to composition child ZRAP110_C_BOOKINGTP_SOL, 78 | _Agency, 79 | _Customer, 80 | _OverallStatus, 81 | _Currency 82 | 83 | } 84 | -------------------------------------------------------------------------------- /src/zrap110_c_traveltp_sol.ddls.baseinfo: -------------------------------------------------------------------------------- 1 | { 2 | "BASEINFO": 3 | { 4 | "FROM": 5 | [ 6 | "/DMO/I_AGENCY", 7 | "/DMO/I_CUSTOMER", 8 | "/DMO/I_OVERALL_STATUS_VH", 9 | "/DMO/I_OVERALL_STATUS_VH_TEXT", 10 | "ZRAP110_R_TRAVELTP_SOL" 11 | ], 12 | "ASSOCIATED": 13 | [ 14 | "/DMO/I_AGENCY", 15 | "/DMO/I_CUSTOMER", 16 | "/DMO/I_OVERALL_STATUS_VH", 17 | "I_CURRENCY", 18 | "ZRAP110_C_BOOKINGTP_SOL", 19 | "ZRAP110_R_BOOKINGTP_SOL" 20 | ], 21 | "BASE": 22 | [ 23 | "ZRAP110_R_TRAVELTP_SOL" 24 | ], 25 | "ANNO_REF": 26 | [], 27 | "SCALAR_FUNCTION": 28 | [], 29 | "VERSION":0, 30 | "ANNOREF_EVALUATION_ERROR":"" 31 | } 32 | } -------------------------------------------------------------------------------- /src/zrap110_c_traveltp_sol.ddls.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_C_TRAVELTP_SOL 7 | E 8 | Projection View for Travel 9 | P 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/zrap110_c_traveltp_sol.ddlx.asddlxs: -------------------------------------------------------------------------------- 1 | @Metadata.layer: #CUSTOMER 2 | @UI: { 3 | headerInfo: { 4 | typeName: 'Travel', 5 | typeNamePlural: 'Travels', 6 | title: { 7 | type: #STANDARD, 8 | label: 'Travel', 9 | value: 'TravelID' 10 | } 11 | }, 12 | presentationVariant: [ { 13 | sortOrder: [ { 14 | by: 'TravelID', 15 | direction: #DESC 16 | } ], 17 | visualizations: [ { 18 | type: #AS_LINEITEM 19 | } ] 20 | } ] 21 | } 22 | annotate view ZRAP110_C_TRAVELTP_SOL with 23 | { 24 | @UI.facet: [ { 25 | id: 'idCollection', 26 | type: #COLLECTION, 27 | label: 'Travel', 28 | position: 10 29 | }, 30 | { 31 | id: 'idIdentification', 32 | parentId: 'idCollection', 33 | type: #IDENTIFICATION_REFERENCE, 34 | label: 'General Information', 35 | position: 10 36 | }, 37 | { 38 | id: 'idLineitem', 39 | type: #LINEITEM_REFERENCE, 40 | label: 'Booking', 41 | position: 20 , 42 | targetElement: '_Booking' 43 | } ] 44 | 45 | @UI.lineItem: [ 46 | { position: 10 , importance: #HIGH } 47 | ,{ type: #FOR_ACTION, dataAction: 'acceptTravel', label: 'Accept Travel' } //added line 48 | ,{ type: #FOR_ACTION, dataAction: 'rejectTravel', label: 'Reject Travel' } //added line 49 | ] 50 | @UI.identification: [ 51 | { position: 10 , importance: #HIGH } 52 | ,{ type: #FOR_ACTION, dataAction: 'acceptTravel', label: 'Accept Travel' } //added line 53 | ,{ type: #FOR_ACTION, dataAction: 'rejectTravel', label: 'Reject Travel' } //added line 54 | ] 55 | @UI.selectionField: [ { 56 | position: 10 57 | } ] 58 | TravelID; 59 | 60 | @UI.lineItem: [ { 61 | position: 20 , 62 | importance: #HIGH 63 | } ] 64 | @UI.identification: [ { 65 | position: 20 66 | } ] 67 | @UI.selectionField: [ { 68 | position: 20 69 | } ] 70 | AgencyID; 71 | 72 | @UI.lineItem: [ { 73 | position: 30 , 74 | importance: #HIGH 75 | } ] 76 | @UI.identification: [ { 77 | position: 30 78 | } ] 79 | @UI.textArrangement: #TEXT_LAST 80 | @UI.selectionField: [ { 81 | position: 30 82 | } ] 83 | CustomerID; 84 | 85 | @UI.identification: [ { 86 | position: 40 87 | } ] 88 | BeginDate; 89 | 90 | @UI.identification: [ { 91 | position: 50 92 | } ] 93 | EndDate; 94 | 95 | @UI.identification: [ { 96 | position: 60 97 | } ] 98 | BookingFee; 99 | 100 | @UI.identification: [ { 101 | position: 70 102 | } ] 103 | TotalPrice; 104 | 105 | @UI.identification: [ { 106 | position: 90 107 | } ] 108 | Description; 109 | 110 | @UI.lineItem: [ { 111 | position: 100 , 112 | importance: #HIGH 113 | ,criticality: 'OverallStatusIndicator' //added line 114 | } ] 115 | @UI.identification: [ { 116 | position: 100 117 | ,criticality: 'OverallStatusIndicator' //added line 118 | } ] 119 | @UI.textArrangement: #TEXT_ONLY 120 | OverallStatus; 121 | 122 | @UI.identification: [ { 123 | position: 110 , 124 | label: 'Upload a File' 125 | } ] 126 | Attachment; 127 | 128 | @UI.hidden: true 129 | MimeType; 130 | 131 | @UI.hidden: true 132 | FileName; 133 | 134 | @UI.hidden: true 135 | LocalLastChangedAt; 136 | } -------------------------------------------------------------------------------- /src/zrap110_c_traveltp_sol.ddlx.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | ZRAP110_C_TRAVELTP_SOL 8 | MDE for Travel 9 | EN 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/zrap110_calc_book_elem_sol.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zrap110_calc_book_elem_sol DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES if_sadl_exit_calc_element_read . 9 | 10 | CLASS-METHODS: 11 | calculate_days_to_flight 12 | IMPORTING is_original_data TYPE ZRAP110_C_BookingTP_SOL 13 | RETURNING VALUE(result) TYPE ZRAP110_C_BookingTP_SOL. 14 | 15 | PROTECTED SECTION. 16 | PRIVATE SECTION. 17 | ENDCLASS. 18 | 19 | 20 | 21 | CLASS zrap110_calc_book_elem_sol IMPLEMENTATION. 22 | 23 | METHOD if_sadl_exit_calc_element_read~calculate. 24 | IF it_requested_calc_elements IS INITIAL. 25 | EXIT. 26 | ENDIF. 27 | 28 | LOOP AT it_requested_calc_elements ASSIGNING FIELD-SYMBOL(). 29 | 30 | CASE . 31 | "virtual elements from BOOKING entity 32 | WHEN 'INITIALDAYSTOFLIGHT' OR 'REMAININGDAYSTOFLIGHT' 33 | OR 'DAYSTOFLIGHTINDICATOR' OR 'BOOKINGSTATUSINDICATOR'. 34 | 35 | DATA lt_book_original_data TYPE STANDARD TABLE OF ZRAP110_C_BookingTP_SOL WITH DEFAULT KEY. 36 | lt_book_original_data = CORRESPONDING #( it_original_data ). 37 | LOOP AT lt_book_original_data ASSIGNING FIELD-SYMBOL(). 38 | = zrap110_calc_book_elem_SOL=>calculate_days_to_flight( ). 39 | ENDLOOP. 40 | ct_calculated_data = CORRESPONDING #( lt_book_original_data ). 41 | ENDCASE. 42 | ENDLOOP. 43 | ENDMETHOD. 44 | 45 | METHOD if_sadl_exit_calc_element_read~get_calculation_info. 46 | IF iv_entity EQ 'ZRAP110_C_BOOKINGTP_SOL'. "Booking BO node 47 | LOOP AT it_requested_calc_elements ASSIGNING FIELD-SYMBOL(). 48 | CASE . 49 | WHEN 'INITIALDAYSTOFLIGHT'. 50 | COLLECT `BOOKINGDATE` INTO et_requested_orig_elements. 51 | COLLECT `FLIGHTDATE` INTO et_requested_orig_elements. 52 | WHEN 'REMAININGDAYSTOFLIGHT'. 53 | COLLECT `FLIGHTDATE` INTO et_requested_orig_elements. 54 | WHEN 'DAYSTOFLIGHTINDICATOR'. 55 | COLLECT `FLIGHTDATE` INTO et_requested_orig_elements. 56 | WHEN 'BOOKINGSTATUSINDICATOR'. 57 | COLLECT `BOOKINGSTATUS` INTO et_requested_orig_elements. 58 | ENDCASE. 59 | ENDLOOP. 60 | ENDIF. 61 | 62 | ENDMETHOD. 63 | METHOD calculate_days_to_flight. 64 | DATA(today) = cl_abap_context_info=>get_system_date( ). 65 | result = CORRESPONDING #( is_original_data ). 66 | 67 | "VE InitialDaysToFlight: initial days to flight 68 | DATA(initial_days) = result-FlightDate - result-BookingDate. 69 | IF initial_days > 0 AND initial_days < 999. 70 | result-InitialDaysToFlight = initial_days. 71 | ELSE. 72 | result-InitialDaysToFlight = 0. 73 | ENDIF. 74 | 75 | "VE RemainingDaysToFlight: remaining days to flight 76 | DATA(remaining_days) = result-FlightDate - today. 77 | IF remaining_days < 0 OR remaining_days > 999. 78 | result-RemainingDaysToFlight = 0. 79 | ELSE. 80 | result-RemainingDaysToFlight = result-FlightDate - today. 81 | ENDIF. 82 | 83 | "VE DaysToFlightIndicator: remaining days to flight *indicator* 84 | "(dataPoint: 1 = red | 2 = orange | 3 = green | 4 = grey | 5 = bleu) 85 | IF remaining_days >= 6. 86 | result-DaysToFlightIndicator = 3. "green 87 | ELSEIF remaining_days <= 5 AND remaining_days >= 3. 88 | result-DaysToFlightIndicator = 2. "orange 89 | ELSEIF remaining_days <= 2 AND remaining_days >= 0. 90 | result-DaysToFlightIndicator = 1. "red 91 | ELSE. 92 | result-DaysToFlightIndicator = 4. "grey 93 | ENDIF. 94 | 95 | "VE BookingStatusIndicator: booking status indicator 96 | "(criticality: 1 = red | 2 = orange | 3 = green) 97 | CASE result-BookingStatus. 98 | WHEN 'X'. 99 | result-BookingStatusIndicator = 1. 100 | WHEN 'N'. 101 | result-BookingStatusIndicator = 2. 102 | WHEN 'B'. 103 | result-BookingStatusIndicator = 3. 104 | WHEN OTHERS. 105 | ENDCASE. 106 | ENDMETHOD. 107 | ENDCLASS. 108 | -------------------------------------------------------------------------------- /src/zrap110_calc_book_elem_sol.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_CALC_BOOK_ELEM_SOL 7 | E 8 | Calculate Booking Virtual Elements 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zrap110_calc_trav_elem_sol.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zrap110_calc_trav_elem_sol DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | INTERFACES if_sadl_exit_calc_element_read . 8 | 9 | CLASS-METHODS: 10 | calculate_trav_status_ind 11 | IMPORTING is_original_data TYPE ZRAP110_C_TravelTP_SOL 12 | RETURNING VALUE(result) TYPE ZRAP110_C_TravelTP_SOL. 13 | 14 | PROTECTED SECTION. 15 | PRIVATE SECTION. 16 | ENDCLASS. 17 | 18 | 19 | 20 | CLASS zrap110_calc_trav_elem_sol IMPLEMENTATION. 21 | 22 | 23 | METHOD if_sadl_exit_calc_element_read~calculate. 24 | IF it_requested_calc_elements IS INITIAL. 25 | EXIT. 26 | ENDIF. 27 | 28 | LOOP AT it_requested_calc_elements ASSIGNING FIELD-SYMBOL(). 29 | CASE . 30 | "virtual elements from TRAVEL entity 31 | WHEN 'OVERALLSTATUSINDICATOR'. 32 | 33 | DATA lt_trav_original_data TYPE STANDARD TABLE OF ZRAP110_C_TravelTP_SOL WITH DEFAULT KEY. 34 | lt_trav_original_data = CORRESPONDING #( it_original_data ). 35 | LOOP AT lt_trav_original_data ASSIGNING FIELD-SYMBOL(). 36 | 37 | = zrap110_calc_trav_elem_SOL=>calculate_trav_status_ind( ). 38 | 39 | ENDLOOP. 40 | 41 | ct_calculated_data = CORRESPONDING #( lt_trav_original_data ). 42 | 43 | ENDCASE. 44 | ENDLOOP. 45 | ENDMETHOD. 46 | 47 | 48 | METHOD if_sadl_exit_calc_element_read~get_calculation_info. 49 | IF iv_entity EQ 'ZRAP110_C_TRAVELTP_SOL'. "Travel BO node 50 | LOOP AT it_requested_calc_elements ASSIGNING FIELD-SYMBOL(). 51 | CASE . 52 | WHEN 'OVERALLSTATUSINDICATOR'. 53 | APPEND 'OVERALLSTATUS' TO et_requested_orig_elements. 54 | 55 | ENDCASE. 56 | ENDLOOP. 57 | ENDIF. 58 | 59 | ENDMETHOD. 60 | METHOD calculate_trav_status_ind. 61 | result = CORRESPONDING #( is_original_data ). 62 | 63 | "travel status indicator 64 | "(criticality: 1 = red | 2 = orange | 3 = green) 65 | CASE result-OverallStatus. 66 | WHEN 'X'. 67 | result-OverallStatusIndicator = 1. 68 | WHEN 'O'. 69 | result-OverallStatusIndicator = 2. 70 | WHEN 'A'. 71 | result-OverallStatusIndicator = 3. 72 | WHEN OTHERS. 73 | ENDCASE. 74 | ENDMETHOD. 75 | 76 | ENDCLASS. 77 | -------------------------------------------------------------------------------- /src/zrap110_calc_trav_elem_sol.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_CALC_TRAV_ELEM_SOL 7 | E 8 | Calculate Travel Virtual Elements 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zrap110_dbooksol.tabl.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_DBOOKSOL 7 | E 8 | TRANSP 9 | X 10 | X 11 | Draft table for entity ZRAP110_R_BOOKINGTP_005 12 | E 13 | A 14 | 4 15 | 16 | 17 | ZRAP110_DBOOKSOL 18 | A 19 | 0 20 | APPL0 21 | N 22 | 23 | 24 | 25 | MANDT 26 | X 27 | MANDT 28 | 0 29 | X 30 | E 31 | 32 | 33 | TRAVELID 34 | X 35 | /DMO/TRAVEL_ID 36 | 0 37 | X 38 | E 39 | 40 | 41 | BOOKINGID 42 | X 43 | /DMO/BOOKING_ID 44 | 0 45 | X 46 | E 47 | 48 | 49 | DRAFTUUID 50 | X 51 | SDRAFT_UUID 52 | 0 53 | X 54 | E 55 | 56 | 57 | PARENTDRAFTUUID 58 | SDRAFT_UUID 59 | 0 60 | E 61 | 62 | 63 | BOOKINGDATE 64 | /DMO/BOOKING_DATE 65 | 0 66 | T 67 | E 68 | 69 | 70 | CUSTOMERID 71 | /DMO/CUSTOMER_ID 72 | 0 73 | E 74 | 75 | 76 | CARRIERID 77 | /DMO/CARRIER_ID 78 | 0 79 | E 80 | 81 | 82 | CONNECTIONID 83 | /DMO/CONNECTION_ID 84 | 0 85 | E 86 | 87 | 88 | FLIGHTDATE 89 | /DMO/FLIGHT_DATE 90 | 0 91 | T 92 | E 93 | 94 | 95 | BOOKINGSTATUS 96 | /DMO/BOOKING_STATUS 97 | 0 98 | X 99 | F 100 | E 101 | 102 | 103 | FLIGHTPRICE 104 | /DMO/FLIGHT_PRICE 105 | 0 106 | ZRAP110_DBOOKSOL 107 | CURRENCYCODE 108 | E 109 | 110 | 111 | CURRENCYCODE 112 | /DMO/CURRENCY_CODE 113 | 0 114 | E 115 | 116 | 117 | LOCALLASTCHANGEDAT 118 | ABP_LOCINST_LASTCHANGE_TSTMPL 119 | 0 120 | E 121 | 122 | 123 | .INCLUDE 124 | 0 125 | SYCH_BDL_DRAFT_ADMIN_INC 126 | S 127 | Standard Include for Draft Administration (BDL Syntax Check) 128 | S 129 | %ADMIN 130 | 131 | 132 | 133 | 134 | ZRAP110_DBOOKSOL 135 | CUS_DEV_SUP_DA 136 | 137 | 138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /src/zrap110_dtravsol.tabl.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_DTRAVSOL 7 | E 8 | TRANSP 9 | X 10 | X 11 | Draft table for entity ZRAP110_R_TRAVELTP_005 12 | E 13 | A 14 | 4 15 | 16 | 17 | ZRAP110_DTRAVSOL 18 | A 19 | 0 20 | APPL0 21 | N 22 | 23 | 24 | 25 | MANDT 26 | X 27 | MANDT 28 | 0 29 | X 30 | E 31 | 32 | 33 | TRAVELID 34 | X 35 | /DMO/TRAVEL_ID 36 | 0 37 | X 38 | E 39 | 40 | 41 | DRAFTUUID 42 | X 43 | SDRAFT_UUID 44 | 0 45 | X 46 | E 47 | 48 | 49 | AGENCYID 50 | /DMO/AGENCY_ID 51 | 0 52 | E 53 | 54 | 55 | CUSTOMERID 56 | /DMO/CUSTOMER_ID 57 | 0 58 | E 59 | 60 | 61 | BEGINDATE 62 | /DMO/BEGIN_DATE 63 | 0 64 | T 65 | E 66 | 67 | 68 | ENDDATE 69 | /DMO/END_DATE 70 | 0 71 | T 72 | E 73 | 74 | 75 | BOOKINGFEE 76 | /DMO/BOOKING_FEE 77 | 0 78 | ZRAP110_DTRAVSOL 79 | CURRENCYCODE 80 | E 81 | 82 | 83 | TOTALPRICE 84 | /DMO/TOTAL_PRICE 85 | 0 86 | ZRAP110_DTRAVSOL 87 | CURRENCYCODE 88 | E 89 | 90 | 91 | CURRENCYCODE 92 | /DMO/CURRENCY_CODE 93 | 0 94 | E 95 | 96 | 97 | DESCRIPTION 98 | /DMO/DESCRIPTION 99 | 0 100 | E 101 | 102 | 103 | OVERALLSTATUS 104 | /DMO/OVERALL_STATUS 105 | 0 106 | X 107 | F 108 | E 109 | 110 | 111 | ATTACHMENT 112 | /DMO/ATTACHMENT 113 | 0 114 | E 115 | 116 | 117 | MIMETYPE 118 | /DMO/MIME_TYPE 119 | 0 120 | E 121 | 122 | 123 | FILENAME 124 | /DMO/FILENAME 125 | 0 126 | E 127 | 128 | 129 | LASTCHANGEDAT 130 | ABP_LASTCHANGE_TSTMPL 131 | 0 132 | E 133 | 134 | 135 | CREATEDBY 136 | ABP_CREATION_USER 137 | 0 138 | E 139 | 140 | 141 | CREATEDAT 142 | ABP_CREATION_TSTMPL 143 | 0 144 | E 145 | 146 | 147 | LOCALLASTCHANGEDBY 148 | ABP_LOCINST_LASTCHANGE_USER 149 | 0 150 | E 151 | 152 | 153 | LOCALLASTCHANGEDAT 154 | ABP_LOCINST_LASTCHANGE_TSTMPL 155 | 0 156 | E 157 | 158 | 159 | .INCLUDE 160 | 0 161 | SYCH_BDL_DRAFT_ADMIN_INC 162 | S 163 | Standard Include for Draft Administration (BDL Syntax Check) 164 | S 165 | %ADMIN 166 | 167 | 168 | 169 | 170 | ZRAP110_DTRAVSOL 171 | CUS_DEV_SUP_DA 172 | 173 | 174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /src/zrap110_eml_playground_sol.clas.abap: -------------------------------------------------------------------------------- 1 | class ZRAP110_EML_PLAYGROUND_SOL definition 2 | public 3 | final 4 | create public . 5 | 6 | public section. 7 | 8 | interfaces IF_OO_ADT_CLASSRUN . 9 | protected section. 10 | private section. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZRAP110_EML_PLAYGROUND_SOL IMPLEMENTATION. 16 | 17 | 18 | METHOD IF_OO_ADT_CLASSRUN~MAIN. 19 | "declare internal table using derived type 20 | DATA travel_keys TYPE TABLE FOR READ IMPORT ZRAP110_R_TravelTP_SOL . 21 | 22 | "fill in relevant travel keys for READ request 23 | travel_keys = VALUE #( ( TravelID = 'xxxx' ) 24 | "( TravelID = '...' ) 25 | ). 26 | 27 | "insert your coding here 28 | "read _travel_ instances for specified key 29 | READ ENTITIES OF ZRAP110_R_TravelTP_SOL 30 | ENTITY Travel 31 | * ALL FIELDS 32 | FIELDS ( TravelID AgencyID CustomerID BeginDate EndDate ) 33 | WITH travel_keys 34 | RESULT DATA(lt_travels_read) 35 | FAILED DATA(failed) 36 | REPORTED DATA(reported). 37 | 38 | "console output 39 | out->write( | ***Exercise 10: Implement the Base BO Behavior - Functions*** | ). 40 | * out->write( lt_travels_read ). 41 | IF failed IS NOT INITIAL. 42 | out->write( |- [ERROR] Cause for failed read: { failed-travel[ 1 ]-%fail-cause } | ). 43 | ENDIF. 44 | 45 | "read relevant booking instances 46 | READ ENTITIES OF ZRAP110_R_TravelTP_SOL 47 | ENTITY Travel BY \_Booking 48 | FROM CORRESPONDING #( lt_travels_read ) 49 | RESULT DATA(lt_bookings_read) 50 | LINK DATA(travels_to_bookings). 51 | 52 | "execute function getDaysToFlight 53 | READ ENTITIES OF ZRAP110_R_TravelTP_SOL 54 | ENTITY Booking 55 | EXECUTE getDaysToFlight 56 | FROM VALUE #( FOR link IN travels_to_bookings ( %tky = link-target-%tky ) ) 57 | RESULT DATA(days_to_flight). 58 | 59 | "output result structure 60 | LOOP AT days_to_flight ASSIGNING FIELD-SYMBOL(). 61 | out->write( | TravelID = { -%tky-TravelID } | ). 62 | out->write( | BookingID = { -%tky-BookingID } | ). 63 | out->write( | RemainingDaysToFlight = { -%param-remaining_days_to_flight } | ). 64 | out->write( | InitialDaysToFlight = { -%param-initial_days_to_flight } | ). 65 | out->write( | --------------- | ). 66 | ENDLOOP. 67 | 68 | ENDMETHOD. 69 | ENDCLASS. 70 | -------------------------------------------------------------------------------- /src/zrap110_eml_playground_sol.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_EML_PLAYGROUND_SOL 7 | E 8 | EML Playground Class (005) 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zrap110_etravsol.tabl.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_ETRAVSOL 7 | E 8 | TRANSP 9 | X 10 | Travel data 11 | E 12 | A 13 | 1 14 | 15 | 16 | ZRAP110_ETRAVSOL 17 | A 18 | 0 19 | APPL0 20 | N 21 | 22 | 23 | 24 | CLIENT 25 | X 26 | 0 27 | C 28 | 000006 29 | X 30 | CLNT 31 | 000003 32 | CLNT 33 | 34 | 35 | UUID 36 | X 37 | SYSUUID_X16 38 | 0 39 | X 40 | E 41 | 42 | 43 | TRAVEL_ID 44 | /DMO/TRAVEL_ID 45 | 0 46 | X 47 | E 48 | 49 | 50 | AGENCY_ID 51 | /DMO/AGENCY_ID 52 | 0 53 | E 54 | 55 | 56 | CUSTOMER_ID 57 | /DMO/CUSTOMER_ID 58 | 0 59 | E 60 | 61 | 62 | EVENT_NAME 63 | /DMO/DESCRIPTION 64 | 0 65 | E 66 | 67 | 68 | OVERALL_STATUS 69 | /DMO/OVERALL_STATUS 70 | 0 71 | X 72 | F 73 | E 74 | 75 | 76 | CREATED_AT 77 | 0 78 | p 79 | 000008 80 | UTCL 81 | 000027 82 | UTCL 83 | 84 | 85 | 86 | 87 | ZRAP110_ETRAVSOL 88 | CUS_DEV_SUP_DA 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /src/zrap110_r_bookingtp_sol.ddls.asddls: -------------------------------------------------------------------------------- 1 | @AccessControl.authorizationCheck: #CHECK 2 | @Metadata.allowExtensions: true 3 | @EndUserText.label: 'CDS View forBooking' 4 | define view entity ZRAP110_R_BOOKINGTP_SOL 5 | as select from zrap110_abooksol as Booking 6 | 7 | association to parent ZRAP110_R_TRAVELTP_SOL as _Travel on $projection.TravelID = _Travel.TravelID 8 | association [1..1] to /DMO/I_Customer as _Customer on $projection.CustomerID = _Customer.CustomerID 9 | association [1..1] to /DMO/I_Carrier as _Carrier on $projection.CarrierID = _Carrier.AirlineID 10 | association [1..1] to /DMO/I_Connection as _Connection on $projection.CarrierID = _Connection.AirlineID 11 | and $projection.ConnectionID = _Connection.ConnectionID 12 | association [1..1] to /DMO/I_Flight as _Flight on $projection.CarrierID = _Flight.AirlineID 13 | and $projection.ConnectionID = _Flight.ConnectionID 14 | and $projection.FlightDate = _Flight.FlightDate 15 | association [1..1] to /DMO/I_Booking_Status_VH as _BookingStatus on $projection.BookingStatus = _BookingStatus.BookingStatus 16 | association [0..1] to I_Currency as _Currency on $projection.CurrencyCode = _Currency.Currency 17 | { 18 | key travel_id as TravelID, 19 | key booking_id as BookingID, 20 | booking_date as BookingDate, 21 | customer_id as CustomerID, 22 | carrier_id as CarrierID, 23 | connection_id as ConnectionID, 24 | flight_date as FlightDate, 25 | booking_status as BookingStatus, 26 | @Semantics.amount.currencyCode: 'CurrencyCode' 27 | flight_price as FlightPrice, 28 | currency_code as CurrencyCode, 29 | @Semantics.systemDateTime.localInstanceLastChangedAt: true 30 | local_last_changed_at as LocalLastChangedAt, 31 | 32 | //public associations 33 | _Travel, 34 | _Customer, 35 | _Carrier, 36 | _Connection, 37 | _Flight, 38 | _BookingStatus, 39 | _Currency 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/zrap110_r_bookingtp_sol.ddls.baseinfo: -------------------------------------------------------------------------------- 1 | { 2 | "BASEINFO": 3 | { 4 | "FROM": 5 | [ 6 | "ZRAP110_ABOOKSOL" 7 | ], 8 | "ASSOCIATED": 9 | [ 10 | "/DMO/I_BOOKING_STATUS_VH", 11 | "/DMO/I_CARRIER", 12 | "/DMO/I_CONNECTION", 13 | "/DMO/I_CUSTOMER", 14 | "/DMO/I_FLIGHT", 15 | "I_CURRENCY", 16 | "ZRAP110_R_TRAVELTP_SOL" 17 | ], 18 | "BASE": 19 | [], 20 | "ANNO_REF": 21 | [], 22 | "SCALAR_FUNCTION": 23 | [], 24 | "VERSION":0, 25 | "ANNOREF_EVALUATION_ERROR":"" 26 | } 27 | } -------------------------------------------------------------------------------- /src/zrap110_r_bookingtp_sol.ddls.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_R_BOOKINGTP_SOL 7 | E 8 | CDS View for Booking 9 | W 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/zrap110_r_traveltp_sol.bdef.asbdef: -------------------------------------------------------------------------------- 1 | managed implementation in class zrap110_BP_TravelTP_SOL unique; 2 | strict ( 2 ); 3 | with draft; 4 | define behavior for ZRAP110_R_TRAVELTP_SOL alias Travel 5 | persistent table zrap110_atravsol 6 | draft table zrap110_dtravsol 7 | etag master LocalLastChangedAt 8 | lock master total etag LastChangedAt 9 | authorization master ( global ) 10 | late numbering 11 | with additional save with full data 12 | { 13 | field ( readonly ) 14 | LocalLastChangedAt, 15 | LastChangedAt; 16 | 17 | field ( readonly ) TravelID; 18 | field ( readonly ) TotalPrice; 19 | field ( mandatory ) BeginDate, EndDate; 20 | 21 | create; 22 | update ( features : instance ); 23 | delete ( features : instance ); 24 | //side effects 25 | side effects 26 | { 27 | field BookingFee affects field TotalPrice; 28 | field CurrencyCode affects field TotalPrice; 29 | determine action checkDates executed on field BeginDate, field EndDate affects messages; 30 | } 31 | //business events 32 | event travel_accepted parameter ZRAP110_A_Travel_SOL; 33 | event travel_rejected; 34 | 35 | //action(s) 36 | action ( features : instance ) acceptTravel result [1] $self; 37 | action ( features : instance ) rejectTravel result [1] $self; 38 | internal action recalcTotalPrice; 39 | static default factory action createTravel parameter ZRAP110_A_Create_Travel_SOL [1]; 40 | determine action checkDates 41 | { 42 | validation validateDates; 43 | } 44 | 45 | // validation(s) 46 | validation validateCustomer on save { create; field CustomerID; } 47 | validation validateAgency on save { create; field AgencyID; } 48 | validation validateDates on save { create; field BeginDate, EndDate; } 49 | 50 | //determination(s) 51 | determination setInitialTravelValues on modify { create; } 52 | determination calculateTotalPrice on modify { create; field BookingFee, CurrencyCode; } 53 | 54 | draft action ( features : instance ) Edit; 55 | draft action Activate; 56 | draft action Discard; 57 | draft action Resume; 58 | draft determine action Prepare 59 | { 60 | validation validateCustomer; 61 | validation validateAgency; 62 | validation validateDates; 63 | validation Booking~validateBookingStatus; 64 | } 65 | 66 | mapping for zrap110_atravsol 67 | { 68 | TravelID = TRAVEL_ID; 69 | AgencyID = AGENCY_ID; 70 | CustomerID = CUSTOMER_ID; 71 | BeginDate = BEGIN_DATE; 72 | EndDate = END_DATE; 73 | BookingFee = BOOKING_FEE; 74 | TotalPrice = TOTAL_PRICE; 75 | CurrencyCode = CURRENCY_CODE; 76 | Description = DESCRIPTION; 77 | Attachment = ATTACHMENT; 78 | MimeType = MIME_TYPE; 79 | FileName = FILE_NAME; 80 | OverallStatus = OVERALL_STATUS; 81 | CreatedBy = CREATED_BY; 82 | CreatedAt = CREATED_AT; 83 | LocalLastChangedBy = LOCAL_LAST_CHANGED_BY; 84 | LocalLastChangedAt = LOCAL_LAST_CHANGED_AT; 85 | LastChangedAt = LAST_CHANGED_AT; 86 | } 87 | 88 | // create booking by association 89 | association _Booking { create ( features : instance ); with draft; } 90 | } 91 | 92 | define behavior for ZRAP110_R_BOOKINGTP_SOL alias Booking 93 | implementation in class zrap110_BP_BookingTP_SOL unique 94 | persistent table zrap110_abooksol 95 | draft table zrap110_dbooksol 96 | etag master LocalLastChangedAt 97 | lock dependent by _Travel 98 | authorization dependent by _Travel 99 | late numbering 100 | 101 | { 102 | field ( readonly ) 103 | TravelID, 104 | LocalLastChangedAt; 105 | 106 | //static field control 107 | field ( readonly ) BookingID; 108 | field ( mandatory ) CustomerID, CarrierID, Flightdate, BookingStatus; 109 | 110 | update; 111 | delete; 112 | 113 | //validation(s) 114 | validation validateBookingStatus on save { create; field BookingStatus; } 115 | 116 | //determination(s) 117 | determination setInitialBookingValues on modify { create; } //copy & paste 118 | determination calculateTotalPrice on modify { create; field FlightPrice, CurrencyCode; } //** 119 | 120 | //side effects for a target entity 121 | side effects 122 | { 123 | field FlightPrice affects field _Travel.TotalPrice; 124 | field CurrencyCode affects field _Travel.TotalPrice; 125 | } 126 | 127 | //function(s) 128 | function getDaysToFlight result [1] ZRAP110_A_DaysToFlight_SOL; 129 | 130 | mapping for zrap110_abooksol 131 | { 132 | TravelID = TRAVEL_ID; 133 | BookingID = BOOKING_ID; 134 | BookingDate = BOOKING_DATE; 135 | CustomerID = CUSTOMER_ID; 136 | CarrierID = CARRIER_ID; 137 | ConnectionID = CONNECTION_ID; 138 | FlightDate = FLIGHT_DATE; 139 | FlightPrice = FLIGHT_PRICE; 140 | CurrencyCode = CURRENCY_CODE; 141 | BookingStatus = BOOKING_STATUS; 142 | LocalLastChangedAt = LOCAL_LAST_CHANGED_AT; 143 | } 144 | 145 | association _Travel { with draft; } 146 | } -------------------------------------------------------------------------------- /src/zrap110_r_traveltp_sol.bdef.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_R_TRAVELTP_SOL 7 | BDEF/BDO 8 | Behavior for ZRAP110_R_TRAVELTP_SOL 9 | 60 10 | EN 11 | 12 | 13 | ./zrap110_r_traveltp_sol/source/main/versions 14 | http://www.sap.com/adt/relations/versions 15 | Historic versions 16 | 17 | 18 | ./zrap110_r_traveltp_sol/source/main 19 | http://www.sap.com/adt/relations/source 20 | text/plain 21 | Source Content 22 | 23 | 24 | ./zrap110_r_traveltp_sol/source/main 25 | http://www.sap.com/adt/relations/source 26 | text/html 27 | Source Content (HTML) 28 | 29 | 30 | EN 31 | 5 32 | ./zrap110_r_traveltp_sol/source/main 33 | ABAP_SOURCE 34 | true 35 | true 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/zrap110_r_traveltp_sol.ddls.asddls: -------------------------------------------------------------------------------- 1 | @AccessControl.authorizationCheck: #CHECK 2 | @Metadata.allowExtensions: true 3 | @EndUserText.label: 'CDS View forTravel' 4 | define root view entity ZRAP110_R_TRAVELTP_SOL 5 | as select from zrap110_atravsol as Travel 6 | 7 | association [0..1] to /DMO/I_Agency as _Agency on $projection.AgencyID = _Agency.AgencyID 8 | association [0..1] to /DMO/I_Customer as _Customer on $projection.CustomerID = _Customer.CustomerID 9 | association [1..1] to /DMO/I_Overall_Status_VH as _OverallStatus on $projection.OverallStatus = _OverallStatus.OverallStatus 10 | association [0..1] to I_Currency as _Currency on $projection.CurrencyCode = _Currency.Currency 11 | composition [0..*] of ZRAP110_R_BOOKINGTP_SOL as _Booking 12 | { 13 | key travel_id as TravelID, 14 | agency_id as AgencyID, 15 | customer_id as CustomerID, 16 | begin_date as BeginDate, 17 | end_date as EndDate, 18 | @Semantics.amount.currencyCode: 'CurrencyCode' 19 | booking_fee as BookingFee, 20 | @Semantics.amount.currencyCode: 'CurrencyCode' 21 | total_price as TotalPrice, 22 | currency_code as CurrencyCode, 23 | description as Description, 24 | overall_status as OverallStatus, 25 | @Semantics.largeObject: { mimeType: 'MimeType', //case-sensitive 26 | fileName: 'FileName', //case-sensitive 27 | //acceptableMimeTypes: ['image/png', 'image/jpeg'], 28 | contentDispositionPreference: #ATTACHMENT } 29 | attachment as Attachment, 30 | @Semantics.mimeType: true 31 | mime_type as MimeType, 32 | file_name as FileName, 33 | created_by as CreatedBy, 34 | @Semantics.systemDateTime.createdAt: true 35 | created_at as CreatedAt, 36 | @Semantics.systemDateTime.lastChangedAt: true 37 | last_changed_at as LastChangedAt, 38 | local_last_changed_by as LocalLastChangedBy, 39 | @Semantics.systemDateTime.localInstanceLastChangedAt: true 40 | local_last_changed_at as LocalLastChangedAt, 41 | 42 | //public associations 43 | _Booking, 44 | _Agency, 45 | _Customer, 46 | _OverallStatus, 47 | _Currency 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/zrap110_r_traveltp_sol.ddls.baseinfo: -------------------------------------------------------------------------------- 1 | { 2 | "BASEINFO": 3 | { 4 | "FROM": 5 | [ 6 | "ZRAP110_ATRAVSOL" 7 | ], 8 | "ASSOCIATED": 9 | [ 10 | "/DMO/I_AGENCY", 11 | "/DMO/I_CUSTOMER", 12 | "/DMO/I_OVERALL_STATUS_VH", 13 | "I_CURRENCY", 14 | "ZRAP110_R_BOOKINGTP_SOL" 15 | ], 16 | "BASE": 17 | [], 18 | "ANNO_REF": 19 | [], 20 | "SCALAR_FUNCTION": 21 | [], 22 | "VERSION":0, 23 | "ANNOREF_EVALUATION_ERROR":"" 24 | } 25 | } -------------------------------------------------------------------------------- /src/zrap110_r_traveltp_sol.ddls.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_R_TRAVELTP_SOL 7 | E 8 | CDS View for Travel 9 | W 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/zrap110_travel_event_handl_sol.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zrap110_travel_event_handl_sol DEFINITION 2 | PUBLIC 3 | FINAL FOR EVENTS OF zrap110_r_traveltp_sol 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | PROTECTED SECTION. 8 | PRIVATE SECTION. 9 | ENDCLASS. 10 | 11 | 12 | 13 | CLASS zrap110_travel_event_handl_sol IMPLEMENTATION. 14 | ENDCLASS. 15 | -------------------------------------------------------------------------------- /src/zrap110_travel_event_handl_sol.clas.locals_imp.abap: -------------------------------------------------------------------------------- 1 | CLASS lhe_travel DEFINITION INHERITING FROM cl_abap_behavior_event_handler. 2 | PRIVATE SECTION. 3 | METHODS get_uuid RETURNING VALUE(uuid) TYPE sysuuid_x16. 4 | 5 | METHODS on_travel_accepted FOR ENTITY EVENT 6 | accepted FOR travel~travel_accepted. 7 | 8 | METHODS on_travel_rejected FOR ENTITY EVENT 9 | rejected FOR travel~travel_rejected. 10 | ENDCLASS. 11 | 12 | 13 | CLASS lhe_travel IMPLEMENTATION. 14 | 15 | METHOD get_uuid. 16 | TRY. 17 | uuid = cl_system_uuid=>create_uuid_x16_static( ) . 18 | CATCH cx_uuid_error. 19 | ENDTRY. 20 | ENDMETHOD. 21 | 22 | METHOD on_travel_accepted. 23 | "close the active modify phase 24 | cl_abap_tx=>save( ). 25 | "loop over transfered travel instances and do the needful :) 26 | LOOP AT accepted REFERENCE INTO DATA(lr_accepted). 27 | DATA lr_travel_accepted TYPE zrap110_etravSOL. 28 | MOVE-CORRESPONDING lr_accepted->* TO lr_travel_accepted. 29 | lr_travel_accepted-uuid = get_uuid( ). 30 | lr_travel_accepted-travel_id = lr_accepted->%key-TravelID. 31 | lr_travel_accepted-event_name = 'travel_accepted'. 32 | lr_travel_accepted-created_at = utclong_current( ). 33 | "insert to db 34 | INSERT zrap110_etravSOL FROM @lr_travel_accepted. 35 | ENDLOOP. 36 | 37 | ENDMETHOD. 38 | 39 | METHOD on_travel_rejected. 40 | "close the active modify phase 41 | cl_abap_tx=>save( ). 42 | "loop over transfered travel instances and do the needful :) 43 | LOOP AT rejected REFERENCE INTO DATA(lr_rejected). 44 | DATA lr_travel_rejected TYPE zrap110_etravSOL. 45 | lr_travel_rejected-uuid = get_uuid( ). 46 | lr_travel_rejected-travel_id = lr_rejected->%key-TravelID. 47 | lr_travel_rejected-event_name = 'travel_rejected'. 48 | lr_travel_rejected-created_at = utclong_current( ). 49 | "insert to db 50 | INSERT zrap110_etravSOL FROM @lr_travel_rejected. 51 | ENDLOOP. 52 | ENDMETHOD. 53 | 54 | ENDCLASS. 55 | -------------------------------------------------------------------------------- /src/zrap110_travel_event_handl_sol.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_TRAVEL_EVENT_HANDL_SOL 7 | E 8 | Travel event handler for local consumption 9 | 07 10 | 1 11 | X 12 | X 13 | X 14 | ZRAP110_R_TRAVELTP_SOL 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/zrap110_ui_travel_o4_sol.srvb.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | ZRAP110_UI_TRAVEL_O4_SOL 8 | SRVB/SVB 9 | Service binding for Travel 10 | EN 11 | 12 | 13 | versions 14 | http://www.sap.com/adt/relations/versions 15 | Historic versions 16 | 17 | 18 | /sap/bc/adt/businessservices/odatav4/ZRAP110_UI_TRAVEL_O4_SOL 19 | http://www.sap.com/categories/odatav4 20 | application/vnd.sap.adt.businessservices.odatav4.v1+xml 21 | ODATAV4 22 | 23 | 24 | /sap/bc/adt/businessservices/testclass 25 | http://www.sap.com/categories/testclass 26 | application/vnd.sap.adt.businessservices.testclass.v1+xml 27 | TESTCLASS 28 | 29 | 30 | /sap/bc/adt/businessservices/testclass 31 | http://www.sap.com/categories/testclass 32 | application/vnd.sap.adt.businessservices.testclassv4.v1+xml 33 | TESTCLASSV4 34 | 35 | 36 | /sap/bc/adt/businessservices/semanticversion 37 | http://www.sap.com/categories/semanticversion 38 | application/vnd.sap.adt.businessservices.semanticversion.v1+xml 39 | SemanticVersion 40 | 41 | 42 | EN 43 | 5 44 | 45 | 46 | 47 | ZRAP110_UI_TRAVEL_O4_SOL 48 | 49 | ODATA 50 | V4 51 | 52 | 53 | ZRAP110_UI_TRAVEL_SOL 54 | 55 | 56 | 0001 57 | NOT_RELEASED 58 | 59 | /sap/bc/adt/ddic/srvd/sources/zrap110_ui_travel_sol 60 | SRVD/SRV 61 | ZRAP110_UI_TRAVEL_SOL 62 | 63 | 64 | 65 | base64 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | C1 74 | true 75 | true 76 | true 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /src/zrap110_ui_travel_o4_sol_0001_g4ba.sco2.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_UI_TRAVEL_O4_SOL_0001_G4BA 7 | G4BA 8 | ZRAP110_UI_TRAVEL_O4_SOL 9 | X 10 | 5 11 | ZRAP110_UI_TRAVEL_O4_SOL_0001_G4BA 12 | ZRAP110_UI_TRAVEL_O4_SOL 13 | 5 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/zrap110_ui_travel_o4_sol__00001_ibs.sia6.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | ZRAP110_UI_TRAVEL_O4_SOL__00001_IBS 8 | SIA6 9 | ZRAP110_UI_TRAVEL_O4_SOL 10 | CB9980000012 11 | EN 12 | PM1 13 | 14 | ZRAP110_SOL 15 | 16 | 5 17 | 18 | ZRAP110_UI_TRAVEL_O4_SOL__00001_IBS 19 | IBS 20 | 5 21 | p 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zrap110_ui_travel_o4_sol__00002_ibs.sia6.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | ZRAP110_UI_TRAVEL_O4_SOL__00002_IBS 8 | SIA6 9 | ZRAP110_UI_TRAVEL_O4_SOL 10 | CB9980000012 11 | EN 12 | PM1 13 | 14 | ZRAP110_SOL 15 | 16 | 5 17 | 18 | ZRAP110_UI_TRAVEL_O4_SOL__00002_IBS 19 | IBS 20 | 5 21 | ZRAP110_UI_TRAVEL_O4_SOL_0001_G4BA 22 | p 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/zrap110_ui_travel_sol.srvd.srvdsrv: -------------------------------------------------------------------------------- 1 | @EndUserText.label: 'Service for managing travel entities' 2 | @ObjectModel.leadingEntity.name: 'ZRAP110_C_TRAVELTP_SOL' 3 | define service ZRAP110_UI_TRAVEL_SOL { 4 | expose ZRAP110_C_TRAVELTP_SOL as Travel; 5 | expose ZRAP110_C_BOOKINGTP_SOL as Booking; 6 | expose /DMO/I_Customer as Customer; 7 | expose /DMO/I_Carrier as Carrier; 8 | expose /DMO/I_Connection as Connection; 9 | expose /DMO/I_Flight as Date; 10 | expose /DMO/I_Booking_Status_VH as BookingStatus; 11 | expose I_Currency as Currency; 12 | expose /DMO/I_Customer_StdVH as CustomerVh; 13 | expose I_CurrencyStdVH as Currencyvh2; 14 | } -------------------------------------------------------------------------------- /src/zrap110_ui_travel_sol.srvd.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110_UI_TRAVEL_SOL 7 | SRVD/SRV 8 | Service definition for Travel 9 | EN 10 | EN 11 | ./zrap110_ui_travel_sol/source/main 12 | ABAP_SOURCE 13 | ABAP Development Tools 14 | S 15 | Definition 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/zrap110sol.nrob.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZRAP110SOL 7 | /DMO/TRAVEL_ID 8 | 10.0 9 | X 10 | 00000001 11 | 12 | 13 | E 14 | ZRAP110SOL 15 | RAP110 Travel ID group 005 16 | RAP110 Travel ID... 17 | 18 | 19 | 20 | 21 | --------------------------------------------------------------------------------