├── .cdsrc.json ├── .eslintrc ├── .gitignore ├── .reuse └── dep5 ├── LICENSE ├── LICENSES └── Apache-2.0.txt ├── README.md ├── app ├── annotations.cds ├── index.cds └── test-resources │ ├── api-hub │ ├── API_BUSINESS_PARTNER.edmx │ ├── data │ │ ├── API_BUSINESS_PARTNER-A_BusinessPartner.csv │ │ ├── API_BUSINESS_PARTNER-A_BusinessPartnerAddress.csv │ │ └── scp.cloud.Individual.csv │ └── incidentservice.js │ └── ext │ ├── controller │ ├── ProcessFlow.controller.js │ └── ProcessFlowLanesAndNodes.json │ ├── fragment │ ├── CustomSectionGantt.fragment.xml │ └── CustomSectionGantt.js │ └── view │ └── ProcessFlow.view.xml ├── db ├── _i18n │ └── i18n.properties ├── data │ ├── scp.cloud.Category.csv │ ├── scp.cloud.IncidentFlow.csv │ ├── scp.cloud.IncidentProcessTimeline.csv │ ├── scp.cloud.IncidentStatus.csv │ ├── scp.cloud.Incidents.csv │ ├── scp.cloud.Individual.csv │ └── scp.cloud.Priority.csv └── schema.cds ├── default-env.json ├── exercises ├── 2020-12 SAP_TechEd_2020_SAP_Fiori_elements_SID1120 (IIS360).pdf ├── ex0 │ ├── README.md │ └── images │ │ ├── 00_00_0010.png │ │ ├── 00_00_0020.png │ │ ├── 00_00_0030.png │ │ ├── 00_00_0040.png │ │ ├── 00_00_0050.png │ │ ├── 00_00_0060.png │ │ ├── 00_00_0065.png │ │ ├── 00_00_0066.png │ │ ├── 00_00_0070.png │ │ ├── 00_00_0080.png │ │ ├── 00_00_0081.png │ │ ├── 00_00_0110.png │ │ ├── 00_00_0120.png │ │ ├── 00_00_0130.png │ │ ├── click-clone-from-git.png │ │ ├── cloneCommand.png │ │ ├── enter-github-repository.png │ │ ├── fieldicon03.png │ │ ├── fieldicon04.png │ │ ├── img_039.png │ │ ├── img_039a.png │ │ ├── img_040.png │ │ └── img_041.png ├── ex1 │ ├── README.md │ └── images │ │ ├── image1.png │ │ ├── image10.png │ │ ├── image11.png │ │ ├── image12.png │ │ ├── image13.png │ │ ├── image14.png │ │ ├── image15.png │ │ ├── image16.png │ │ ├── image17.png │ │ ├── image18.png │ │ ├── image181.png │ │ ├── image18a.png │ │ ├── image19.png │ │ ├── image2.png │ │ ├── image20.png │ │ ├── image21.png │ │ ├── image22.png │ │ ├── image23.png │ │ ├── image24.png │ │ ├── image25.png │ │ ├── image26.png │ │ ├── image27.png │ │ ├── image27a.png │ │ ├── image28.png │ │ ├── image28a.png │ │ ├── image29.png │ │ ├── image3.png │ │ ├── image4.png │ │ ├── image5.png │ │ ├── image6.png │ │ ├── image7.png │ │ ├── image8.png │ │ └── image9.png ├── ex2 │ ├── README.md │ └── images │ │ ├── image1.png │ │ ├── image10.png │ │ ├── image11.png │ │ ├── image12.png │ │ ├── image13.png │ │ ├── image14.png │ │ ├── image15.png │ │ ├── image16.png │ │ ├── image17.png │ │ ├── image18.png │ │ ├── image19.png │ │ ├── image2.png │ │ ├── image20.png │ │ ├── image3.png │ │ ├── image4.png │ │ ├── image5.png │ │ ├── image6.png │ │ ├── image7.png │ │ ├── image8.png │ │ └── image9.png ├── ex3 │ ├── README.md │ └── images │ │ ├── image1.png │ │ ├── image10.png │ │ ├── image11.png │ │ ├── image12.png │ │ ├── image13.png │ │ ├── image14.png │ │ ├── image15.png │ │ ├── image16.png │ │ ├── image17.png │ │ ├── image18.png │ │ ├── image19.png │ │ ├── image2.png │ │ ├── image20.png │ │ ├── image21.png │ │ ├── image22.png │ │ ├── image23.png │ │ ├── image24.png │ │ ├── image25.png │ │ ├── image26.png │ │ ├── image27.png │ │ ├── image3.png │ │ ├── image4.png │ │ ├── image5.png │ │ ├── image6.png │ │ ├── image7.png │ │ ├── image8.png │ │ └── image9.png ├── ex4 │ ├── README.md │ └── images │ │ ├── image1.png │ │ ├── image10.png │ │ ├── image11.png │ │ ├── image12.png │ │ ├── image13.png │ │ ├── image14.png │ │ ├── image15.png │ │ ├── image16.png │ │ ├── image17.png │ │ ├── image18.png │ │ ├── image19.png │ │ ├── image2.png │ │ ├── image20.png │ │ ├── image21.png │ │ ├── image22.png │ │ ├── image23.png │ │ ├── image24.png │ │ ├── image25.png │ │ ├── image3.png │ │ ├── image4.png │ │ ├── image5.png │ │ ├── image6.png │ │ ├── image7.png │ │ ├── image8.png │ │ └── image9.png ├── ex5 │ ├── README.md │ └── images │ │ ├── image1.png │ │ ├── image13.png │ │ ├── image14.png │ │ ├── image15.png │ │ ├── image16.png │ │ ├── image2.png │ │ ├── image3.png │ │ ├── image4.png │ │ ├── image5.png │ │ ├── image6.png │ │ ├── image7.png │ │ └── image8.png ├── ex6 │ ├── README.md │ └── images │ │ ├── image0.png │ │ ├── image1.png │ │ ├── image10.png │ │ ├── image11.png │ │ ├── image12.png │ │ ├── image13.png │ │ ├── image14.png │ │ ├── image15.png │ │ ├── image16.png │ │ ├── image17.png │ │ ├── image18.png │ │ ├── image19.png │ │ ├── image2.png │ │ ├── image20.png │ │ ├── image21.png │ │ ├── image22.png │ │ ├── image23.png │ │ ├── image24.png │ │ ├── image25.png │ │ ├── image26.png │ │ ├── image27.png │ │ ├── image28.png │ │ ├── image29.png │ │ ├── image3.png │ │ ├── image30.png │ │ ├── image31.png │ │ ├── image4.png │ │ ├── image5.png │ │ ├── image6.png │ │ ├── image7.png │ │ ├── image8.png │ │ └── image9.png └── ex7 │ ├── README.md │ └── images │ ├── image1.png │ ├── image10.png │ ├── image11.png │ ├── image12.png │ ├── image13.png │ ├── image14.png │ ├── image15.png │ ├── image15a.png │ ├── image16.png │ ├── image17.png │ ├── image18.png │ ├── image19.png │ ├── image19a.png │ ├── image2.png │ ├── image20.png │ ├── image21.png │ ├── image22.png │ ├── image23.png │ ├── image24.png │ ├── image25.png │ ├── image26.png │ ├── image27.png │ ├── image28.png │ ├── image2a.png │ ├── image3.png │ ├── image4.png │ ├── image5.png │ ├── image6.png │ ├── image7.png │ ├── image8.png │ └── image9.png ├── package.json └── srv ├── common.cds ├── incidentservice.cds └── incidentservice.js /.cdsrc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint:recommended", 3 | "env": { 4 | "node": true, 5 | "es6": true, 6 | "jest": true 7 | }, 8 | "parserOptions": { 9 | "ecmaVersion": 2017 10 | }, 11 | "globals": { 12 | "SELECT": true, 13 | "INSERT": true, 14 | "UPDATE": true, 15 | "DELETE": true, 16 | "CREATE": true, 17 | "DROP": true, 18 | "cds": true 19 | }, 20 | "rules": { 21 | "no-console": "off", 22 | "require-atomic-updates": "off" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # CAP teched2020-IIS360 2 | _out 3 | *.db 4 | connection.properties 5 | default-*.json 6 | gen/ 7 | node_modules/ 8 | target/ 9 | 10 | # Web IDE, App Studio 11 | .che/ 12 | .gen/ 13 | 14 | # MTA 15 | *_mta_build_tmp 16 | *.mtar 17 | mta_archives/ 18 | 19 | # Other 20 | .DS_Store 21 | *.orig 22 | *.log 23 | 24 | *.iml 25 | *.flattened-pom.xml 26 | .vscode 27 | package-lock.json 28 | 29 | # IDEs 30 | # .vscode 31 | .idea 32 | -------------------------------------------------------------------------------- /.reuse/dep5: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: teched2020-IIS360 3 | Upstream-Contact: () 4 | Source: https://github.com/sap-samples/teched2020-IIS360 5 | Disclaimer: The code in this project may include calls to APIs (“API Calls”) of 6 | SAP or third-party products or services developed outside of this project 7 | (“External Products”). 8 | “APIs” means application programming interfaces, as well as their respective 9 | specifications and implementing code that allows software to communicate with 10 | other software. 11 | API Calls to External Products are not licensed under the open source license 12 | that governs this project. The use of such API Calls and related External 13 | Products are subject to applicable additional agreements with the relevant 14 | provider of the External Products. In no event shall the open source license 15 | that governs this project grant any rights in or to any External Products,or 16 | alter, expand or supersede any terms of the applicable additional agreements. 17 | If you have a valid license agreement with SAP for the use of a particular SAP 18 | External Product, then you may make use of any API Calls included in this 19 | project’s code for that SAP External Product, subject to the terms of such 20 | license agreement. If you do not have a valid license agreement for the use of 21 | a particular SAP External Product, then you may only make use of any API Calls 22 | in this project for that SAP External Product for your internal, non-productive 23 | and non-commercial test and evaluation of such API Calls. Nothing herein grants 24 | you any rights to use or access any SAP External Product, or provide any third 25 | parties the right to use of access any SAP External Product, through API Calls. 26 | 27 | Files: * 28 | Copyright: 2020 SAP SE or an SAP affiliate company and teched2020-IIS360 contributors 29 | License: Apache-2.0 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /LICENSES/Apache-2.0.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | 3 | Version 2.0, January 2004 4 | 5 | http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, 6 | AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | 11 | 12 | "License" shall mean the terms and conditions for use, reproduction, and distribution 13 | as defined by Sections 1 through 9 of this document. 14 | 15 | 16 | 17 | "Licensor" shall mean the copyright owner or entity authorized by the copyright 18 | owner that is granting the License. 19 | 20 | 21 | 22 | "Legal Entity" shall mean the union of the acting entity and all other entities 23 | that control, are controlled by, or are under common control with that entity. 24 | For the purposes of this definition, "control" means (i) the power, direct 25 | or indirect, to cause the direction or management of such entity, whether 26 | by contract or otherwise, or (ii) ownership of fifty percent (50%) or more 27 | of the outstanding shares, or (iii) beneficial ownership of such entity. 28 | 29 | 30 | 31 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions 32 | granted by this License. 33 | 34 | 35 | 36 | "Source" form shall mean the preferred form for making modifications, including 37 | but not limited to software source code, documentation source, and configuration 38 | files. 39 | 40 | 41 | 42 | "Object" form shall mean any form resulting from mechanical transformation 43 | or translation of a Source form, including but not limited to compiled object 44 | code, generated documentation, and conversions to other media types. 45 | 46 | 47 | 48 | "Work" shall mean the work of authorship, whether in Source or Object form, 49 | made available under the License, as indicated by a copyright notice that 50 | is included in or attached to the work (an example is provided in the Appendix 51 | below). 52 | 53 | 54 | 55 | "Derivative Works" shall mean any work, whether in Source or Object form, 56 | that is based on (or derived from) the Work and for which the editorial revisions, 57 | annotations, elaborations, or other modifications represent, as a whole, an 58 | original work of authorship. For the purposes of this License, Derivative 59 | Works shall not include works that remain separable from, or merely link (or 60 | bind by name) to the interfaces of, the Work and Derivative Works thereof. 61 | 62 | 63 | 64 | "Contribution" shall mean any work of authorship, including the original version 65 | of the Work and any modifications or additions to that Work or Derivative 66 | Works thereof, that is intentionally submitted to Licensor for inclusion in 67 | the Work by the copyright owner or by an individual or Legal Entity authorized 68 | to submit on behalf of the copyright owner. For the purposes of this definition, 69 | "submitted" means any form of electronic, verbal, or written communication 70 | sent to the Licensor or its representatives, including but not limited to 71 | communication on electronic mailing lists, source code control systems, and 72 | issue tracking systems that are managed by, or on behalf of, the Licensor 73 | for the purpose of discussing and improving the Work, but excluding communication 74 | that is conspicuously marked or otherwise designated in writing by the copyright 75 | owner as "Not a Contribution." 76 | 77 | 78 | 79 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf 80 | of whom a Contribution has been received by Licensor and subsequently incorporated 81 | within the Work. 82 | 83 | 2. Grant of Copyright License. Subject to the terms and conditions of this 84 | License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, 85 | no-charge, royalty-free, irrevocable copyright license to reproduce, prepare 86 | Derivative Works of, publicly display, publicly perform, sublicense, and distribute 87 | the Work and such Derivative Works in Source or Object form. 88 | 89 | 3. Grant of Patent License. Subject to the terms and conditions of this License, 90 | each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, 91 | no-charge, royalty-free, irrevocable (except as stated in this section) patent 92 | license to make, have made, use, offer to sell, sell, import, and otherwise 93 | transfer the Work, where such license applies only to those patent claims 94 | licensable by such Contributor that are necessarily infringed by their Contribution(s) 95 | alone or by combination of their Contribution(s) with the Work to which such 96 | Contribution(s) was submitted. If You institute patent litigation against 97 | any entity (including a cross-claim or counterclaim in a lawsuit) alleging 98 | that the Work or a Contribution incorporated within the Work constitutes direct 99 | or contributory patent infringement, then any patent licenses granted to You 100 | under this License for that Work shall terminate as of the date such litigation 101 | is filed. 102 | 103 | 4. Redistribution. You may reproduce and distribute copies of the Work or 104 | Derivative Works thereof in any medium, with or without modifications, and 105 | in Source or Object form, provided that You meet the following conditions: 106 | 107 | (a) You must give any other recipients of the Work or Derivative Works a copy 108 | of this License; and 109 | 110 | (b) You must cause any modified files to carry prominent notices stating that 111 | You changed the files; and 112 | 113 | (c) You must retain, in the Source form of any Derivative Works that You distribute, 114 | all copyright, patent, trademark, and attribution notices from the Source 115 | form of the Work, excluding those notices that do not pertain to any part 116 | of the Derivative Works; and 117 | 118 | (d) If the Work includes a "NOTICE" text file as part of its distribution, 119 | then any Derivative Works that You distribute must include a readable copy 120 | of the attribution notices contained within such NOTICE file, excluding those 121 | notices that do not pertain to any part of the Derivative Works, in at least 122 | one of the following places: within a NOTICE text file distributed as part 123 | of the Derivative Works; within the Source form or documentation, if provided 124 | along with the Derivative Works; or, within a display generated by the Derivative 125 | Works, if and wherever such third-party notices normally appear. The contents 126 | of the NOTICE file are for informational purposes only and do not modify the 127 | License. You may add Your own attribution notices within Derivative Works 128 | that You distribute, alongside or as an addendum to the NOTICE text from the 129 | Work, provided that such additional attribution notices cannot be construed 130 | as modifying the License. 131 | 132 | You may add Your own copyright statement to Your modifications and may provide 133 | additional or different license terms and conditions for use, reproduction, 134 | or distribution of Your modifications, or for any such Derivative Works as 135 | a whole, provided Your use, reproduction, and distribution of the Work otherwise 136 | complies with the conditions stated in this License. 137 | 138 | 5. Submission of Contributions. Unless You explicitly state otherwise, any 139 | Contribution intentionally submitted for inclusion in the Work by You to the 140 | Licensor shall be under the terms and conditions of this License, without 141 | any additional terms or conditions. Notwithstanding the above, nothing herein 142 | shall supersede or modify the terms of any separate license agreement you 143 | may have executed with Licensor regarding such Contributions. 144 | 145 | 6. Trademarks. This License does not grant permission to use the trade names, 146 | trademarks, service marks, or product names of the Licensor, except as required 147 | for reasonable and customary use in describing the origin of the Work and 148 | reproducing the content of the NOTICE file. 149 | 150 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to 151 | in writing, Licensor provides the Work (and each Contributor provides its 152 | Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 153 | KIND, either express or implied, including, without limitation, any warranties 154 | or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR 155 | A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness 156 | of using or redistributing the Work and assume any risks associated with Your 157 | exercise of permissions under this License. 158 | 159 | 8. Limitation of Liability. In no event and under no legal theory, whether 160 | in tort (including negligence), contract, or otherwise, unless required by 161 | applicable law (such as deliberate and grossly negligent acts) or agreed to 162 | in writing, shall any Contributor be liable to You for damages, including 163 | any direct, indirect, special, incidental, or consequential damages of any 164 | character arising as a result of this License or out of the use or inability 165 | to use the Work (including but not limited to damages for loss of goodwill, 166 | work stoppage, computer failure or malfunction, or any and all other commercial 167 | damages or losses), even if such Contributor has been advised of the possibility 168 | of such damages. 169 | 170 | 9. Accepting Warranty or Additional Liability. While redistributing the Work 171 | or Derivative Works thereof, You may choose to offer, and charge a fee for, 172 | acceptance of support, warranty, indemnity, or other liability obligations 173 | and/or rights consistent with this License. However, in accepting such obligations, 174 | You may act only on Your own behalf and on Your sole responsibility, not on 175 | behalf of any other Contributor, and only if You agree to indemnify, defend, 176 | and hold each Contributor harmless for any liability incurred by, or claims 177 | asserted against, such Contributor by reason of your accepting any such warranty 178 | or additional liability. END OF TERMS AND CONDITIONS 179 | 180 | APPENDIX: How to apply the Apache License to your work. 181 | 182 | To apply the Apache License to your work, attach the following boilerplate 183 | notice, with the fields enclosed by brackets "[]" replaced with your own identifying 184 | information. (Don't include the brackets!) The text should be enclosed in 185 | the appropriate comment syntax for the file format. We also recommend that 186 | a file or class name and description of purpose be included on the same "printed 187 | page" as the copyright notice for easier identification within third-party 188 | archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | 194 | you may not use this file except in compliance with the License. 195 | 196 | You may obtain a copy of the License at 197 | 198 | http://www.apache.org/licenses/LICENSE-2.0 199 | 200 | Unless required by applicable law or agreed to in writing, software 201 | 202 | distributed under the License is distributed on an "AS IS" BASIS, 203 | 204 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 205 | 206 | See the License for the specific language governing permissions and 207 | 208 | limitations under the License. 209 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # IIS360 - Simplify Development of SAP Fiori Apps with OData V4 2 | 3 | [![REUSE status](https://api.reuse.software/badge/github.com/SAP-samples/teched2020-IIS360)](https://api.reuse.software/info/github.com/SAP-samples/teched2020-IIS360) 4 | 5 | ## Description 6 | 7 | The exercises in this repository are deprecated. Please refer to the material for the SAP TechEd 2021 session\ 8 | [IIS160 - Accelerate the Development of SAP Fiori Apps Using SAP Fiori Elements.](https://github.com/SAP-samples/teched2021-IIS160) 9 | 10 | ## Overview 11 | 12 | This session introduces attendees to the creation of a SAP Fiori elements Floorplans for OData V4 app.\ 13 | You will start in the SAP Business Application Studio with a sample service (based on the SAP Cloud Application Programming Model for nodeJS), and make usage of the SAP Fiori tools in order to generate and extend the app.\ 14 | More detailed information about SAP Fiori elements and SAP Fiori tools can be found in [this presentation](exercises/2020-12%20SAP_TechEd_2020_SAP_Fiori_elements_SID1120%20(IIS360).pdf). 15 | 16 | ## Requirements 17 | 18 | There are no special requirements to follow the exercises in this repository. 19 | 20 | ## Exercises 21 | 22 | - [Getting Started - Setting up your Development Environment](exercises/ex0#getting-started---setting-up-your-development-environment) 23 | - [Setting up SAP Business Application Studio in an SAP Cloud Platform Trial Account](exercises/ex0#setting-up-sap-business-application-studio-in-an-sap-cloud-platform-trial-account) 24 | - [New Trial Users](exercises/ex0#new-trial-users) 25 | - [Existing Trial Users](exercises/ex0#existing-trial-users) 26 | - [Accessing SAP Business Application Studio](exercises/ex0#accessing-sap-business-application-studio) 27 | - [Creating the Development Space](exercises/ex0#creating-the-development-space) 28 | - [Getting the Sample Scenario](exercises/ex0#getting-the-sample-scenario) 29 | - [Reopening the Exposed Port](exercises/ex0#reopening-the-exposed-port) 30 | 31 | - [Exercise 1 - Generating an SAP Fiori Elements App](exercises/ex1#exercise-1---generating-an-sap-fiori-elements-app) 32 | - [Exercise 1.1 Using the SAP Fiori tools Application Generator](exercises/ex1#exercise-11-using-the-sap-fiori-tools-application-generator) 33 | - [Exercise 1.2 Starting the App](exercises/ex1#exercise-12-starting-the-app) 34 | 35 | - [Exercise 2 - Switching to Flexible Column Layout](exercises/ex2#exercise-2---switching-to-flexible-column-layout) 36 | 37 | - [Exercise 3 - Configuring the App](exercises/ex3#exercise-3---configuring-the-app) 38 | - [Exercise 3.1 Enable Data Load During Start of the App](exercises/ex3#exercise-31-enable-data-load-during-start-of-the-app) 39 | - [Exercise 3.2 Enable Control Level Variant Management](exercises/ex3#exercise-32-enable-control-level-variant-managment) 40 | - [Exercise 3.3 Configure Editable Object Page Header](exercises/ex3#exercise-33-configure-editable-object-page-header) 41 | - [Exercise 3.4 Enable Tab Based Section Layout](exercises/ex3#exercise-34-enable-tab-based-section-layout) 42 | 43 | - [Exercise 4 - Adding a Custom Page](exercises/ex4#exercise-4---adding-a-custom-page) 44 | - [Exercise 4.1 Copy Over the Sample Custom Page](exercises/ex4#exercise-41-copy-over-the-sample-custom-page) 45 | - [Exercise 4.2 Adding a Custom Page via SAP Fiori Page Map](exercises/ex4#exercise-42-adding-a-custom-page-via-sap-fiori-page-map) 46 | - [Exercise 4.3 Custom Page: Testing the App](exercises/ex4#exercise-43-custom-page-testing-the-app) 47 | 48 | - [Exercise 5 - Adding a Custom Section](exercises/ex5#exercise-5---adding-a-custom-section) 49 | - [Custom Sections Overview](exercises/ex5#custom-sections-overview) 50 | - [Exercise 5.1 Enhancing the Language Model](exercises/ex5#exercise-51-enhancing-the-language-model) 51 | - [Exercise 5.2 Adding a Custom Section via Page Map](exercises/ex5#exercise-52-adding-a-custom-section-via-page-map) 52 | 53 | - [Exercise 6 - Enhance the UI with Annotations](exercises/ex6#exercise-6---enhance-the-ui-with-annotations) 54 | - [Exercise 6.1 Adding a Field Group](exercises/ex6#exercise-61-adding-a-field-group) 55 | - [Exercise 6.2 Adding a Reference Facet Annotation](exercises/ex6#exercise-62-adding-a-reference-facet-annotation) 56 | - [Exercise 6.3 Adding a new Table Column with Criticality Highlighting](exercises/ex6#exercise-63-adding-a-new-table-column-with-criticality-highlighting) 57 | 58 | - [Exercise 7 - Adding a Contact Card Showing Data from SAP S/4 HANA](exercises/ex7#exercise-7---adding-a-contact-card-showing-data-from-sap-s4-hana) 59 | - [Exercise 7.1 Get the Business Partner EDMX File](exercises/ex7#exercise-71-get-the-business-partner-edmx-file) 60 | - [Exercise 7.2 Adding the EDMX File and Local Data to your Project](exercises/ex7#exercise-72-adding-the-edmx-file-and-local-data-to-your-project) 61 | - [Exercise 7.3 Adding Associations to the Incidents Service Entities](exercises/ex7#exercise-73-adding-associations-to-the-incidents-service-entities) 62 | - [Exercise 7.4 Adding an Annotation for a Contact Card](excercises/ex7#exercise-74-adding-an-annotation-for-a-contact-card) 63 | - [Exercise 7.5 Fetching Business Partner Data from an SAP S/4 HANA Cloud system](exercises/ex7#exercise-75-fetching-business-partner-data-from-an-sap-s4-hana-cloud-system) 64 | 65 | ## How to obtain support 66 | 67 | Support for the content in this repository is available during the actual time of the online session for which this content has been designed. Otherwise, you may request support via the [Issues](../../issues) tab. 68 | 69 | ## License 70 | Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](LICENSES/Apache-2.0.txt) file. 71 | -------------------------------------------------------------------------------- /app/annotations.cds: -------------------------------------------------------------------------------- 1 | using IncidentService as service from '../srv/incidentservice'; 2 | using from '../srv/common'; 3 | 4 | annotate service.Incidents with @(UI : { 5 | //basic List Report annotations 6 | //the lineItem annotation defines the table columns for UI display of the annotated entity 7 | //https://github.com/SAP/odata-vocabularies/blob/master/vocabularies/UI.md#LineItem 8 | //Table columns are defined by building blocks of type DataFieldAbstract 9 | //https://github.com/SAP/odata-vocabularies/blob/master/vocabularies/UI.md#DataFieldAbstract 10 | LineItem : [ 11 | { 12 | $Type : 'UI.DataField', 13 | Value : identifier, 14 | }, 15 | { 16 | $Type : 'UI.DataField', 17 | Value : priority_code, 18 | Criticality : priority.criticality, 19 | CriticalityRepresentation : #WithoutIcon, 20 | 21 | }, 22 | { 23 | $Type : 'UI.DataField', 24 | Value : incidentStatus_code 25 | }, 26 | { 27 | $Type : 'UI.DataField', 28 | Value : category_code 29 | }, 30 | { 31 | $Type : 'UI.DataField', 32 | Value : title 33 | } 34 | ], 35 | 36 | //the managed associations incidentStatus, category and priority provide a denormalized _code property to the root entity SafetIncidents 37 | //Documentation managed associations: https://cap.cloud.sap/docs/guides/domain-models#use-managed-associations 38 | //usage of aspect sap.common.codelist for the associated entities automatically provides value help support for the selection fields 39 | //the entity definitions can be found in file db/schema.cds 40 | //Documentation codelists: https://cap.cloud.sap/docs/cds/common#aspect-sapcommoncodelist 41 | SelectionFields : [ 42 | incidentStatus_code, 43 | category_code, 44 | priority_code 45 | ], 46 | 47 | // Information for the header area of an entity representation 48 | HeaderInfo : { 49 | TypeName : '{i18n>Incident}', 50 | TypeNamePlural : '{i18n>Incidents}', 51 | TypeImageUrl : 'sap-icon://alert', 52 | Title : {Value : title} 53 | }, 54 | 55 | //Facets for additional object header information (shown in the Object Page header) 56 | HeaderFacets : [{ 57 | $Type : 'UI.ReferenceFacet', 58 | Target : '@UI.FieldGroup#HeaderGeneralInformation' 59 | }, 60 | //begin of header facet enhancement 61 | 62 | //end of header facet enhancement 63 | ], 64 | 65 | //Group of fields with an optional label 66 | //https://github.com/SAP/odata-vocabularies/blob/master/vocabularies/UI.md#FieldGroupType 67 | FieldGroup #HeaderGeneralInformation : {Data : [ 68 | {Value : priority_code}, 69 | {Value : incidentStatus_code}, 70 | {Value : category_code} 71 | ]}, 72 | 73 | FieldGroup #IncidentDetails : {Data : [ 74 | { 75 | $Type : 'UI.DataField', 76 | Value : title 77 | }, 78 | { 79 | $Type : 'UI.DataField', 80 | Value : description 81 | }, 82 | ]}, 83 | 84 | FieldGroup #GeneralInformation : {Data : [ 85 | { 86 | $Type : 'UI.DataField', 87 | Value : identifier, 88 | }, 89 | { 90 | $Type : 'UI.DataField', 91 | Value : priority_code 92 | }, 93 | { 94 | $Type : 'UI.DataField', 95 | Value : category_code 96 | }, 97 | { 98 | $Type : 'UI.DataField', 99 | Value : incidentStatus_code 100 | } 101 | ]}, 102 | 103 | //begin of field group enhancement 104 | 105 | //end of field group enhancement 106 | 107 | //Object Page content area is organized by facets referring to e.g. fieldgroup and lineItem annotations 108 | //https://github.com/SAP/odata-vocabularies/blob/master/vocabularies/UI.md#Facet 109 | Facets : [ 110 | { 111 | $Type : 'UI.CollectionFacet', 112 | Label : '{i18n>IncidentOverview}', 113 | ID : 'IncidentOverviewFacet', 114 | Facets : [ 115 | { 116 | $Type : 'UI.ReferenceFacet', 117 | Label : '{i18n>GeneralInformation}', 118 | ID : 'GeneralInformationFacet', 119 | Target : '@UI.FieldGroup#GeneralInformation' 120 | }, 121 | { 122 | $Type : 'UI.ReferenceFacet', 123 | Label : '{i18n>IncidentDetails}', 124 | ID : 'IncidentDetailsFacet', 125 | Target : '@UI.FieldGroup#IncidentDetails' 126 | }, 127 | 128 | //begin of reference facet enhancement 129 | 130 | //end of reference facet enhancement 131 | ] 132 | }, 133 | //this facet shows a table on the Object Page by referring to a lineItem annotation via association incidentFlow 134 | //the referred LineItem annotation definition for entity IncidentFlow is defined below 135 | { 136 | $Type : 'UI.ReferenceFacet', 137 | Label : '{i18n>IncidentProcessFlow}', 138 | ID : 'ProcessFlowFacet', 139 | Target : 'incidentFlow/@UI.LineItem', 140 | ![@UI.Hidden] : isDraft 141 | } 142 | 143 | ] 144 | }); 145 | 146 | annotate service.IncidentFlow with @(UI : {LineItem : [ 147 | 148 | //begin of column enhancement 149 | 150 | //end of column enhancement 151 | { 152 | $Type : 'UI.DataField', 153 | Value : processStep 154 | }, 155 | { 156 | $Type : 'UI.DataField', 157 | Value : stepStartDate 158 | }, 159 | { 160 | $Type : 'UI.DataField', 161 | Value : stepEndDate 162 | } 163 | ]}); 164 | -------------------------------------------------------------------------------- /app/index.cds: -------------------------------------------------------------------------------- 1 | using from './annotations'; -------------------------------------------------------------------------------- /app/test-resources/api-hub/data/API_BUSINESS_PARTNER-A_BusinessPartner.csv: -------------------------------------------------------------------------------- 1 | BusinessPartner;BusinessPartnerFullName 2 | 17100001;Max Mustermann 3 | 17100003;Erika Musterfrau 4 | 17100004;Jochen Mustermann 5 | 17100005;Klara Musterfrau 6 | 17100006;Emma Musterfrau -------------------------------------------------------------------------------- /app/test-resources/api-hub/data/API_BUSINESS_PARTNER-A_BusinessPartnerAddress.csv: -------------------------------------------------------------------------------- 1 | BusinessPartner;AddressID;CityName;Country;PostalCode;StreetName;HouseNumber 2 | 17100001;22901;Walldorf;DE;69190;Dietmar-Hopp-Allee;16 3 | 17100003;22939;Walldorf;DE;69190;Dietmar-Hopp-Allee;16 4 | 17100004;22941;Walldorf;DE;69190;Dietmar-Hopp-Allee;16 5 | 17100005;22951;Walldorf;DE;69190;Dietmar-Hopp-Allee;16 6 | 17100006;22943;Walldorf;DE;69190;Dietmar-Hopp-Allee;16 -------------------------------------------------------------------------------- /app/test-resources/api-hub/data/scp.cloud.Individual.csv: -------------------------------------------------------------------------------- 1 | id;businessPartnerID;addressID 2 | 067460c5-196c-4783-9563-ede797399da8;17100001;22901 3 | efec3e9f-ceea-4d17-80a7-50073f71c322;17100003;22939 4 | efec3e9f-ceea-4d17-80a7-50073f71c323;17100004;22941 5 | efec3e9f-ceea-4d17-80a7-50073f71c324;17100005;22951 6 | efec3e9f-ceea-4d17-80a7-50073f71c325;17100006;22943 -------------------------------------------------------------------------------- /app/test-resources/api-hub/incidentservice.js: -------------------------------------------------------------------------------- 1 | const cds = require("@sap/cds"); 2 | /** 3 | * Enumeration values for FieldControlType 4 | * @see https://github.com/SAP/odata-vocabularies/blob/master/vocabularies/Common.md#FieldControlType 5 | */ 6 | const FieldControl = { 7 | Mandatory: 7, 8 | Optional: 3, 9 | ReadOnly: 1, 10 | Inapplicable: 0, 11 | }; 12 | 13 | module.exports = cds.service.impl(async function (srv) { 14 | const { 15 | Incidents, 16 | BusinessPartner, 17 | Individual, 18 | BusinessPartnerAddress 19 | } = srv.entities 20 | 21 | //read/edit event hook after read of entity 'Incidents' 22 | srv.after(["READ", "EDIT"], "Incidents", setTechnicalFlags); 23 | srv.after("READ", "Incidents", setPriorityCriticality); 24 | srv.before("SAVE", "Incidents", validateIncident); 25 | 26 | /** 27 | * Set technical flags, used for controlling UI behaviour, on the 'Incidents' entity 28 | * 29 | * @param Incidents {Incidents | Incidents[]} (Array of) Incidents 30 | */ 31 | function setTechnicalFlags(Incidents) { 32 | 33 | function _setFlags(Incidents) { 34 | Incidents.isDraft = !Incidents.IsActiveEntity; 35 | // field control on the 'identifier' property 36 | if (Incidents.IsActiveEntity) { 37 | Incidents.identifierFieldControl = FieldControl.Optional; 38 | } else if (Incidents.HasActiveEntity) { 39 | Incidents.identifierFieldControl = FieldControl.ReadOnly; 40 | } else { 41 | Incidents.identifierFieldControl = FieldControl.Mandatory; 42 | } 43 | } 44 | 45 | if (Array.isArray(Incidents)) { 46 | Incidents.forEach(_setFlags); 47 | } else { 48 | _setFlags(Incidents); 49 | } 50 | }; 51 | 52 | /** 53 | * Set priority criticality used for display in LR table 54 | * 55 | * @param Incidents {Incidents | Incidents[]} (Array of) Incidents 56 | */ 57 | function setPriorityCriticality(Incidents) { 58 | 59 | function _setCriticality(Incidents) { 60 | if (Incidents.priority) { 61 | Incidents.priority.criticality = parseInt(Incidents.priority.code); 62 | } 63 | } 64 | 65 | if (Array.isArray(Incidents)) { 66 | Incidents.forEach(_setCriticality); 67 | } else { 68 | _setCriticality(Incidents); 69 | } 70 | } 71 | 72 | /** 73 | * Validate a 'Incident' entry 74 | * 75 | * @param req Request 76 | */ 77 | function validateIncident(req) { 78 | // check mandatory properties 79 | if (!req.data.identifier) { 80 | req.error(400, "Enter a Incident Identifier", "in/identifier"); 81 | } 82 | } 83 | 84 | //S/4 HANA integration: Begin Custom query handlers 85 | const extSrv = await cds.connect.to("API_BUSINESS_PARTNER") 86 | 87 | this.on('READ', BusinessPartner, req => 88 | !req.query.cqn.where || (req.query.cqn.where && req.query.cqn.where[0] != "exists") ? extSrv.tx(req).run(req.query) : console.log('skipped') 89 | ) 90 | 91 | this.on('READ', BusinessPartnerAddress, req => 92 | !req.query.cqn.where || (req.query.cqn.where && req.query.cqn.where[0] != "exists") ? extSrv.tx(req).run(req.query) : console.log('skipped') 93 | ) 94 | 95 | this.on('READ', Incidents, async (context, next) => { 96 | const node = context.query.SELECT.columns && context.query.SELECT.columns.find(c => c.ref[0] === 'assignedIndividual') 97 | //check on expanded entities in query and enhance query with BP association columns 98 | //Experimental: currently no CAP support for external associated read when in draft mode 99 | if (node && node.expand.find(c => c.ref[0] === 'businessPartner') && !node.expand.find(c => c.ref[0] === 'businessPartnerID')) { 100 | { 101 | node.expand.push({ 102 | ref: ['businessPartnerID'] 103 | }) 104 | } 105 | } 106 | const response = await next(); 107 | await Promise.all( 108 | response.filter(response => response.assignedIndividual && response.assignedIndividual.businessPartnerID) 109 | .map(each => 110 | //asynchronous parallel read from S/4 service for expand on businessPartner 111 | Promise.all([ 112 | getBPartner(each.assignedIndividual, context) 113 | ]) 114 | ) 115 | ) 116 | return response; 117 | }) 118 | 119 | this.on('READ', Individual, async (context, next) => { 120 | //check on expanded entities in query and enhance query with BP association columns 121 | //Experimental: currently no CAP support for external associated read when in draft mode 122 | if (context.query.SELECT.columns && (context.query.SELECT.columns.find(c => c.ref[0] === 'businessPartner')) || context.query.SELECT.columns.find(c => c.ref[0] === 'businessPartnerAddress')) { 123 | if (!context.query.SELECT.columns.find(c => c.ref[0] === 'businessPartnerID')) { 124 | context.query.SELECT.columns.push({ 125 | ref: ['businessPartnerID'] 126 | }); 127 | if (!context.query.SELECT.columns.find(c => c.ref[0] === 'addressID')) { 128 | context.query.SELECT.columns.push({ 129 | ref: ['addressID'] 130 | }); 131 | } 132 | } 133 | } 134 | const response = await next(); 135 | await Promise.all( 136 | response.filter(response => response.businessPartnerID && response.addressID) 137 | .map(each => 138 | //asynchronous parallel read from S/4 service for expand on businessPartner entities 139 | Promise.all([ 140 | getBPartner(each, context), 141 | getBPartnerAddress(each, context) 142 | ]) 143 | ) 144 | ) 145 | return response; 146 | }) 147 | 148 | const getBPartner = async (each, context) => { 149 | if (!extSrv.options.mocked && each) { 150 | await extSrv.tx(context).run( 151 | SELECT.one.from(BusinessPartner).where({ 152 | BusinessPartner: each.businessPartnerID 153 | }) 154 | ) 155 | .then(data => { 156 | each.businessPartner = {}; 157 | Object.assign(each.businessPartner, data); 158 | }) 159 | } 160 | } 161 | 162 | const getBPartnerAddress = async (each, context) => { 163 | if (!extSrv.options.mocked && each) { 164 | await extSrv.tx(context).run( 165 | SELECT.one.from(BusinessPartnerAddress).where({ 166 | BusinessPartner: each.businessPartnerID 167 | }).and({ 168 | AddressID: each.addressID 169 | }) 170 | ).then(data => { 171 | each.businessPartnerAddress = {}; 172 | Object.assign(each.businessPartnerAddress, data) 173 | }) 174 | } 175 | } 176 | //S/4 HANA integration: End Custom query handlers 177 | }) -------------------------------------------------------------------------------- /app/test-resources/ext/controller/ProcessFlow.controller.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | 'sap/ui/core/mvc/Controller', 3 | // Experimental usage of RoutingListener 4 | 'sap/fe/core/controllerextensions/RoutingListener', 5 | 'sap/ui/model/json/JSONModel', 6 | 'sap/m/MessageToast' 7 | ], 8 | function (Controller, RoutingListener, JSONModel, MessageToast) { 9 | "use strict"; 10 | 11 | return Controller.extend("myController", { 12 | routingListener: RoutingListener, 13 | 14 | constructor: function () { 15 | Controller.apply(this, arguments); 16 | // No need to instantiate the extension, it's done automatically 17 | }, 18 | 19 | onInit: function () { 20 | var oView = this.getView(); 21 | this.oProcessFlow1 = oView.byId("processflow1"); 22 | 23 | var sDataPath = jQuery.sap.getModulePath("sap.fe.demo.incidents.ext.controller", "/ProcessFlowLanesAndNodes.json"); 24 | var oModelPf1 = new JSONModel(sDataPath); 25 | oView.setModel(oModelPf1, "ProcessFlowModel"); 26 | oModelPf1.attachRequestCompleted(this.oProcessFlow1.updateModel.bind(this.oProcessFlow1)); 27 | }, 28 | 29 | onNodePress: function (event) { 30 | MessageToast.show("Node " + event.getParameters().getNodeId() + " has been clicked."); 31 | } 32 | }); 33 | }); -------------------------------------------------------------------------------- /app/test-resources/ext/controller/ProcessFlowLanesAndNodes.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "id": "1", 5 | "lane": "0", 6 | "title": "Incident Report", 7 | "titleAbbreviation": "IR 1", 8 | "children": [ 10, 11, 12, 13 ], 9 | "state": "Positive", 10 | "stateText": "Done", 11 | "focused": true, 12 | "highlighted": false, 13 | "texts": [ "Initial Recording of incident" ] 14 | }, { 15 | "id": "10", 16 | "lane": "1", 17 | "title": "Incident Review Document", 18 | "titleAbbreviation": "RD 40", 19 | "children": [ 20, 21, 22 ], 20 | "state": "Positive", 21 | "stateText": "Done", 22 | "focused": false, 23 | "highlighted": false, 24 | "texts": null 25 | }, { 26 | "id": "11", 27 | "lane": "1", 28 | "title": "Inquiry", 29 | "titleAbbreviation": "I 43", 30 | "children": null, 31 | "state": "Positive", 32 | "stateText": "Done", 33 | "focused": false, 34 | "highlighted": false, 35 | "texts": null 36 | }, { 37 | "id": "12", 38 | "lane": "1", 39 | "title": "Risk Assessment", 40 | "titleAbbreviation": "RA 45", 41 | "children": null, 42 | "state": "Positive", 43 | "stateText": "Done", 44 | "focused": false, 45 | "highlighted": false, 46 | "texts": null 47 | }, { 48 | "id": "13", 49 | "lane": "1", 50 | "title": "Track Record Fin. Impact", 51 | "titleAbbreviation": "FI 9", 52 | "children": null, 53 | "state": "Positive", 54 | "stateText": "Done", 55 | "focused": false, 56 | "highlighted": false, 57 | "texts": null 58 | }, { 59 | "id": "20", 60 | "lane": "2", 61 | "title": "Incident Investigation", 62 | "titleAbbreviation": "II 0", 63 | "children": [ 30 ], 64 | "state": "PlannedNegative", 65 | "stateText": "Blocked", 66 | "focused": false, 67 | "highlighted": false, 68 | "texts": null 69 | }, { 70 | "id": "21", 71 | "lane": "2", 72 | "title": "Prioritization", 73 | "titleAbbreviation": "II 1", 74 | "children": null, 75 | "state": "Neutral", 76 | "stateText": "In Progress", 77 | "focused": false, 78 | "highlighted": false 79 | }, { 80 | "id": "22", 81 | "lane": "2", 82 | "title": "Categorization", 83 | "titleAbbreviation": "II 2", 84 | "children": null, 85 | "state": "PlannedNegative", 86 | "stateText": "Blocked", 87 | "focused": false, 88 | "highlighted": false 89 | }, 90 | { 91 | "id": "30", 92 | "lane": "3", 93 | "title": "Final Report", 94 | "titleAbbreviation": "II 3", 95 | "children": null, 96 | "state": "Critical", 97 | "stateText": "Open", 98 | "focused": false, 99 | "highlighted": false 100 | } 101 | ], 102 | "lanes": [ 103 | { 104 | "id": "0", 105 | "icon": "sap-icon://nurse", 106 | "label": "Incident Reporting", 107 | "position": 0 108 | }, { 109 | "id": "1", 110 | "icon": "sap-icon://incident", 111 | "label": "Incident Record Review", 112 | "position": 1 113 | }, { 114 | "id": "2", 115 | "icon": "sap-icon://search", 116 | "label": "Incident Investigation", 117 | "position": 2 118 | }, { 119 | "id": "3", 120 | "icon": "sap-icon://manager-insight", 121 | "label": "Report Generation", 122 | "position": 3 123 | } 124 | ] 125 | } 126 | -------------------------------------------------------------------------------- /app/test-resources/ext/fragment/CustomSectionGantt.fragment.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 |
47 |
48 |
-------------------------------------------------------------------------------- /app/test-resources/ext/fragment/CustomSectionGantt.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/core/mvc/Controller", 3 | "sap/ui/model/json/JSONModel", 4 | "sap/gantt/misc/Format" 5 | ], function (Controller, JSONModel, Format) { 6 | "use strict"; 7 | 8 | return { 9 | fnTimeConverter: function (sTimestamp) { 10 | return Format.abapTimestampToDate(sTimestamp); 11 | } 12 | }; 13 | }); -------------------------------------------------------------------------------- /app/test-resources/ext/view/ProcessFlow.view.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 23 | 30 | 37 | 38 | 39 | 40 | 41 | 48 | 49 | 61 | 62 | 63 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /db/_i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | # Entities 2 | #XFLD 3 | Incident=Incident 4 | #XFLD 5 | Incidents=Incidents 6 | #XFLD 7 | AssignedContact=Assigned Contact 8 | #XFLD 9 | IncidentOverview=Incident Overview 10 | #XFLD 11 | IncidentDescription=Incident Description 12 | #XFLD 13 | GeneralInformation=General Information 14 | #XFLD 15 | IncidentDetails=Incident Details 16 | #XFLD 17 | AdminData=Admin Data 18 | #XFLD 19 | IncidentProcessFlow=Incident Process Flow 20 | #XFLD 21 | InlineAction=Inline Action 22 | #XFLD 23 | IncidentsPerCategory=Incidents Per Category 24 | # Incidents 25 | #XFLD 26 | Title=Title 27 | #XFLD 28 | Category=Category 29 | #XFLD 30 | Priority=Priority 31 | #XFLD 32 | IncidentStatus=Incident Status 33 | #XFLD 34 | IncidentDescription=Incident Description 35 | # IncidentFlow 36 | #XFLD 37 | ProcessStep=Process Step 38 | #XFLD 39 | ProcessStepStatus=Process Step Status 40 | #XFLD 41 | StepStartDate=Starting at 42 | #XFLD 43 | StepEndDate=Ending at 44 | # Individual 45 | #XFLD 46 | FirstName=First Name 47 | #XFLD 48 | LastName=Last Name 49 | #XFLD 50 | FullName=Name 51 | #XFLD 52 | CreatedBy=Created By 53 | #XFLD 54 | EmailAddress=Email Address 55 | 56 | -------------------------------------------------------------------------------- /db/data/scp.cloud.Category.csv: -------------------------------------------------------------------------------- 1 | code;name;descr 2 | security;Security; 3 | software;Software; 4 | hardware;Hardware; 5 | telephony;Telephony; 6 | database;Database; 7 | inquiry;Inquiry; 8 | -------------------------------------------------------------------------------- /db/data/scp.cloud.IncidentFlow.csv: -------------------------------------------------------------------------------- 1 | id;processStep;stepStatus;criticality;incident_ID;stepStartDate;stepEndDate 2 | 2feec9ec-c192-48c6-8971-e3c4838cb801;Incident Reporting;Done;3;2feec9ec-c192-48c6-8971-e3c4838cb861;2020-06-02;2020-06-16 3 | 2feec9ec-c192-48c6-8971-e3c4838cb802;Incident Record Review;Done;3;2feec9ec-c192-48c6-8971-e3c4838cb861;2020-06-15;2020-06-30 4 | 2feec9ec-c192-48c6-8971-e3c4838cb803;Incident Investigation;Blocked;1;2feec9ec-c192-48c6-8971-e3c4838cb861;2020-06-20;2020-08-31 5 | 2feec9ec-c192-48c6-8971-e3c4838cb804;Incident Report Generation;Open;2;2feec9ec-c192-48c6-8971-e3c4838cb861;2020-08-31;2020-09-15 6 | 2feec9ec-c192-48c6-8971-e3c4838cb811;Incident Reporting;Done;3;919f1a94-0281-4226-ad3a-9148af4cb5d2;2020-06-07;2020-06-21 7 | 2feec9ec-c192-48c6-8971-e3c4838cb812;Incident Record Review;Done;3;919f1a94-0281-4226-ad3a-9148af4cb5d2;2020-06-20;2020-07-05 8 | 2feec9ec-c192-48c6-8971-e3c4838cb813;Incident Investigation;Blocked;1;919f1a94-0281-4226-ad3a-9148af4cb5d2;2020-07-05;2020-09-11 9 | 2feec9ec-c192-48c6-8971-e3c4838cb814;Incident Report Generation;Open;2;919f1a94-0281-4226-ad3a-9148af4cb5d2;2020-08-31;2020-09-15 10 | 2feec9ec-c192-48c6-8971-e3c4838cb821;Incident Reporting;Done;3;f1c73988-bc83-4b5b-8169-80a946852c9a;2020-06-12;2020-06-26 11 | 2feec9ec-c192-48c6-8971-e3c4838cb822;Incident Record Review;Done;3;f1c73988-bc83-4b5b-8169-80a946852c9a;2020-06-24;2020-07-05 12 | 2feec9ec-c192-48c6-8971-e3c4838cb823;Incident Investigation;Blocked;1;f1c73988-bc83-4b5b-8169-80a946852c9a;2020-07-05;2020-09-11 13 | 2feec9ec-c192-48c6-8971-e3c4838cb824;Incident Report Generation;Open;2;f1c73988-bc83-4b5b-8169-80a946852c9a;2020-09-09;2020-09-15 14 | 2feec9ec-c192-48c6-8971-e3c4838cb831;Incident Reporting;Done;3;4e507caf-c53d-445b-abf9-341839aec969;2020-06-18;2020-07-02 15 | 2feec9ec-c192-48c6-8971-e3c4838cb832;Incident Record Review;Done;3;4e507caf-c53d-445b-abf9-341839aec969;2020-06-29;2020-07-05 16 | 2feec9ec-c192-48c6-8971-e3c4838cb833;Incident Investigation;Blocked;1;4e507caf-c53d-445b-abf9-341839aec969;2020-07-05;2020-09-05 17 | 2feec9ec-c192-48c6-8971-e3c4838cb834;Incident Report Generation;Open;2;4e507caf-c53d-445b-abf9-341839aec969;2020-09-08;2020-09-26 18 | 2feec9ec-c192-48c6-8971-e3c4838cb841;Incident Reporting;Done;3;82165023-8db0-4a82-89df-a6bd6665b11a;2020-06-07;2020-06-21 19 | 2feec9ec-c192-48c6-8971-e3c4838cb842;Incident Record Review;Done;3;82165023-8db0-4a82-89df-a6bd6665b11a;2020-06-20;2020-07-05 20 | 2feec9ec-c192-48c6-8971-e3c4838cb843;Incident Investigation;Blocked;1;82165023-8db0-4a82-89df-a6bd6665b11a;2020-07-10;2020-08-19 21 | 2feec9ec-c192-48c6-8971-e3c4838cb844;Incident Report Generation;Open;2;82165023-8db0-4a82-89df-a6bd6665b11a;2020-09-13;2020-09-26 22 | 2feec9ec-c192-48c6-8971-e3c4838cb851;Incident Reporting;Done;3;9e4f49cf-9ffb-499d-8813-1a2ed8b98605;2020-06-12;2020-06-26 23 | 2feec9ec-c192-48c6-8971-e3c4838cb852;Incident Record Review;Done;3;9e4f49cf-9ffb-499d-8813-1a2ed8b98605;2020-06-24;2020-07-09 24 | 2feec9ec-c192-48c6-8971-e3c4838cb853;Incident Investigation;Blocked;1;9e4f49cf-9ffb-499d-8813-1a2ed8b98605;2020-07-10;2020-08-08 25 | 2feec9ec-c192-48c6-8971-e3c4838cb854;Incident Report Generation;Open;2;9e4f49cf-9ffb-499d-8813-1a2ed8b98605;2020-08-31;2020-09-15 26 | 2feec9ec-c192-48c6-8971-e3c4838cb861;Incident Reporting;Done;3;6cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-06-18;2020-07-02 27 | 2feec9ec-c192-48c6-8971-e3c4838cb862;Incident Record Review;Done;3;6cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-06-29;2020-07-14 28 | 2feec9ec-c192-48c6-8971-e3c4838cb863;Incident Investigation;Blocked;1;6cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-07-19;2020-09-11 29 | 2feec9ec-c192-48c6-8971-e3c4838cb864;Incident Report Generation;Open;2;6cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-08-31;2020-09-15 30 | 2feec9ec-c192-48c6-8971-e3c4838cb871;Incident Reporting;Done;3;7cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-06-01;2020-06-15 31 | 2feec9ec-c192-48c6-8971-e3c4838cb872;Incident Record Review;Done;3;7cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-06-15;2020-06-30 32 | 2feec9ec-c192-48c6-8971-e3c4838cb873;Incident Investigation;Blocked;1;7cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-06-30;2020-09-05 33 | 2feec9ec-c192-48c6-8971-e3c4838cb874;Incident Report Generation;Open;2;7cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-09-02;2020-09-14 34 | 2feec9ec-c192-48c6-8971-e3c4838cb881;Incident Reporting;Done;3;8cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-06-07;2020-06-21 35 | 2feec9ec-c192-48c6-8971-e3c4838cb882;Incident Record Review;Done;3;8cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-06-20;2020-07-05 36 | 2feec9ec-c192-48c6-8971-e3c4838cb883;Incident Investigation;Blocked;1;8cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-07-05;2020-08-31 37 | 2feec9ec-c192-48c6-8971-e3c4838cb884;Incident Report Generation;Open;2;8cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-08-26;2020-09-16 38 | 2feec9ec-c192-48c6-8971-e3c4838cb891;Incident Reporting;Done;3;9cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-06-12;2020-06-26 39 | 2feec9ec-c192-48c6-8971-e3c4838cb892;Incident Record Review;Done;3;9cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-06-24;2020-07-09 40 | 2feec9ec-c192-48c6-8971-e3c4838cb893;Incident Investigation;Blocked;1;9cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-07-10;2020-09-05 41 | 2feec9ec-c192-48c6-8971-e3c4838cb894;Incident Report Generation;Open;2;9cf360ec-2dc5-40b9-b782-4b8a8b488dad;2020-08-31;2020-09-15 42 | 2feec9ec-c192-48c6-8971-e3c4838cb991;Incident Reporting;Done;3;1df360ec-2dc5-40b9-b782-4b8a8b488dad;2020-06-18;2020-07-02 43 | 2feec9ec-c192-48c6-8971-e3c4838cb992;Incident Record Review;Done;3;1df360ec-2dc5-40b9-b782-4b8a8b488dad;2020-06-29;2020-07-14 44 | 2feec9ec-c192-48c6-8971-e3c4838cb993;Incident Investigation;Blocked;1;1df360ec-2dc5-40b9-b782-4b8a8b488dad;2020-07-14;2020-08-23 45 | 2feec9ec-c192-48c6-8971-e3c4838cb994;Incident Report Generation;Open;2;1df360ec-2dc5-40b9-b782-4b8a8b488dad;2020-09-11;2020-09-15 46 | 3feec9ec-c192-48c6-8971-e3c4838cb991;Incident Reporting;Done;3;2df360ec-2dc5-40b9-b782-4b8a8b488dad;2020-06-01;2020-06-15 47 | 3feec9ec-c192-48c6-8971-e3c4838cb992;Incident Record Review;Done;3;2df360ec-2dc5-40b9-b782-4b8a8b488dad;2020-06-15;2020-06-30 48 | 3feec9ec-c192-48c6-8971-e3c4838cb993;Incident Investigation;Blocked;1;2df360ec-2dc5-40b9-b782-4b8a8b488dad;2020-06-20;2020-08-31 49 | 3feec9ec-c192-48c6-8971-e3c4838cb994;Incident Report Generation;Open;2;2df360ec-2dc5-40b9-b782-4b8a8b488dad;2020-08-31;2020-09-15 50 | -------------------------------------------------------------------------------- /db/data/scp.cloud.IncidentProcessTimeline.csv: -------------------------------------------------------------------------------- 1 | id;text;type;startTime;endTime;incident_ID 2 | 2feec9ec-c192-48c6-8971-e3c4838cb801;Incident Reporting;chevron;2021-01-02T10:00:00.723Z;2021-01-16T10:00:00.723Z;2feec9ec-c192-48c6-8971-e3c4838cb861 3 | 2feec9ec-c192-48c6-8971-e3c4838cb802;Incident Record Review;chevron;2021-01-15T10:00:00.723Z;2021-01-30T10:00:00.723Z;2feec9ec-c192-48c6-8971-e3c4838cb861 4 | 2feec9ec-c192-48c6-8971-e3c4838cb803;Incident Investigation;chevron;2021-01-20T10:00:00.723Z;2021-03-31T10:00:00.723Z;2feec9ec-c192-48c6-8971-e3c4838cb861 5 | 2feec9ec-c192-48c6-8971-e3c4838cb804;Incident Report Generation;chevron;2021-03-31T10:00:00.723Z;2021-04-15T10:00:00.723Z;2feec9ec-c192-48c6-8971-e3c4838cb861 6 | 2feec9ec-c192-48c6-8971-e3c4838cb811;Incident Reporting;chevron;2021-01-07T04:53:20.723Z;2021-01-21T04:53:20.723Z;919f1a94-0281-4226-ad3a-9148af4cb5d2 7 | 2feec9ec-c192-48c6-8971-e3c4838cb812;Incident Record Review;chevron;2021-01-20T01:06:40.723Z;2021-02-05T01:06:40.723Z;919f1a94-0281-4226-ad3a-9148af4cb5d2 8 | 2feec9ec-c192-48c6-8971-e3c4838cb813;Incident Investigation;chevron;2021-02-05T11:06:40.723Z;2021-04-11T23:46:40.723Z;919f1a94-0281-4226-ad3a-9148af4cb5d2 9 | 2feec9ec-c192-48c6-8971-e3c4838cb814;Incident Report Generation;chevron;2021-03-31T10:00:00.723Z;2021-04-15T10:00:00.723Z;919f1a94-0281-4226-ad3a-9148af4cb5d2 10 | 2feec9ec-c192-48c6-8971-e3c4838cb821;Incident Reporting;chevron;2021-01-12T23:46:40.723Z;2021-01-26T23:46:40.723Z;f1c73988-bc83-4b5b-8169-80a946852c9a 11 | 2feec9ec-c192-48c6-8971-e3c4838cb822;Incident Record Review;chevron;2021-01-24T16:13:20.723Z;2021-02-05T01:06:40.723Z;f1c73988-bc83-4b5b-8169-80a946852c9a 12 | 2feec9ec-c192-48c6-8971-e3c4838cb823;Incident Investigation;chevron;2021-02-05T11:06:40.723Z;2021-04-11T23:46:40.723Z;f1c73988-bc83-4b5b-8169-80a946852c9a 13 | 2feec9ec-c192-48c6-8971-e3c4838cb824;Incident Report Generation;chevron;2021-04-09T16:13:20.723Z;2021-04-15T10:00:00.723Z;f1c73988-bc83-4b5b-8169-80a946852c9a 14 | 2feec9ec-c192-48c6-8971-e3c4838cb831;Incident Reporting;chevron;2021-01-18T18:40:00.723Z;2021-02-02T18:40:00.723Z;4e507caf-c53d-445b-abf9-341839aec969 15 | 2feec9ec-c192-48c6-8971-e3c4838cb832;Incident Record Review;chevron;2021-01-29T07:20:00.723Z;2021-02-05T01:06:40.723Z;4e507caf-c53d-445b-abf9-341839aec969 16 | 2feec9ec-c192-48c6-8971-e3c4838cb833;Incident Investigation;chevron;2021-02-05T11:06:40.723Z;2021-04-05T01:06:40.723Z;4e507caf-c53d-445b-abf9-341839aec969 17 | 2feec9ec-c192-48c6-8971-e3c4838cb834;Incident Report Generation;chevron;2021-04-08T12:26:40.723Z;2021-04-26T23:46:40.723Z;4e507caf-c53d-445b-abf9-341839aec969 18 | 2feec9ec-c192-48c6-8971-e3c4838cb841;Incident Reporting;chevron;2021-01-07T04:53:20.723Z;2021-01-21T04:53:20.723Z;82165023-8db0-4a82-89df-a6bd6665b11a 19 | 2feec9ec-c192-48c6-8971-e3c4838cb842;Incident Record Review;chevron;2021-01-20T01:06:40.723Z;2021-02-05T01:06:40.723Z;82165023-8db0-4a82-89df-a6bd6665b11a 20 | 2feec9ec-c192-48c6-8971-e3c4838cb843;Incident Investigation;chevron;2021-02-10T02:13:20.723Z;2021-03-19T20:13:20.723Z;82165023-8db0-4a82-89df-a6bd6665b11a 21 | 2feec9ec-c192-48c6-8971-e3c4838cb844;Incident Report Generation;chevron;2021-04-13T03:33:20.723Z;2021-04-26T23:46:40.723Z;82165023-8db0-4a82-89df-a6bd6665b11a 22 | 2feec9ec-c192-48c6-8971-e3c4838cb851;Incident Reporting;chevron;2021-01-12T23:46:40.723Z;2021-01-26T23:46:40.723Z;9e4f49cf-9ffb-499d-8813-1a2ed8b98605 23 | 2feec9ec-c192-48c6-8971-e3c4838cb852;Incident Record Review;chevron;2021-01-24T16:13:20.723Z;2021-02-09T16:13:20.723Z;9e4f49cf-9ffb-499d-8813-1a2ed8b98605 24 | 2feec9ec-c192-48c6-8971-e3c4838cb853;Incident Investigation;chevron;2021-02-10T02:13:20.723Z;2021-03-08T06:26:40.723Z;9e4f49cf-9ffb-499d-8813-1a2ed8b98605 25 | 2feec9ec-c192-48c6-8971-e3c4838cb854;Incident Report Generation;chevron;2021-03-31T10:00:00.723Z;2021-04-15T10:00:00.723Z;9e4f49cf-9ffb-499d-8813-1a2ed8b98605 26 | 2feec9ec-c192-48c6-8971-e3c4838cb861;Incident Reporting;chevron;2021-01-18T18:40:00.723Z;2021-02-02T18:40:00.723Z;6cf360ec-2dc5-40b9-b782-4b8a8b488dad 27 | 2feec9ec-c192-48c6-8971-e3c4838cb862;Incident Record Review;chevron;2021-01-29T07:20:00.723Z;2021-02-14T07:20:00.723Z;6cf360ec-2dc5-40b9-b782-4b8a8b488dad 28 | 2feec9ec-c192-48c6-8971-e3c4838cb863;Incident Investigation;chevron;2021-02-19T08:26:40.723Z;2021-04-11T23:46:40.723Z;6cf360ec-2dc5-40b9-b782-4b8a8b488dad 29 | 2feec9ec-c192-48c6-8971-e3c4838cb864;Incident Report Generation;chevron;2021-03-31T10:00:00.723Z;2021-04-15T10:00:00.723Z;6cf360ec-2dc5-40b9-b782-4b8a8b488dad 30 | 2feec9ec-c192-48c6-8971-e3c4838cb871;Incident Reporting;chevron;2021-01-01T10:00:00.723Z;2021-01-15T10:00:00.723Z;7cf360ec-2dc5-40b9-b782-4b8a8b488dad 31 | 2feec9ec-c192-48c6-8971-e3c4838cb872;Incident Record Review;chevron;2021-01-15T10:00:00.723Z;2021-01-30T10:00:00.723Z;7cf360ec-2dc5-40b9-b782-4b8a8b488dad 32 | 2feec9ec-c192-48c6-8971-e3c4838cb873;Incident Investigation;chevron;2021-01-30T20:00:00.723Z;2021-04-05T01:06:40.723Z;7cf360ec-2dc5-40b9-b782-4b8a8b488dad 33 | 2feec9ec-c192-48c6-8971-e3c4838cb874;Incident Report Generation;chevron;2021-04-02T17:33:20.723Z;2021-04-14T06:13:20.723Z;7cf360ec-2dc5-40b9-b782-4b8a8b488dad 34 | 2feec9ec-c192-48c6-8971-e3c4838cb881;Incident Reporting;chevron;2021-01-07T04:53:20.723Z;2021-01-21T04:53:20.723Z;8cf360ec-2dc5-40b9-b782-4b8a8b488dad 35 | 2feec9ec-c192-48c6-8971-e3c4838cb882;Incident Record Review;chevron;2021-01-20T01:06:40.723Z;2021-02-05T01:06:40.723Z;8cf360ec-2dc5-40b9-b782-4b8a8b488dad 36 | 2feec9ec-c192-48c6-8971-e3c4838cb883;Incident Investigation;chevron;2021-02-05T11:06:40.723Z;2021-03-31T10:00:00.723Z;8cf360ec-2dc5-40b9-b782-4b8a8b488dad 37 | 2feec9ec-c192-48c6-8971-e3c4838cb884;Incident Report Generation;chevron;2021-03-26T18:53:20.723Z;2021-04-16T13:46:40.723Z;8cf360ec-2dc5-40b9-b782-4b8a8b488dad 38 | 2feec9ec-c192-48c6-8971-e3c4838cb891;Incident Reporting;chevron;2021-01-12T23:46:40.723Z;2021-01-26T23:46:40.723Z;9cf360ec-2dc5-40b9-b782-4b8a8b488dad 39 | 2feec9ec-c192-48c6-8971-e3c4838cb892;Incident Record Review;chevron;2021-01-24T16:13:20.723Z;2021-02-09T16:13:20.723Z;9cf360ec-2dc5-40b9-b782-4b8a8b488dad 40 | 2feec9ec-c192-48c6-8971-e3c4838cb893;Incident Investigation;chevron;2021-02-10T02:13:20.723Z;2021-04-05T01:06:40.723Z;9cf360ec-2dc5-40b9-b782-4b8a8b488dad 41 | 2feec9ec-c192-48c6-8971-e3c4838cb894;Incident Report Generation;chevron;2021-03-31T10:00:00.723Z;2021-04-15T10:00:00.723Z;9cf360ec-2dc5-40b9-b782-4b8a8b488dad 42 | 2feec9ec-c192-48c6-8971-e3c4838cb991;Incident Reporting;chevron;2021-01-18T18:40:00.723Z;2021-02-02T18:40:00.723Z;1df360ec-2dc5-40b9-b782-4b8a8b488dad 43 | 2feec9ec-c192-48c6-8971-e3c4838cb992;Incident Record Review;chevron;2021-01-29T07:20:00.723Z;2021-02-14T07:20:00.723Z;1df360ec-2dc5-40b9-b782-4b8a8b488dad 44 | 2feec9ec-c192-48c6-8971-e3c4838cb993;Incident Investigation;chevron;2021-02-14T17:20:00.723Z;2021-03-23T07:33:20.723Z;1df360ec-2dc5-40b9-b782-4b8a8b488dad 45 | 2feec9ec-c192-48c6-8971-e3c4838cb994;Incident Report Generation;chevron;2021-04-11T23:46:40.723Z;2021-04-15T23:53:20.723Z;1df360ec-2dc5-40b9-b782-4b8a8b488dad 46 | 3feec9ec-c192-48c6-8971-e3c4838cb991;Incident Reporting;chevron;2021-01-01T10:00:00.723Z;2021-01-15T10:00:00.723Z;2df360ec-2dc5-40b9-b782-4b8a8b488dad 47 | 3feec9ec-c192-48c6-8971-e3c4838cb992;Incident Record Review;chevron;2021-01-15T10:00:00.723Z;2021-01-30T10:00:00.723Z;2df360ec-2dc5-40b9-b782-4b8a8b488dad 48 | 3feec9ec-c192-48c6-8971-e3c4838cb993;Incident Investigation;chevron;2021-01-20T10:00:00.723Z;2021-03-31T10:00:00.723Z;2df360ec-2dc5-40b9-b782-4b8a8b488dad 49 | 3feec9ec-c192-48c6-8971-e3c4838cb994;Incident Report Generation;chevron;2021-03-31T10:00:00.723Z;2021-04-15T10:00:00.723Z;2df360ec-2dc5-40b9-b782-4b8a8b488dad 50 | -------------------------------------------------------------------------------- /db/data/scp.cloud.IncidentStatus.csv: -------------------------------------------------------------------------------- 1 | code;name;descr 2 | new;New;An incident that has been logged but not yet worked on. 3 | assigned;Assigned;Incident has been asssigned to a technician 4 | in process;In Process;Case is being actively worked on 5 | on hold;On Hold;Incident has been put on hold 6 | resolved;Resolved;Resolution has been found 7 | closed;Closed;Incident was acknowleged closed by end user 8 | -------------------------------------------------------------------------------- /db/data/scp.cloud.Incidents.csv: -------------------------------------------------------------------------------- 1 | identifier;ID;title;category_code;priority_code;incidentStatus_code;description;assignedIndividual_id 2 | inc_0001;2feec9ec-c192-48c6-8971-e3c4838cb861;Password Problem;security;2_medium;new;Unable to access corporate strategy ppt;067460c5-196c-4783-9563-ede797399da8 3 | inc_0002;919f1a94-0281-4226-ad3a-9148af4cb5d2;Password Reset;security;2_medium;new;unable to reset password;efec3e9f-ceea-4d17-80a7-50073f71c322 4 | inc_0003;f1c73988-bc83-4b5b-8169-80a946852c9a;Phishing Mail;software;3_low;new;Clicked a link in a phishing mail, entered user and password;efec3e9f-ceea-4d17-80a7-50073f71c323 5 | inc_0004;4e507caf-c53d-445b-abf9-341839aec969;Latest Antivirus App;software;3_low;assigned;Unable to update to most current version;efec3e9f-ceea-4d17-80a7-50073f71c324 6 | inc_0005;82165023-8db0-4a82-89df-a6bd6665b11a;Phone will not start;hardware;2_medium;new;Unable to start mobile phone;efec3e9f-ceea-4d17-80a7-50073f71c325 7 | inc_0006;9e4f49cf-9ffb-499d-8813-1a2ed8b98605;Laptop Screen Cracked;hardware;1_high;assigned;Laptop Screen Broken;efec3e9f-ceea-4d17-80a7-50073f71c322 8 | inc_0007;6cf360ec-2dc5-40b9-b782-4b8a8b488dad;Mobile Phone not charging;hardware;3_low;new;Mobile phone not charging via USB;efec3e9f-ceea-4d17-80a7-50073f71c323 9 | inc_0008;7cf360ec-2dc5-40b9-b782-4b8a8b488dad;USB stick found;security;2_medium;new;Plugged it to my workstation to see what it contains, then my system dumped. Fear that was a bad idea;efec3e9f-ceea-4d17-80a7-50073f71c324 10 | inc_0009;8cf360ec-2dc5-40b9-b782-4b8a8b488dad;Laptop stolen;hardware;2_medium;assigned;My laptop was gone after lunch. Passwort note was sticking below;efec3e9f-ceea-4d17-80a7-50073f71c325 11 | inc_0010;9cf360ec-2dc5-40b9-b782-4b8a8b488dad;Virus Alert;software;1_high;in process;Virus alert after installing latest updates;067460c5-196c-4783-9563-ede797399da8 12 | inc_0011;1df360ec-2dc5-40b9-b782-4b8a8b488dad;Office phone gives echoes;telephony;1_high;on hold;Was my phone hacked? When having a call I hear echoes of my own voice and strange breathing sounds;efec3e9f-ceea-4d17-80a7-50073f71c323 13 | inc_0012;2df360ec-2dc5-40b9-b782-4b8a8b488dad;VPN access not working;software;2_medium;new;I am not able to access corporate network via VPN;067460c5-196c-4783-9563-ede797399da8 -------------------------------------------------------------------------------- /db/data/scp.cloud.Individual.csv: -------------------------------------------------------------------------------- 1 | id 2 | 067460c5-196c-4783-9563-ede797399da8 3 | efec3e9f-ceea-4d17-80a7-50073f71c322 4 | efec3e9f-ceea-4d17-80a7-50073f71c323 5 | efec3e9f-ceea-4d17-80a7-50073f71c324 6 | efec3e9f-ceea-4d17-80a7-50073f71c325 -------------------------------------------------------------------------------- /db/data/scp.cloud.Priority.csv: -------------------------------------------------------------------------------- 1 | code;name;descr 2 | 3_low;Low; 3 | 2_medium;Medium; 4 | 1_high;High; 5 | -------------------------------------------------------------------------------- /db/schema.cds: -------------------------------------------------------------------------------- 1 | namespace scp.cloud; 2 | //begin add using statement 3 | 4 | //end add using statement 5 | 6 | using { 7 | managed, 8 | cuid, 9 | sap.common 10 | } from '@sap/cds/common'; 11 | 12 | type Url : String; 13 | 14 | type TechnicalBooleanFlag : Boolean @( 15 | UI.Hidden, 16 | Core.Computed 17 | ); 18 | 19 | type TechnicalFieldControlFlag : Integer @( 20 | UI.Hidden, 21 | Core.Computed 22 | ); 23 | 24 | type Criticality : Integer @( 25 | UI.Hidden, 26 | Core.Computed 27 | ); 28 | 29 | type Identifier : String(100)@(title : 'Identifier'); 30 | @cds.autoexpose 31 | abstract entity identified : cuid { 32 | identifier : Identifier not null; 33 | } 34 | 35 | //Bolded display of first table column values can be achieved by defining annotations Common.SemanticKey and 36 | //Common.TextArrangement for the entities key and referring to a 'human-readable' identifier to be displayed instead. 37 | 38 | annotate identified with @( 39 | Common.SemanticKey : [identifier], 40 | UI.Identification : [{Value : identifier}] 41 | ) { 42 | 43 | ID @Common : { 44 | Text : identifier, 45 | TextArrangement : #TextOnly 46 | 47 | }; 48 | } 49 | entity Incidents : managed, identified { 50 | title : String(50) @title : '{i18n>Title}'; 51 | category : Association to one Category @title : '{i18n>Category}'; 52 | priority : Association to one Priority @title : '{i18n>Priority}'; 53 | incidentStatus : Association to one IncidentStatus @title : '{i18n>IncidentStatus}'; 54 | description : String(1000) @title : '{i18n>IncidentDescription}'; 55 | assignedIndividual : Association to one Individual; 56 | incidentFlow : Association to many IncidentFlow 57 | on incidentFlow.incident = $self; 58 | incidentProcessTimeline : Association to many IncidentProcessTimeline 59 | on incidentProcessTimeline.incident = $self; 60 | isDraft : TechnicalBooleanFlag not null default false; 61 | identifierFieldControl : TechnicalFieldControlFlag not null default 7; // 7 = #Mandatory; 62 | } 63 | 64 | entity IncidentFlow : managed { 65 | key id : UUID; 66 | processStep : String(30)@title : '{i18n>ProcessStep}'; 67 | stepStatus : String(10)@title : '{i18n>ProcessStepStatus}'; 68 | criticality : Integer; 69 | stepStartDate : Date @title : '{i18n>StepStartDate}'; 70 | stepEndDate : Date @title : '{i18n>StepEndDate}'; 71 | @assert.integrity : false 72 | incident : Association to Incidents; 73 | } 74 | 75 | entity IncidentProcessTimeline : managed { 76 | key id : UUID; 77 | text : String; 78 | type : String; 79 | startTime : DateTime; 80 | endTime : DateTime; 81 | @assert.integrity : false 82 | incident : Association to Incidents; 83 | } 84 | 85 | entity Individual : managed { 86 | key id : UUID; 87 | //Begin add additional properties 88 | 89 | //End add additional properties 90 | @assert.integrity : false 91 | Incidents : Association to many Incidents 92 | on Incidents.assignedIndividual = $self; 93 | } 94 | 95 | entity IncidentsCodeList : common.CodeList { 96 | key code : String(20); 97 | } 98 | 99 | entity Category : IncidentsCodeList {} 100 | 101 | entity Priority : IncidentsCodeList { 102 | criticality : Criticality not null default 3; 103 | } 104 | 105 | entity IncidentStatus : IncidentsCodeList {} 106 | 107 | //add associations to external entities 108 | -------------------------------------------------------------------------------- /default-env.json: -------------------------------------------------------------------------------- 1 | { 2 | "VCAP_SERVICES": { 3 | "s4-hana-cloud": [{ 4 | "label": "s4-hana-cloud", 5 | "provider": null, 6 | "plan": "api-access", 7 | "name": "teched-2020", 8 | "tags": ["s4-hana-cloud"], 9 | "instance_name": "teched-2020", 10 | "binding_name": null, 11 | "credentials": { 12 | "Type": "HTTP", 13 | "User": "XXXXXXXXXXXXXXXXXXXXXXXXX", 14 | "Authentication": "BasicAuthentication", 15 | "WebIDEEnabled": "true", 16 | "ProxyType": "Internet", 17 | "URL": "https://myXXXXX-api.s4hana.ondemand.com/sap/opu/odata/sap/API_BUSINESS_PARTNER", 18 | "Name": "teched-2020", 19 | "Password": "XXXXXXXXXXXXXXXXXXXXXXXXX" 20 | }, 21 | "syslog_drain_url": null, 22 | "volume_mounts": [] 23 | }] 24 | } 25 | } -------------------------------------------------------------------------------- /exercises/2020-12 SAP_TechEd_2020_SAP_Fiori_elements_SID1120 (IIS360).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/2020-12 SAP_TechEd_2020_SAP_Fiori_elements_SID1120 (IIS360).pdf -------------------------------------------------------------------------------- /exercises/ex0/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started - Setting up your Development Environment 2 | 3 | Welcome to the workshop 'Creating Simple Fiori elements apps with OData V4'.\ 4 | This workshop will guide you step-by-step through the process of creating a Fiori elements floorplans for OData V4 app.\ 5 | Based on a SAP Cloud Application Programming Model service equipped with basic UI annotations, you will learn how to generate and enhance a\ 6 | List Report Object Page Fiori elements application with the help of Fiori tools and CDS annotation modelling. 7 | 8 | ## Setting up Business Application Studio in an SAP Cloud Platform Trial Account 9 | 10 | If you don't have an SAP Cloud Platform account already, you can create your own [here](https://www.sap.com/products/cloud-platform/get-started.html). 11 | 12 | ### New Trial Users 13 | 14 | After having registered your new user, start your trial via [this link](https://account.hanatrial.ondemand.com/register)\ 15 | At first time log in, you'll be asked to select your preferred region. 16 | This will start the set up of your account. 17 | 18 | ![Trial Setup](../ex0/images/00_00_0010.png) 19 | 20 | Your subaccount, org and space is created automatically, along with the necessary role configurations and subscriptions.\ 21 | When done, the subaccount overview page is shown. 22 | 23 | ### Existing Trial Users 24 | 25 | In your subaccount, choose 'Subscriptions' in the left-hand navigation.\ 26 | Choose 'SAP Business Application Studio' in the list of available subscriptions.\ 27 | Choose 'Subscribe'.\ 28 | Navigate back to your subaccount overview page. 29 | 30 | ### Accessing SAP Business Application Studio 31 | 32 | Click on the Quick Tool Access icon **SAP Business Application Studio**. 33 | 34 | ![Welcome SCP Trial](../ex0/images/00_00_0020.png) 35 | 36 | ## Creating the Development Space 37 | 38 | Click on the button **Create Dev Space**. 39 | 40 | ![Create Dev Space](../ex0/images/00_00_0030.png) 41 | 42 | Enter a name for your development space and select application profile **Full Stack Cloud Application**. 43 | 44 | ![Select Profile](../ex0/images/00_00_0040.png) 45 | 46 | In the lower right corner of the page press button **Create Dev Space**. 47 | 48 | ![confirm](../ex0/images/00_00_0050.png)
49 | 50 | Once your development space has status running, click on the development space name to open it. 51 | 52 | ![enter dev space](../ex0/images/00_00_0060.png) 53 | 54 | ## Getting the Sample Scenario 55 | 56 | Get the GitHub repository clone Url from the repository's [landing page](https://github.com/SAP-samples/teched2020-IIS360).\ 57 | Click on button **Code** (1), then click icon (2). 58 | 59 | ![copy link](../ex0/images/00_00_0070.png) 60 | 61 | In the dev space, you will see a **Welcome Page**.\ 62 | Click on tile **Clone from Git**. 63 | 64 | ![Click on link "Clone from Git"](../ex0/images/click-clone-from-git.png) 65 | 66 | Alternatively, you can go via menu **View->Find Command...** and search for command **git clone**. 67 | 68 | ![command git clone](../ex0/images/cloneCommand.png) 69 | 70 | Paste the repository link into the input field. 71 | 72 | ```abap 73 | https://github.com/SAP-samples/teched2020-IIS360.git 74 | ``` 75 | 76 | ![Enter the github repository URL](../ex0/images/enter-github-repository.png) 77 | 78 | When the cloning is finished, open a workspace by clicking the button in the project explorer 79 | 80 | ![open workspace](../ex0/images/00_00_0065.png) 81 | 82 | Select folder **teched2020-IIS360** and click **Open**. This will restart SAP Business Application Studio and show the selected workspace folder content in the explorer pane. 83 | 84 | ![select ws folder](../ex0/images/00_00_0066.png) 85 | 86 | (3) Open a new terminal via the header menu. 87 | 88 | ![new terminal](../ex0/images/00_00_0080.png) 89 | 90 | In the terminal window, make sure that the command line prompt shows folder **teched2020-IIS360**. 91 | 92 | ![command line prompt](../ex0/images/00_00_0081.png) 93 | 94 | Type the following commands and confirm with return: 95 | 96 | - **npm install** (this installs all node modules as defined in the projects package.json) 97 | - **cds w** (this compiles the service and runs it in watch mode) 98 | 99 | (4) Click button **Expose and Open** on the appearing dialog 100 | 101 | ![expose button](../ex0/images/00_00_0110.png) 102 | 103 | You can now provide an alias for the exposed port.\ 104 | (5)Enter 'preview' in the input field. Confirm with 'Enter'. 105 | 106 | ![SAP Business Application Studio - Google Chrome](../ex0/images/00_00_0120.png) 107 | 108 | A browser is opened.\ 109 | (6) Click the **$metadata** link to get the OData services metadata shown. 110 | 111 | ![metadata](../ex0/images/00_00_0130.png) 112 | 113 | ## Reopen the Exposed Port 114 | 115 | If you closed the preview browser tab, you can reopen it by applying the following steps. 116 | 117 | (7) Click **View -> Find Command...**. 118 | 119 | ![SAP Business Application Studio - Google Chrome](images/img_039.png) 120 | 121 | (8) Enter **port** in the dialogs input field to filter the available commands. 122 | 123 | ![SAP Business Application Studio - Google Chrome](images/img_039a.png) 124 | 125 | (9) Select ![](images/fieldicon03.png) . 126 | 127 | ![SAP Business Application Studio - Google Chrome](images/img_040.png) 128 | 129 | (10) A list with exposed ports is shown. Selecting one opens up a new browser tab. 130 | 131 | ![SAP Business Application Studio - Google Chrome](images/img_041.png) 132 | 133 | ## Summary 134 | 135 | With the setup procedure done, you now have completed: 136 | - setting up the SAP Cloud Platform trial account 137 | - Access to SAP Business Application Studio 138 | - Creation of your development space 139 | - Setting up the sample OData V4 service in SAP Business Application Studio 140 | 141 | Continue to - [Exercise 1 - Generating an SAP Fiori Elements App](../ex1/README.md) 142 | -------------------------------------------------------------------------------- /exercises/ex0/images/00_00_0010.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/00_00_0010.png -------------------------------------------------------------------------------- /exercises/ex0/images/00_00_0020.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/00_00_0020.png -------------------------------------------------------------------------------- /exercises/ex0/images/00_00_0030.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/00_00_0030.png -------------------------------------------------------------------------------- /exercises/ex0/images/00_00_0040.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/00_00_0040.png -------------------------------------------------------------------------------- /exercises/ex0/images/00_00_0050.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/00_00_0050.png -------------------------------------------------------------------------------- /exercises/ex0/images/00_00_0060.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/00_00_0060.png -------------------------------------------------------------------------------- /exercises/ex0/images/00_00_0065.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/00_00_0065.png -------------------------------------------------------------------------------- /exercises/ex0/images/00_00_0066.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/00_00_0066.png -------------------------------------------------------------------------------- /exercises/ex0/images/00_00_0070.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/00_00_0070.png -------------------------------------------------------------------------------- /exercises/ex0/images/00_00_0080.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/00_00_0080.png -------------------------------------------------------------------------------- /exercises/ex0/images/00_00_0081.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/00_00_0081.png -------------------------------------------------------------------------------- /exercises/ex0/images/00_00_0110.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/00_00_0110.png -------------------------------------------------------------------------------- /exercises/ex0/images/00_00_0120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/00_00_0120.png -------------------------------------------------------------------------------- /exercises/ex0/images/00_00_0130.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/00_00_0130.png -------------------------------------------------------------------------------- /exercises/ex0/images/click-clone-from-git.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/click-clone-from-git.png -------------------------------------------------------------------------------- /exercises/ex0/images/cloneCommand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/cloneCommand.png -------------------------------------------------------------------------------- /exercises/ex0/images/enter-github-repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/enter-github-repository.png -------------------------------------------------------------------------------- /exercises/ex0/images/fieldicon03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/fieldicon03.png -------------------------------------------------------------------------------- /exercises/ex0/images/fieldicon04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/fieldicon04.png -------------------------------------------------------------------------------- /exercises/ex0/images/img_039.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/img_039.png -------------------------------------------------------------------------------- /exercises/ex0/images/img_039a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/img_039a.png -------------------------------------------------------------------------------- /exercises/ex0/images/img_040.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/img_040.png -------------------------------------------------------------------------------- /exercises/ex0/images/img_041.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex0/images/img_041.png -------------------------------------------------------------------------------- /exercises/ex1/README.md: -------------------------------------------------------------------------------- 1 | # Exercise 1 - Generating an SAP Fiori Elements App 2 | 3 | In this exercise, you will create a SAP Fiori elements application of type List Report Object Page, based on the given 4 | SAP Cloud Application Programming Model sample service. 5 | For this you will make usage of the SAP Fiori tools Application Generator. 6 | 7 | ## Exercise 1.1 Using the SAP Fiori tools Application Generator 8 | 9 | (1) In SAP Business Application Studio, invoke the Command Palette\ 10 | (View -\>Find Command... or ctrl+shift+p(Win)/cmd+shift+p(Mac))\ 11 | and type **Fiori: Open Application Generator** in the search field.\ 12 | Choose the list entry. 13 | 14 | ![](./images/image1.png) 15 | 16 | Note that opening the app generator for the first time might take some time until the generator templates are initially loaded. 17 | 18 | (2) Click on tile **SAP Fiori elements application**.\ 19 | (3) Click ![](./images/image4.png). 20 | 21 | ![](./images/image3.png) 22 | 23 | (4) In the template selection, click on the tile **List Report Object Page**. 24 | 25 | (5) Click ![](./images/image6.png). 26 | 27 | ![](./images/image5.png) 28 | 29 | (6) In the step **Datasource and Service Selection**, select ![](./images/image8.png). 30 | 31 | ![](./images/image7.png) 32 | 33 | (7) Click the **Browse for folder** icon to select your projects folder. 34 | 35 | ![](./images/image9.png) 36 | 37 | (8) Open the folder hierarchy path **home-\>user-\>projects**. 38 | 39 | Click ![](./images/image11.png). 40 | 41 | (9) Click ![](./images/image12.png). 42 | 43 | ![](./images/image10.png) 44 | 45 | (10) In the OData service drop down, select ![](./images/image14.png) 46 | 47 | (11) Click ![](./images/image6.png). 48 | 49 | ![](./images/image13.png) 50 | 51 | (12) In the Entity Selection drop down, select **Incidents** as main entity.\ 52 | The properties of this entity will be used for display of data on List 53 | Report, showing data from the entity collection.\ 54 | Leave value for drop down **Navigation Entity** as is (**None**). 55 | 56 | ![](./images/image15.png) 57 | 58 | (13) Click ![](./images/image6.png). 59 | 60 | Finally add some attributes to the application project.\ 61 | The **Module name** and the **Application namespace** should be as shown below to keep aligned with the following exercises.\ 62 | (14) Enter as module name **incidents** (module name has to match exactly for 63 | some of the subsequent exercises to work properly) 64 | 65 | (15) Choose an App Title, for example **My Incidents** 66 | 67 | (16) Enter as namespace **sap.fe.demo** (namespace has to match exactly for 68 | some of the subsequent exercises to work properly) 69 | 70 | ![](./images/image17.png) 71 | 72 | (17) Select **Yes** in order to configure advanced options.\ 73 | In drop down **UI5 version**, select **1.84.1**.\ 74 | **Please note**: in order to have some of the subsequent exercises working properly, don't choose **Latest** as UI5 version since it might still point to a version below 1.84 during TechEd2020. 75 | 76 | (18) Select **Yes** in order to **skip generation of an 77 | additional associated annotation.cds file**.\ 78 | The sample service already provides a basic set of UI annotations with file **app/annotations.cds**. 79 | 80 | ![](./images/image18.png) 81 | 82 | **Please note**: in case you don't set the skip annotation generation flag in step (18) before finishing the app generation, you will have to manually adjust the rewritten **using** statement\ 83 | in file **app/index.cds** so that it points again to preconfigured file **app/annotations.cds**, and manually delete the additional generated annotations.cds file in folder **app/incidents**. 84 | 85 | (19) Click ![](./images/image21.png). 86 | 87 | This will start the app generation.\ 88 | When done, a dialog appears asking for opening the app in a new workspace.\ 89 | Close the dialog by clicking the cross icon in the top right corner since the workspace root should not be switched to the newly created app folder inside the sample service project. 90 | 91 | ![close new ws](../ex1/images/image181.png) 92 | 93 | You can now review the generated artifacts in the Explorer View of SAP Business Application Studio.\ 94 | The generated artifacts are located in folder **app/incidents**.\ 95 | As mentioned, check that the **using** statement in file **app/index.cds** still points to the preconfigured annotations file as shown below. 96 | 97 | ![](./images/image18a.png) 98 | 99 | ## Exercise 1.2 Starting the App 100 | 101 | After completing these steps you will have started and tested the generated app. 102 | 103 | (20) Switch to the service preview browser tab and refresh it.\ 104 | Click on the served path.\ 105 | If your preview browser tab had been closed, you can relaunch it by following the steps 'Reopening the exposed ports' as described [here](../ex0#reopening-the-exposed-port). 106 | 107 | 108 | ![](./images/image22.png) 109 | 110 | (21) Click on app tile **My Incidents .** 111 | 112 | ![](./images/image24.png) 113 | 114 | (22) Click ![](./images/image26.png) to trigger selection.\ 115 | You can use the selection fields in order to set a filter. If collapsed, you can expand the selection field area by clicking the small chevron icon on top. 116 | 117 | ![](./images/image25.png) 118 | 119 | (23) Click on a list item to navigate to the Object Page. 120 | 121 | ![](./images/image27.png) 122 | 123 | 124 | On the Object Page, you can click **Edit** which creates a draft version of the displayed object and sets the UI to edit mode. 125 | 126 | ![](./images/image28.png) 127 | 128 | Changing input field values will automatically update the draft when input field focus is changed, or when you navigate back to the List Report.\ 129 | The draft is saved back to the active instance by pressing **Save** on the bottom of the Object Page. 130 | 131 | ![](./images/image28a.png) 132 | 133 | For instances in edit mode, the List Report shows a draft indicator in the corresponding line item.\ 134 | You can create a new draft on the List Report by clicking button **Create**. 135 | 136 | ![](./images/image27a.png) 137 | 138 | 139 | 140 | 141 | ## Summary 142 | 143 | You've now successfully generated and tested the Fiori elements app. 144 | 145 | Continue to - [Exercise 2 - Switch to Flexible Column Layout](../ex2/README.md) -------------------------------------------------------------------------------- /exercises/ex1/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image1.png -------------------------------------------------------------------------------- /exercises/ex1/images/image10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image10.png -------------------------------------------------------------------------------- /exercises/ex1/images/image11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image11.png -------------------------------------------------------------------------------- /exercises/ex1/images/image12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image12.png -------------------------------------------------------------------------------- /exercises/ex1/images/image13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image13.png -------------------------------------------------------------------------------- /exercises/ex1/images/image14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image14.png -------------------------------------------------------------------------------- /exercises/ex1/images/image15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image15.png -------------------------------------------------------------------------------- /exercises/ex1/images/image16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image16.png -------------------------------------------------------------------------------- /exercises/ex1/images/image17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image17.png -------------------------------------------------------------------------------- /exercises/ex1/images/image18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image18.png -------------------------------------------------------------------------------- /exercises/ex1/images/image181.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image181.png -------------------------------------------------------------------------------- /exercises/ex1/images/image18a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image18a.png -------------------------------------------------------------------------------- /exercises/ex1/images/image19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image19.png -------------------------------------------------------------------------------- /exercises/ex1/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image2.png -------------------------------------------------------------------------------- /exercises/ex1/images/image20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image20.png -------------------------------------------------------------------------------- /exercises/ex1/images/image21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image21.png -------------------------------------------------------------------------------- /exercises/ex1/images/image22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image22.png -------------------------------------------------------------------------------- /exercises/ex1/images/image23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image23.png -------------------------------------------------------------------------------- /exercises/ex1/images/image24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image24.png -------------------------------------------------------------------------------- /exercises/ex1/images/image25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image25.png -------------------------------------------------------------------------------- /exercises/ex1/images/image26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image26.png -------------------------------------------------------------------------------- /exercises/ex1/images/image27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image27.png -------------------------------------------------------------------------------- /exercises/ex1/images/image27a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image27a.png -------------------------------------------------------------------------------- /exercises/ex1/images/image28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image28.png -------------------------------------------------------------------------------- /exercises/ex1/images/image28a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image28a.png -------------------------------------------------------------------------------- /exercises/ex1/images/image29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image29.png -------------------------------------------------------------------------------- /exercises/ex1/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image3.png -------------------------------------------------------------------------------- /exercises/ex1/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image4.png -------------------------------------------------------------------------------- /exercises/ex1/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image5.png -------------------------------------------------------------------------------- /exercises/ex1/images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image6.png -------------------------------------------------------------------------------- /exercises/ex1/images/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image7.png -------------------------------------------------------------------------------- /exercises/ex1/images/image8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image8.png -------------------------------------------------------------------------------- /exercises/ex1/images/image9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex1/images/image9.png -------------------------------------------------------------------------------- /exercises/ex2/README.md: -------------------------------------------------------------------------------- 1 | # Exercise 2 - Switching to Flexible Column Layout 2 | 3 | In this exercise, we will switch the page layout to flexible column layout by making usage of the SAP Fiori tool Page Map.\ 4 | Flexible column layout splits the screen into several areas, allowing faster navigation between the List Report line items. 5 | 6 | (1) In the SAP Business Application Studio explorer pane, right-clicking on ![](./images/image2.png) 7 | opens a shortcut menu.\ 8 | Alternatively, choose **Fiori: Show Page Map** via Command Palette. 9 | 10 | ![](./images/image1.png) 11 | 12 | (2) Click ![](./images/image4.png). 13 | 14 | ![](./images/image3.png) 15 | 16 | (3) The Page Map is opened in a separate tab, showing pages and navigations.\ 17 | If not already shown, open up pane **Global Page Settings**\ 18 | by clicking icon ![](./images/image6.png) in the top right corner of the Page Map. 19 | 20 | 21 | ![](./images/image5.png) 22 | 23 | (4) Click radio button ![](./images/image8.png) for **Flexible Column Layout**. 24 | 25 | ![](./images/image7.png) 26 | 27 | (5) Select **Mid-Expanded** for options 28 | 29 | * **Select Layout for 2 Columns** 30 | * **Select Layout for 3 Columns** 31 | 32 | 33 | ![](./images/image9.png) 34 | 35 | (6) Click ![](./images/image12.png). 36 | 37 | ![](./images/image11.png) 38 | 39 | (7) Switch to the preview browser tab. If the app is still open from the previous exercise, navigate back to the Fiori Launch Page and refresh the browser.\ 40 | Now start the app again by clicking the launchpage icon. In the List Report, select a line item to open Object Page. 41 | 42 | ![](./images/image13.png) 43 | 44 | (8) The page is shown in flexible column layout.\ 45 | Select another List Report line item in order to display its details in the Object Page. 46 | 47 | ![](./images/image15.png) 48 | 49 | (9) In the top right corner of the Object Page, click icon **Enter Full Screen** ![](./images/image18.png). 50 | 51 | ![](./images/image17.png) 52 | 53 | The List Report column is closed, and the Object Page is shown full screen. 54 | 55 | ![](./images/image19.png) 56 | 57 | You can toggle back to split layout by clicking icon **Exit Full Screen** ![](./images/image20.png). 58 | 59 | ## Summary 60 | 61 | You've now enabled flexible column layout (FCL) for the app. FCL is supported for up to 2 navigation levels, splitting the screen into three areas. 62 | 63 | Continue to - [Exercise 3 - Configuring the App ](../ex3/README.md) -------------------------------------------------------------------------------- /exercises/ex2/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image1.png -------------------------------------------------------------------------------- /exercises/ex2/images/image10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image10.png -------------------------------------------------------------------------------- /exercises/ex2/images/image11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image11.png -------------------------------------------------------------------------------- /exercises/ex2/images/image12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image12.png -------------------------------------------------------------------------------- /exercises/ex2/images/image13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image13.png -------------------------------------------------------------------------------- /exercises/ex2/images/image14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image14.png -------------------------------------------------------------------------------- /exercises/ex2/images/image15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image15.png -------------------------------------------------------------------------------- /exercises/ex2/images/image16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image16.png -------------------------------------------------------------------------------- /exercises/ex2/images/image17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image17.png -------------------------------------------------------------------------------- /exercises/ex2/images/image18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image18.png -------------------------------------------------------------------------------- /exercises/ex2/images/image19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image19.png -------------------------------------------------------------------------------- /exercises/ex2/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image2.png -------------------------------------------------------------------------------- /exercises/ex2/images/image20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image20.png -------------------------------------------------------------------------------- /exercises/ex2/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image3.png -------------------------------------------------------------------------------- /exercises/ex2/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image4.png -------------------------------------------------------------------------------- /exercises/ex2/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image5.png -------------------------------------------------------------------------------- /exercises/ex2/images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image6.png -------------------------------------------------------------------------------- /exercises/ex2/images/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image7.png -------------------------------------------------------------------------------- /exercises/ex2/images/image8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image8.png -------------------------------------------------------------------------------- /exercises/ex2/images/image9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex2/images/image9.png -------------------------------------------------------------------------------- /exercises/ex3/README.md: -------------------------------------------------------------------------------- 1 | # Exercise 3 - Configuring the App 2 | 3 | In this exercise, we will configure the behaviour of the app using the SAP Fiori Page Map. 4 | 5 | ## Exercise 3.1 Enable Data Load During Start of the App 6 | 7 | When starting the app, per default the user has to press the 8 | **Go** button in order to trigger the selection.\ 9 | This allows defining filters before the query is executed.\ 10 | The default behaviour can be changed in a way that selection is immediately 11 | triggered when the app is started. 12 | 13 | In the SAP Business Application Studio, open the SAP Fiori Page Map (via Context Menu on the folder **app** or via **View -> Command Palette...**) 14 | 15 | (1) On the tile **List Report**, click icon **Configure 16 | Page** 17 | 18 | ![](./images/image1.png). 19 | 20 | (2) In the page editor, click 21 | ![](./images/image4.png). 22 | 23 | ![SAP Business Application Studio - Google 24 | Chrome](./images/image3.png) 25 | 26 | (3) In the drop down box **Initial Load**, select 27 | **True**.\ 28 | The configuration is automatically saved. 29 | 30 | ![SAP Business Application Studio - Google 31 | Chrome](./images/image5.png) 32 | 33 | Navigate back to the Fiori launch 34 | page and refresh the browser. 35 | Data will now be immediately loaded in the List Report page when starting the app. 36 | 37 | ## Exercise 3.2 Enable Control Level Variant Management 38 | 39 | The List Report pages offers per default page variant management.\ 40 | With it, all personalizations of visible selection fields and table columns can be 41 | saved as a presentation variant.\ 42 | With the Page Map, you can switch to control level variant management. 43 | This allows separate management of filter and table variants on the List Report page.\ 44 | (4) In the Page Editor properties for ListReport, open drop down box **Variant Management** and select **Control**. 45 | 46 | ![SAP Business Application Studio - Google 47 | Chrome](./images/image7.png) 48 | 49 | Refresh the preview browser tab. You now can manage the filter (5) and table variants (6) separately. 50 | 51 | ![](./images/image9.png) 52 | 53 | ## Exercise 3.3 Configure Editable Object Page Header 54 | 55 | When in edit mode, header fields are per default shown as editable 56 | input fields.\ 57 | This might not be wanted in case these fields are additionally displayed in another section of the Object Page (7)(8). 58 | 59 | ![](./images/image10.png) 60 | 61 | In order to prevent that, you can set the header to display only during editing.\ 62 | Switch back to Business Application Studio.\ 63 | (9) Click ![](./images/image12.png) icon to get back to the Page Map overview. 64 | 65 | ![SAP Business Application Studio - Google 66 | Chrome](./images/image11.png) 67 | 68 | (10) In the Page Map overview, on the tile **Object Page** click the **Configure 69 | Page** icon![](./images/image14.png) 70 | 71 | ![SAP Business Application Studio - Google 72 | Chrome](./images/image13.png) 73 | 74 | (11) Click ![](./images/image16.png) to display the Object Page header configuration properties. 75 | 76 | ![SAP Business Application Studio - Google 77 | Chrome](./images/image15.png) 78 | 79 | (12) Open drop down box **Editable Header Content** and 80 | set to **False**. 81 | 82 | ![SAP Business Application Studio - Google 83 | Chrome](./images/image17.png) 84 | 85 | (13) Switch back to the preview browser tab.\ 86 | In case the UI was in edit mode from the previous exercise, navigate back to the Fiori Launch Page and refresh the browser. 87 | In the Object Page, click ![](./images/image20.png) 88 | 89 | ![](./images/image19.png) 90 | 91 | (14) The header area now stays in display mode when the Object Page is in edit mode. 92 | 93 | (15) Click ![](./images/image22.png)to switch back to display mode. 94 | 95 | ![](./images/image21.png) 96 | 97 | ## Exercise 3.4 Tab Based Section Layout 98 | 99 | Per default, all the sections in the Object Page are displayed one 100 | below the other. 101 | 102 | You can configure to have them displayed in separate tabs. 103 | 104 | Go back to Business Application Studio. 105 | 106 | (16) In the Page Editor of the Object Page, click 107 | ![](./images/image24.png) 108 | 109 | ![SAP Business Application Studio - Google 110 | Chrome](./images/image23.png) 111 | 112 | (17) In the drop down box for **Section Layout**, select **Tabs** 113 | 114 | ![SAP Business Application Studio - Google 115 | Chrome](./images/image25.png) 116 | 117 | (18) Refresh the app preview browser tab. Each Object Page section is 118 | now displayed in a separate tab. 119 | 120 | ![](./images/image27.png) 121 | 122 | Tab based layout helps to reduce the need for scrolling the page in case of many Object Page sections.\ 123 | In the sample scenario there are currently only 2 content sections, so you can switch back to page based section layout. 124 | 125 | ## Summary 126 | 127 | By using the SAP Fiori Page Map, you've now configured initial load during app start, editable header content, control level variant management and tab based section layout. 128 | 129 | Continue to - [Exercise 4 - Adding a Custom Page](../ex4/README.md) 130 | -------------------------------------------------------------------------------- /exercises/ex3/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image1.png -------------------------------------------------------------------------------- /exercises/ex3/images/image10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image10.png -------------------------------------------------------------------------------- /exercises/ex3/images/image11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image11.png -------------------------------------------------------------------------------- /exercises/ex3/images/image12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image12.png -------------------------------------------------------------------------------- /exercises/ex3/images/image13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image13.png -------------------------------------------------------------------------------- /exercises/ex3/images/image14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image14.png -------------------------------------------------------------------------------- /exercises/ex3/images/image15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image15.png -------------------------------------------------------------------------------- /exercises/ex3/images/image16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image16.png -------------------------------------------------------------------------------- /exercises/ex3/images/image17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image17.png -------------------------------------------------------------------------------- /exercises/ex3/images/image18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image18.png -------------------------------------------------------------------------------- /exercises/ex3/images/image19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image19.png -------------------------------------------------------------------------------- /exercises/ex3/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image2.png -------------------------------------------------------------------------------- /exercises/ex3/images/image20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image20.png -------------------------------------------------------------------------------- /exercises/ex3/images/image21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image21.png -------------------------------------------------------------------------------- /exercises/ex3/images/image22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image22.png -------------------------------------------------------------------------------- /exercises/ex3/images/image23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image23.png -------------------------------------------------------------------------------- /exercises/ex3/images/image24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image24.png -------------------------------------------------------------------------------- /exercises/ex3/images/image25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image25.png -------------------------------------------------------------------------------- /exercises/ex3/images/image26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image26.png -------------------------------------------------------------------------------- /exercises/ex3/images/image27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image27.png -------------------------------------------------------------------------------- /exercises/ex3/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image3.png -------------------------------------------------------------------------------- /exercises/ex3/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image4.png -------------------------------------------------------------------------------- /exercises/ex3/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image5.png -------------------------------------------------------------------------------- /exercises/ex3/images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image6.png -------------------------------------------------------------------------------- /exercises/ex3/images/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image7.png -------------------------------------------------------------------------------- /exercises/ex3/images/image8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image8.png -------------------------------------------------------------------------------- /exercises/ex3/images/image9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex3/images/image9.png -------------------------------------------------------------------------------- /exercises/ex4/README.md: -------------------------------------------------------------------------------- 1 | # Exercise 4 - Adding a Custom Page 2 | 3 | In this exercise, we will add a custom page to the app. 4 | 5 | ## Exercise 4.1 Copy Over the Sample Custom Page 6 | 7 | With the SAP Fiori tool **Page Map**, you can add additional Object Pages and custom pages to your app.\ 8 | For custom pages, you have the option of having new custom view controller artifacts generated,\ 9 | or, as we will do in this exercise, integrate an existing custom view in the navigation flow.\ 10 | For this, we will copy the sample artifacts to the webapp folder of the app. 11 | 12 | (1) In the project explorer, expand folder paths **app/incidents** and **app/test-resources**.\ 13 | In the folder **app/test-resources**, click and hold folder ![](./images/image2.png). 14 | 15 | (2) Drag & Drop the folder over to **app/incidents/webapp**.\ 16 | Alternatively, you can use the context menu to copy and paste the folder. 17 | 18 | ![](./images/image1.png) 19 | 20 | ## Exercise 4.2 Adding a Custom Page via SAP Fiori Page Map 21 | 22 | In SAP Business Application Studio, open the SAP Fiori page map (via Context Menu on the folder **app** or via **View -> Command Palette...**)\ 23 | (3) Click on the icon **Add New Page**. 24 | 25 | ![](./images/image4.png) 26 | 27 | Open the dropdown list **Select Page Type**.\ 28 | (5) Select entry ![](./images/image9.png). 29 | 30 | ![](./images/image8.png) 31 | 32 | (6) We want to navigate to the custom page from the table **Incident Flow** shown on the Object Page.\ 33 | Open the **Navigation** dropdown list. 34 | ![](./images/image10.png) 35 | 36 | (7) Select entry ![](./images/image13.png). 37 | 38 | ![](./images/image12.png) 39 | 40 | (8) As we want to use the prepared sample custom view, select radio button **Use Existing View**. 41 | 42 | ![](./images/image14.png) 43 | 44 | (9) In the dropdown **View Name**, the custom view **ProcessFlow** is automatically preselected. 45 | 46 | ![](./images/image16.png) 47 | 48 | (10) Click button ![](./images/image19.png). 49 | 50 | ![](./images/image18.png) 51 | 52 | (11) A success message toast ![](./images/image21.png) is shown.\ 53 | (12) The Page Map now shows an additional page node below the object 54 | page. 55 | 56 | ![](./images/image20.png) 57 | 58 | ## Exercise 4.3 Custom Page: Testing the App 59 | 60 | Switch to the preview browser tab and refresh.\ 61 | (13) Click on a list item in the table **Incident Process Flow**. 62 | 63 | ![](./images/image22.png) 64 | 65 | The custom page is opened to the right.\ 66 | (14) To expand the view, click on the icon **Expand the last column** ![](./images/image24.png). 67 | 68 | ![](./images/image23.png) 69 | 70 | The right page column is expanded. \ 71 | (15) The custom page title shows the process step title from the selected item of table Incident Process Flow via context model binding.\ 72 | (16) As the Object Page, the custom page offers the expand/collapse buttons for the flexible column layout. 73 | 74 | ![](./images/image25.png) 75 | 76 | ## Summary 77 | 78 | You've now successfully added a custom page by using the Page Map. 79 | 80 | Continue to - [Exercise 5 - Adding a Custom Section ](../ex5/README.md) 81 | -------------------------------------------------------------------------------- /exercises/ex4/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image1.png -------------------------------------------------------------------------------- /exercises/ex4/images/image10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image10.png -------------------------------------------------------------------------------- /exercises/ex4/images/image11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image11.png -------------------------------------------------------------------------------- /exercises/ex4/images/image12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image12.png -------------------------------------------------------------------------------- /exercises/ex4/images/image13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image13.png -------------------------------------------------------------------------------- /exercises/ex4/images/image14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image14.png -------------------------------------------------------------------------------- /exercises/ex4/images/image15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image15.png -------------------------------------------------------------------------------- /exercises/ex4/images/image16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image16.png -------------------------------------------------------------------------------- /exercises/ex4/images/image17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image17.png -------------------------------------------------------------------------------- /exercises/ex4/images/image18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image18.png -------------------------------------------------------------------------------- /exercises/ex4/images/image19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image19.png -------------------------------------------------------------------------------- /exercises/ex4/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image2.png -------------------------------------------------------------------------------- /exercises/ex4/images/image20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image20.png -------------------------------------------------------------------------------- /exercises/ex4/images/image21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image21.png -------------------------------------------------------------------------------- /exercises/ex4/images/image22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image22.png -------------------------------------------------------------------------------- /exercises/ex4/images/image23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image23.png -------------------------------------------------------------------------------- /exercises/ex4/images/image24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image24.png -------------------------------------------------------------------------------- /exercises/ex4/images/image25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image25.png -------------------------------------------------------------------------------- /exercises/ex4/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image3.png -------------------------------------------------------------------------------- /exercises/ex4/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image4.png -------------------------------------------------------------------------------- /exercises/ex4/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image5.png -------------------------------------------------------------------------------- /exercises/ex4/images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image6.png -------------------------------------------------------------------------------- /exercises/ex4/images/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image7.png -------------------------------------------------------------------------------- /exercises/ex4/images/image8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image8.png -------------------------------------------------------------------------------- /exercises/ex4/images/image9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex4/images/image9.png -------------------------------------------------------------------------------- /exercises/ex5/README.md: -------------------------------------------------------------------------------- 1 | # Exercise 5 - Adding a Custom Section 2 | 3 | In this exercise, we will add a custom section to the Object Page by using the SAP Fiori Page Map. 4 | 5 | ## Custom Sections Overview 6 | 7 | Custom sections offer the possibility of enhancing the Object Page with freestyle UI5 code.\ 8 | In this exercise, we will add a UI5 XML fragment showing a Gantt Chart to the Object Page. 9 | The Object Page provides its current model context to the custom section, allowing displaying data from the UI5 OData model via context binding. 10 | 11 | ## Exercise 5.1 Enhancing the Language Model 12 | 13 | For the title of the custom section to be shown on the Object Page, we want to use a property from the language model of the app.\ 14 | (1) Open file **app/incidents/webapp/i18n/i18n.properties**\ 15 | (2) Enter the following new property: 16 | 17 | ```js 18 | #XFLD 19 | MaxProcessingTime=Maximum Processing Time 20 | ``` 21 | 22 | ![](./images/image1.png) 23 | 24 | Save changes (**File->Save**). 25 | 26 | ## Exercise 5.2 Adding a Custom Section via Page Map 27 | 28 | (3) The sample scenario provides a prepared XML fragment in the folder **app/incidents/webapp/ext/fragment**\ 29 | (copied over in [Exercise 4.1](../ex4#exercise-41-copy-over-the-sample-custom-page)),\ 30 | along with a javaScript file where custom event handler code can be implemented. 31 | 32 | In the SAP Business Application Studio, open the SAP Fiori Page Map (via Context Menu on the folder **app** or via **View -> Command Palette...**)\ 33 | (4) On the SAP Fiori Page Map tile **Object Page**, click icon ![](./images/image5.png) (**Configure Page**.).\ 34 | ![](./images/image3.png) 35 | 36 | (5) In the Page Editor, click icon![](./images/image7.png) (**Add Custom Section**) in the top right corner of area **sections**. 37 | 38 | ![](./images/image6.png) 39 | 40 | (6) In the dialog **Add Custom Section**, enter into the field **Title** the language property added in [step 5.1.1](#exercise-511-enhancing-the-language-model) in the following format: 41 | 42 | ```js 43 | {i18n>MaxProcessingTime} 44 | ``` 45 | 46 | (7) Click radio button **Use Existing Fragment**. 47 | 48 | ![](./images/image8.png). 49 | 50 | Note that in field **Fragment Name** existing fragment **CustomSectionGantt** is automatically preselected. 51 | 52 | (8) Open the drop down **Target Facet/Section** and select **IncidentOverviewFacet**.\ 53 | In combination with the **Section Position** (we leave it to **After**), you define where the custom section should be located\ 54 | on the Object Page. 55 | 56 | (9) Click button ![](./images/image14.png) 57 | 58 | ![](./images/image13.png) 59 | 60 | (10) The page editor now shows an additional section. 61 | 62 | ![](./images/image15.png) 63 | 64 | (11) Switch to the preview browser tab and refresh. The custom section is shown.\ 65 | Selecting another list item in the List Report changes the Object Pages context binding and with it also the data shown in the Gantt chart. 66 | 67 | ![](./images/image16.png) 68 | 69 | ## Summary 70 | 71 | You've now added a custom section to the Object Page based on an XML fragment. 72 | 73 | Continue to - [Exercise 6 - Enhance the UI with Annotations ](../ex6/README.md) 74 | -------------------------------------------------------------------------------- /exercises/ex5/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex5/images/image1.png -------------------------------------------------------------------------------- /exercises/ex5/images/image13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex5/images/image13.png -------------------------------------------------------------------------------- /exercises/ex5/images/image14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex5/images/image14.png -------------------------------------------------------------------------------- /exercises/ex5/images/image15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex5/images/image15.png -------------------------------------------------------------------------------- /exercises/ex5/images/image16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex5/images/image16.png -------------------------------------------------------------------------------- /exercises/ex5/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex5/images/image2.png -------------------------------------------------------------------------------- /exercises/ex5/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex5/images/image3.png -------------------------------------------------------------------------------- /exercises/ex5/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex5/images/image4.png -------------------------------------------------------------------------------- /exercises/ex5/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex5/images/image5.png -------------------------------------------------------------------------------- /exercises/ex5/images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex5/images/image6.png -------------------------------------------------------------------------------- /exercises/ex5/images/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex5/images/image7.png -------------------------------------------------------------------------------- /exercises/ex5/images/image8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex5/images/image8.png -------------------------------------------------------------------------------- /exercises/ex6/README.md: -------------------------------------------------------------------------------- 1 | # Exercise 6 - Enhance the UI with Annotations 2 | 3 | In this exercise, we will enhance the UI by adding annotations. For each exercise, you will make usage of the CDS compilers 4 | code suggestion support for annotation modelling. 5 | 6 | **Please note:** In SAP Business Application Studio, some users experienced issues with the triggering keyboard shortcut for code suggestion not working (**ctrl+space**) .\ 7 | In such a case, you can assign a different shortcut in SAP Business Application Studio under **File->Settings->Open Keyboard Shortcuts** (shortcut command **Trigger Suggest**). 8 | 9 | ![](./images/image0.png) 10 | 11 | ## Exercise 6.1 Adding a Field Group 12 | 13 | After completing these steps you will have added a new content section to the Object Page.\ 14 | You will use annotation **FieldGroup** which represents a collection of different types of data fields.\ 15 | The field group annotation definition with the link to the different data field representation options can be found [here](https://github.com/SAP/odata-vocabularies/blob/master/vocabularies/UI.md#FieldGroupType). 16 | 17 | (1) In the SAP Business Application Studio explorer pane, open file **app/annotations.cds**. 18 | 19 | ![](./images/image1.png) 20 | 21 | (2) Place cursor in the section **'field group enhancement'** 22 | 23 | ![](./images/image3.png) 24 | 25 | Trigger the LSP support for annotation modelling by pressing keys **ctrl+space**.\ 26 | Filter the available menu entries by typing **field**.\ 27 | (3) In the popup menu, select **FieldGroup**. 28 | 29 | ![](./images/image4.png) 30 | 31 | The annotation is added along with its basic structural elements. The cursor is placed between 'FieldGroup' and ':' .\ 32 | Here you add a qualifier for the annotation which you later can refer to.\ 33 | (4)Type **#Admin** as qualifier. 34 | 35 | ![](./images/image6.png) 36 | 37 | Press tab to move cursor inside the curly brackets.\ 38 | Trigger LSP support (ctrl+space).\ 39 | (5)  Select **Property "Data"**.\ 40 | 41 | ![](./images/image7.png) 42 | 43 | The cursor is moved inside the collection brackets [].\ 44 | Trigger again LSP support (ctrl+ space).\ 45 | (6) Start typing in **datafield** to filter the list. Select **Record "DataField"**. 46 | 47 | ![](./images/image8.png) 48 | 49 | DataField record is added along with its required value, the cursor is placed inside the record {} after property **Value:**.\ 50 | Trigger again LSP support.\ 51 | Start typing in **created** to filter the list.\ 52 | (7) Select property ![](./images/image10.png). 53 | 54 | ![](./images/image9.png) 55 | 56 | (8) Place the cursor after the comma of record {}, and add additional DataField record with Value **'createdBy'** in the same way 57 | 58 | ![](./images/image11.png) 59 | 60 | The full annotation: 61 | 62 | ```js 63 | FieldGroup #Admin: { 64 | $Type:'UI.FieldGroupType', 65 | Data : [ 66 | { 67 | $Type:'UI.DataField', 68 | Value : createdAt, 69 | }, 70 | { 71 | $Type:'UI.DataField', 72 | Value : createdBy 73 | }, 74 | ] 75 | }, 76 | ``` 77 | 78 | ## Exercise 6.2 Adding a Reference Facet Annotation 79 | 80 | The different sections of the Object Pages content area are defined by so called **reference facet** annotations.\ 81 | You can group several reference facets in so called **collection facet** annotations.\ 82 | You will now add the field group **#Admin** you just created by referring to in a new reference facet inside the collection facet **IncidentOverviewFacet**. 83 | 84 | (9) Place cursor in the section **'reference facet enhancement'** 85 | 86 | ![](./images/image12.png) 87 | 88 | (10) Trigger LSP support (ctrl+space) and select ![](./images/image14.png). 89 | 90 | ![](./images/image13.png) 91 | 92 | The annotation is added along with its basic structural elements.\ 93 | (11) For property **'Target'**, place cursor inside quotes ' ' and trigger LSP support (ctrl+space). 94 | 95 | ![](./images/image15.png) 96 | 97 | (12) Select ![](./images/image17.png). 98 | 99 | ![](./images/image16.png) 100 | 101 | Press **Tab** key to move cursor to the Label property.\ 102 | (13) Type in **'{i18n\>AdminData}'** in quotes. This refers to a property defined in the language model definition file (db/_i18n/i18n.properties). Hovering the mouse over the value gives a preview of the underlying text. 103 | 104 | ![](./images/image19.png) 105 | 106 | Press **Tab** key to move cursor to ID property.\ 107 | (14) Type **'AdminDataFacet'** in quotes. Save changes. 108 | 109 | ![](./images/image20.png) 110 | 111 | The full annotation: 112 | ```js 113 | { 114 | $Type : 'UI.ReferenceFacet', 115 | Target : '@UI.FieldGroup#Admin', 116 | Label : '{i18n>AdminData}', 117 | ID : 'AdminDataFacet' 118 | } 119 | ``` 120 | 121 | Make sure that all changes are saved and that the service is running (Terminal command **cds w**).\ 122 | Switch to the preview browser tab and refresh.\ 123 | (15) On the Object Page, new section **'Admin Data'** is shown inside the collection facet **Incident Overview**. 124 | 125 | ![](./images/image21.png) 126 | 127 | ## Exercise 6.3 Adding a new Table Column with Criticality Highlighting 128 | 129 | In this exercise, you will add an additional column to table **Incident Flow** shown on the Object Page.\ 130 | Tables are defined by a so called **lineItem annotation**, representing a collection of different kinds of data field annotations.\ 131 | Each data field annotation refers to a property of the annotated service entity, representing a piece of data.\ 132 | An overview of the different data representation options can be found [here](https://github.com/SAP/odata-vocabularies/blob/master/vocabularies/UI.md#DataFieldAbstract).\ 133 | You can now enhance the existing lineItem annotation for entity **IncidentFlow** by adding an additional data field annotation. 134 | 135 | (16) Open file **app/annotations.cds**.\ 136 | Place cursor in section **'column enhancement'**. 137 | 138 | ![](./images/image22.png) 139 | 140 | Trigger LSP support (**ctrl+space**).\ 141 | (17)  Choose ![](./images/image24.png). 142 | 143 | ![](./images/image23.png) 144 | 145 | The annotation is added along with its basic structural elements.\ 146 | With the cursor sitting behind **Value :**, trigger LSP support.\ 147 | (18)Choose![](./images/image26.png). 148 | 149 | ![](./images/image25.png) 150 | 151 | For highlighting of table column values, we now add property **Criticality**.\ 152 | As value we point it to a corresponding property of entity **IncidentFlow** representing the criticality of each entity instance as a number.\ 153 | Add an empty line after **Value : stepStatus,**\ 154 | Trigger LSP support (ctrl+space).\ 155 | (19)Choose ![](./images/image28.png). 156 | 157 | ![](./images/image27.png) 158 | 159 | Trigger again LSP support.\ 160 | (20) Choose entity property **'criticality'**. 161 | 162 | ![](./images/image29.png) 163 | 164 | Save changes. 165 | The full annotation: 166 | ```js 167 | { 168 | $Type : 'UI.DataField', 169 | Value : stepStatus, 170 | Criticality : criticality, 171 | }, 172 | ``` 173 | 174 | Switch to the preview browser tab and refresh.\ 175 | (21) On the Object Page, A new column **Process Step Status** is shown 176 | in the table **Incident Process Flow**. 177 | 178 | ![](./images/image31.png) 179 | 180 | ## Summary 181 | 182 | You've now used the LSP annotation support and added annotations for 183 | **UI.FieldGroup**, **UI.ReferenceFacet** and **UI.DataField**. 184 | 185 | Continue to - [Exercise 7 - Adding a contact card showing data from SAP S/4 HANA ](../ex7/README.md) -------------------------------------------------------------------------------- /exercises/ex6/images/image0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image0.png -------------------------------------------------------------------------------- /exercises/ex6/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image1.png -------------------------------------------------------------------------------- /exercises/ex6/images/image10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image10.png -------------------------------------------------------------------------------- /exercises/ex6/images/image11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image11.png -------------------------------------------------------------------------------- /exercises/ex6/images/image12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image12.png -------------------------------------------------------------------------------- /exercises/ex6/images/image13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image13.png -------------------------------------------------------------------------------- /exercises/ex6/images/image14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image14.png -------------------------------------------------------------------------------- /exercises/ex6/images/image15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image15.png -------------------------------------------------------------------------------- /exercises/ex6/images/image16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image16.png -------------------------------------------------------------------------------- /exercises/ex6/images/image17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image17.png -------------------------------------------------------------------------------- /exercises/ex6/images/image18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image18.png -------------------------------------------------------------------------------- /exercises/ex6/images/image19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image19.png -------------------------------------------------------------------------------- /exercises/ex6/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image2.png -------------------------------------------------------------------------------- /exercises/ex6/images/image20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image20.png -------------------------------------------------------------------------------- /exercises/ex6/images/image21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image21.png -------------------------------------------------------------------------------- /exercises/ex6/images/image22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image22.png -------------------------------------------------------------------------------- /exercises/ex6/images/image23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image23.png -------------------------------------------------------------------------------- /exercises/ex6/images/image24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image24.png -------------------------------------------------------------------------------- /exercises/ex6/images/image25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image25.png -------------------------------------------------------------------------------- /exercises/ex6/images/image26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image26.png -------------------------------------------------------------------------------- /exercises/ex6/images/image27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image27.png -------------------------------------------------------------------------------- /exercises/ex6/images/image28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image28.png -------------------------------------------------------------------------------- /exercises/ex6/images/image29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image29.png -------------------------------------------------------------------------------- /exercises/ex6/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image3.png -------------------------------------------------------------------------------- /exercises/ex6/images/image30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image30.png -------------------------------------------------------------------------------- /exercises/ex6/images/image31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image31.png -------------------------------------------------------------------------------- /exercises/ex6/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image4.png -------------------------------------------------------------------------------- /exercises/ex6/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image5.png -------------------------------------------------------------------------------- /exercises/ex6/images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image6.png -------------------------------------------------------------------------------- /exercises/ex6/images/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image7.png -------------------------------------------------------------------------------- /exercises/ex6/images/image8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image8.png -------------------------------------------------------------------------------- /exercises/ex6/images/image9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex6/images/image9.png -------------------------------------------------------------------------------- /exercises/ex7/README.md: -------------------------------------------------------------------------------- 1 | # Exercise 7 - Adding a Contact Card Showing Data from SAP S/4 HANA 2 | 3 | In this exercise, you extend the sample service with the consumption of an external Business Partner service.
4 | First, you will work with local mock data and later on get the data directly from the external SAP S/4HANA cloud system.
5 | The data will be visualized in the Object Pages header as a contact card. 6 | 7 | ## Exercise 7.1 Get the Business Partner EDMX File 8 | 9 | You will now download the Business Partner EDMX specification from SAP API Hub and import it into the sample service.\ 10 | Open the [SAP API Business Hub page](https://api.sap.com/api/API_BUSINESS_PARTNER/resource?tag=Business%20Partner) in your browser. 11 | 12 | (1) Choose the **Details** tab\ 13 | (2) Click button **Download API Specification** and select ![](./images/image2.png) 14 | 15 | If required, log on. 16 | In case you don't have credentials, or have problems downloading the file, you can also find the file API_BUSINESS_PARTNER.edmx within project folder app/test-resources/api-hub.\ 17 | If you’re using Chrome as a browser, you now see the downloaded file in the footer bar. 18 | 19 | ![](./images/image1.png) 20 | 21 | ## Exercise 7.2 Adding the EDMX File and Local Data to your Project 22 | 23 | In this exercise, you will import the downloaded EDMX specification into the sample service. 24 | By providing mock data, you will be able to develop and test the imported entities without the need of having S/4 HANA backend connectivity in place. 25 | 26 | If not already running, start the OData service in a terminal session with **cds watch**.\ 27 | Drag the API_BUSINESS_PARTNER.edmx file from your browser's download area/folder over to your SAP Business Application Studio explorer pane and drop it into folder **srv**. 28 | 29 | ![](./images/image2a.png) 30 | 31 | The application programming model will automatically create a new folder **srv/external** and generate a new file API_BUSINESS_PARTNER.csn in it, which is a compact representation of CDS.\ 32 | If the folder is not automatically generated, run the following command in your terminal session from the projects root folder:\ 33 | **cds import srv/API_BUSINESS_PARTNER.edmx** 34 | 35 | In the SAP Business Application Studio explorer pane, open file **srv/incidentservice.cds**.\ 36 | (3) Add the following code in section **begin add using statement** at the beginning of the file: 37 | 38 | ```js 39 | using {API_BUSINESS_PARTNER as external} from '../srv/external/API_BUSINESS_PARTNER.csn'; 40 | ``` 41 | 42 | In the same file, scroll down to section **expose additional entities**.\ 43 | (4) Enter the following code below: 44 | 45 | ```js 46 | @readonly 47 | entity BusinessPartner as projection on external.A_BusinessPartner { 48 | key BusinessPartner, BusinessPartnerFullName 49 | }; 50 | @readonly 51 | entity BusinessPartnerAddress as projection on external.A_BusinessPartnerAddress { 52 | key BusinessPartner, key AddressID, CityName, Country, PostalCode, StreetName, HouseNumber 53 | }; 54 | ``` 55 | 56 | By adding the **using** statement (3), a new service is exposed with a definition based on the original edmx file.\ 57 | Furthermore, you have extended the Incidents service by adding two projected entities from the Business Partner API (4). 58 | 59 | ![](./images/image3.png) 60 | 61 | Since there is no backend connectivity in place yet, you will start with using local data first.\ 62 | In SAP Business Application Studio explorer pane, open folder\ 63 | **app/test-resources/api-hub/data**. 64 | 65 | (5) Select the following two CSV files, drag and drop them to folder **db/data**. 66 | 67 | - API_BUSINESS_PARTNER-A_BusinessPartner.csv 68 | - API_BUSINESS_PARTNER-A_BusinessPartnerAddress.csv 69 | 70 | ![](./images/image4.png) 71 | 72 | (6) In the preview browser tab, click on one of the marked entities to show mock data.\ 73 | Note that only the fields show data where mock data has been provided for. 74 | 75 | ![](./images/image5.png) 76 | 77 | (7) Clicking on the new entities of the Incidents service shows mock 78 | data for the projected entity fields only. 79 | 80 | ![](./images/image6.png) 81 | 82 | ## Exercise 7.3 Adding Associations to the Incidents Service Entities 83 | 84 | In this exercise, you will add additional properties to entity **Individual** and associations to the Business Partner Service entities. 85 | 86 | In the SAP Business Application Studio explorer pane, open file **db/schema.cds**.\ 87 | (8) Scroll to section **Begin add additional properties** in entity **Individual** and add these two additional properties: 88 | 89 | ```js 90 | businessPartnerID : String; 91 | addressID : String; 92 | ``` 93 | 94 | ![](./images/image7.png) 95 | 96 | For the additional properties, mock data is required.\ 97 | In SAP Business Application Studio explorer pane, open folder **app/test-resources/api-hub/data**.\ 98 | (9) Select the remaining CSV file scp.cloud.Individual.csv.\ 99 | (10) Drag and drop to folder **db/data**. 100 | 101 | ![](./images/image8.png) 102 | 103 | (11) Click ![](./images/image11.png) to confirm replacement of the existing csv file. 104 | 105 | ![](./images/image10.png) 106 | 107 | (12) In your browser preview tab, select entity ![](./images/image13.png). 108 | 109 | ![](./images/image12.png) 110 | 111 | (13) Mock data for the additional properties are shown. 112 | 113 | ![](./images/image14.png) 114 | 115 | In order to incorporate the external services data into the service model, you will now add some associations.\ 116 | In SAP Business Application Studio explorer pane, open file **db/schema.cds**.\ 117 | (14) Add the following code in section **begin add using statement** at the beginning of the file: 118 | 119 | ```js 120 | using {API_BUSINESS_PARTNER as external} from '../srv/external/API_BUSINESS_PARTNER.csn'; 121 | ``` 122 | 123 | ![](./images/image15.png) 124 | 125 | Scroll down to section **add associations to external entities** at the end of the file.\ 126 | (15) Add the following code: 127 | 128 | ```js 129 | extend scp.cloud.Individual with { 130 | businessPartner : Association to one external.A_BusinessPartner 131 | on businessPartner.BusinessPartner = businessPartnerID; 132 | businessPartnerAddress : Association to one external.A_BusinessPartnerAddress 133 | on businessPartnerAddress.BusinessPartner = businessPartnerID 134 | and businessPartnerAddress.AddressID = addressID; 135 | } 136 | ``` 137 | 138 | ![](./images/image16.png) 139 | 140 | Note that the mock data that was added in step (11) for entity scp.cloud.Individual properties **businessPartnerID** and **addressID**\ 141 | need to match existing business partner address data keys in your SAP S/4 HANA cloud system when later switching\ 142 | from mock data to real SAP S/4 HANA Cloud connectivity. 143 | 144 | You can test the new associations in the preview browser tab. 145 | Select service entity **Individual** and add the following to the browser Url 146 | 147 | ```js 148 | (id=067460c5-196c-4783-9563-ede797399da8)?$expand=businessPartnerAddress 149 | ``` 150 | 151 | This will show the business partner address data inline with the Individual data. 152 | 153 | ![](./images/image15a.png) 154 | 155 | ## Exercise 7.4 Adding an Annotation for a Contact Card 156 | 157 | In this exercise you will add an annotation of type **@Communication.Contact** with properties referring to the\ 158 | new external entities, and enhance the Object Page header to show a contact card link. 159 | 160 | In SAP Business Application Studio explorer pane, open file **srv/common.cds**.\ 161 | (16) Add the following code to section **add contact card annotation** at the end of the file: 162 | 163 | ```js 164 | annotate service.Individual with @(Communication.Contact : { 165 | fn : businessPartner.BusinessPartnerFullName, 166 | adr : [{ 167 | type : #work, 168 | code : businessPartnerAddress.PostalCode, 169 | street : businessPartnerAddress.StreetName, 170 | building : businessPartnerAddress.HouseNumber, 171 | country : businessPartnerAddress.Country, 172 | locality : businessPartnerAddress.CityName 173 | }] 174 | }); 175 | ``` 176 | 177 | ![](./images/image17.png) 178 | 179 | To visualize the contact card in the Object Pages header, you need to add an additional annotation.\ 180 | Open file **app/annotation.cds** and locate section **begin of header facet enhancement**.\ 181 | (17) Enter the following code: 182 | 183 | ```js 184 | { 185 | $Type : 'UI.ReferenceFacet', 186 | Label : '{i18n>AssignedContact}', 187 | Target : 'assignedIndividual/@Communication.Contact', 188 | } 189 | ``` 190 | 191 | ![](./images/image18.png) 192 | 193 | (18) Go to the preview browser tab and refresh. 194 | 195 | ![](./images/image19.png) 196 | 197 | By enhancing the header facet with an annotation of type **reference facet** targeting the **@Communication.Contact** annotation,\ 198 | the Object Page header now shows a contact card link. 199 | 200 | ## Exercise 7.5 Fetching Business Partner Data from an SAP S/4 HANA Cloud system 201 | 202 | ### Prerequisites 203 | 204 | In order to consume business partner data from an S/4 HANA Cloud system, inbound communication to an SAP S/4 HANA tenant needs to be in place.\ 205 | An example for the necessary implementation steps (create communication system and communication arrangement) is described [here](https://help.sap.com/viewer/b0e8d558ba2f47f5b02a3fc0ac9edc34/SHIP/en-US/70fb7224a6df4e099ff264081667a0fc.html).\ 206 | The SAP S/4 HANA API **technical user credentials for inbound communication** (generated with the setup of the communication system\ 207 | in SAP S/4 HANA Cloud) need to be added to file **default-env.json**, located in the root folder of the sample project.\ 208 | Furthermore, the Business Partner OData API URL for the specific SAP S/4 HANA cloud instance needs to be completed.\ 209 | The relevant fields are highlighted in the screenshot below. 210 | 211 | ![](./images/image19a.png) 212 | 213 | In this exercise, you will add custom handler code which is called on the READ event of the BusinessPartner and BusinessPartnerAddress entities.\ 214 | Whenever an OData call for business partner data issued from the UI, this handler is called.\ 215 | For further details about the currently supported query capabilities, please refer to chapter **Sending Requests** of the [SAP Cloud Application Programming Model documentation](https://cap.cloud.sap/docs/guides/consuming-services#sending-requests). 216 | 217 | In SAP Business Application Studio explorer pane, open folder **app/test-resources/api-hub**.\ 218 | (19) Drag file ![](./images/image21.png).\ 219 | (20) Drop on folder **srv**. 220 | 221 | ![](./images/image20.png) 222 | 223 | (21) Click ![](./images/image23.png) to confirm that the existing file is overwritten. 224 | 225 | ![](./images/image22.png) 226 | 227 | In the explorer pane, open file package.json in the root folder and scroll down to section **"cds"**.\ 228 | (22) Remove hyphens from properties **model** and **credentials** to enable the external service configuration.\ 229 | 230 | ![](./images/image24.png) 231 | 232 | **Please note**: the credentials need to be maintained in file **default-env.json** as mentioned in the prerequisites,\ 233 | otherwise the external query handler will fail after enabling the external service configuration.\ 234 | More details abound external services configuration can be found [here](https://cap.cloud.sap/docs/guides/services#rest-and-odata). 235 | 236 | (23) On your preview browser tab, select entity **BusinessPartnerAddress.** 237 | 238 | ![](./images/image25.png) 239 | 240 | The OData response will now show data retrieved from the S/4 HANA system. 241 | 242 | ![](./images/image26.png) 243 | 244 | (24) In your preview browser, open the app and navigate to the Object Page.\ 245 | The contact card now shows data from S/4 HANA. 246 | 247 | ![](./images/image27.png) 248 | 249 | ## Summary 250 | 251 | You've now successfully completed the hands-on workshop. Congratulations! 252 | -------------------------------------------------------------------------------- /exercises/ex7/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image1.png -------------------------------------------------------------------------------- /exercises/ex7/images/image10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image10.png -------------------------------------------------------------------------------- /exercises/ex7/images/image11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image11.png -------------------------------------------------------------------------------- /exercises/ex7/images/image12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image12.png -------------------------------------------------------------------------------- /exercises/ex7/images/image13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image13.png -------------------------------------------------------------------------------- /exercises/ex7/images/image14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image14.png -------------------------------------------------------------------------------- /exercises/ex7/images/image15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image15.png -------------------------------------------------------------------------------- /exercises/ex7/images/image15a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image15a.png -------------------------------------------------------------------------------- /exercises/ex7/images/image16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image16.png -------------------------------------------------------------------------------- /exercises/ex7/images/image17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image17.png -------------------------------------------------------------------------------- /exercises/ex7/images/image18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image18.png -------------------------------------------------------------------------------- /exercises/ex7/images/image19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image19.png -------------------------------------------------------------------------------- /exercises/ex7/images/image19a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image19a.png -------------------------------------------------------------------------------- /exercises/ex7/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image2.png -------------------------------------------------------------------------------- /exercises/ex7/images/image20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image20.png -------------------------------------------------------------------------------- /exercises/ex7/images/image21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image21.png -------------------------------------------------------------------------------- /exercises/ex7/images/image22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image22.png -------------------------------------------------------------------------------- /exercises/ex7/images/image23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image23.png -------------------------------------------------------------------------------- /exercises/ex7/images/image24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image24.png -------------------------------------------------------------------------------- /exercises/ex7/images/image25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image25.png -------------------------------------------------------------------------------- /exercises/ex7/images/image26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image26.png -------------------------------------------------------------------------------- /exercises/ex7/images/image27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image27.png -------------------------------------------------------------------------------- /exercises/ex7/images/image28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image28.png -------------------------------------------------------------------------------- /exercises/ex7/images/image2a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image2a.png -------------------------------------------------------------------------------- /exercises/ex7/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image3.png -------------------------------------------------------------------------------- /exercises/ex7/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image4.png -------------------------------------------------------------------------------- /exercises/ex7/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image5.png -------------------------------------------------------------------------------- /exercises/ex7/images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image6.png -------------------------------------------------------------------------------- /exercises/ex7/images/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image7.png -------------------------------------------------------------------------------- /exercises/ex7/images/image8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image8.png -------------------------------------------------------------------------------- /exercises/ex7/images/image9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/teched2020-IIS360/3f562bab410a54758ac5c8fe31035d4892ac066f/exercises/ex7/images/image9.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teched2020-iis360", 3 | "version": "1.0.0", 4 | "description": "A simple CAP project.", 5 | "repository": "", 6 | "license": "UNLICENSED", 7 | "private": true, 8 | "dependencies": { 9 | "@sap/cds": "^4", 10 | "express": "^4" 11 | }, 12 | "devDependencies": { 13 | "sqlite3": "5.0.0" 14 | }, 15 | "scripts": { 16 | "start": "npx cds run", 17 | "watch": "npx cds watch" 18 | }, 19 | "cds": { 20 | "requires": { 21 | "db": { 22 | "kind": "sql" 23 | }, 24 | "API_BUSINESS_PARTNER": { 25 | "kind": "odata", 26 | "--model": "srv/external/API_BUSINESS_PARTNER", 27 | "--credentials": { 28 | "destination": "teched-2020" 29 | } 30 | } 31 | }, 32 | "odata": { 33 | "version": "v4" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /srv/common.cds: -------------------------------------------------------------------------------- 1 | namespace scp.cloud; 2 | using IncidentService as service from './incidentservice'; 3 | 4 | using { 5 | cuid 6 | } from '@sap/cds/common'; 7 | 8 | annotate cuid with { 9 | ID @( 10 | title : '{i18n>ID}', 11 | UI.HiddenFilter, 12 | Core.Computed 13 | ); 14 | } 15 | 16 | 17 | annotate service.Incidents with { 18 | ID @UI.Hidden: true; 19 | assignedIndividual @UI.Hidden : true; 20 | identifier @(Common.FieldControl: identifierFieldControl); 21 | }; 22 | 23 | annotate service.Incidents with { 24 | incidentStatus @Common : { 25 | Text : incidentStatus.name, 26 | TextArrangement : #TextOnly, 27 | ValueListWithFixedValues 28 | }; 29 | category @Common : { 30 | Text : category.name, 31 | TextArrangement : #TextOnly, 32 | ValueListWithFixedValues 33 | }; 34 | priority @Common : { 35 | Text : priority.name, 36 | TextArrangement : #TextOnly, 37 | ValueListWithFixedValues 38 | }; 39 | }; 40 | 41 | annotate service.Category with { 42 | code @UI.Hidden @Common : { 43 | Text : name 44 | } @title : '{i18n>Category}' 45 | }; 46 | 47 | annotate service.Priority with { 48 | code @UI.Hidden @Common : { 49 | Text : name 50 | } @title : '{i18n>Priority}' 51 | }; 52 | 53 | annotate service.IncidentStatus with { 54 | code @UI.Hidden @Common : { 55 | Text : name 56 | } @title : '{i18n>IncidentStatus}' 57 | }; 58 | 59 | //add contact card annotation -------------------------------------------------------------------------------- /srv/incidentservice.cds: -------------------------------------------------------------------------------- 1 | using scp.cloud from '../db/schema'; 2 | //begin add using statement 3 | 4 | //end add using statement 5 | 6 | service IncidentService { 7 | 8 | @odata.draft.enabled 9 | entity Incidents as projection on cloud.Incidents; 10 | 11 | @readonly 12 | entity IncidentFlow as projection on cloud.IncidentFlow; 13 | 14 | @readonly 15 | entity IncidentProcessTimeline as projection on cloud.IncidentProcessTimeline; 16 | 17 | @readonly 18 | entity Individual as projection on cloud.Individual; 19 | 20 | @readonly 21 | entity Category as projection on cloud.Category; 22 | 23 | @readonly 24 | entity Priority as projection on cloud.Priority; 25 | 26 | //expose additional entities 27 | 28 | } 29 | -------------------------------------------------------------------------------- /srv/incidentservice.js: -------------------------------------------------------------------------------- 1 | const cds = require("@sap/cds"); 2 | 3 | /** 4 | * Enumeration values for FieldControlType 5 | * @see https://github.com/SAP/odata-vocabularies/blob/master/vocabularies/Common.md#FieldControlType 6 | */ 7 | const FieldControl = { 8 | Mandatory: 7, 9 | Optional: 3, 10 | ReadOnly: 1, 11 | Inapplicable: 0, 12 | }; 13 | 14 | module.exports = cds.service.impl(async function (srv) { 15 | const { 16 | Incidents 17 | } = srv.entities 18 | 19 | //read/edit event hook after read of entity 'Incidents' 20 | srv.after(["READ", "EDIT"], "Incidents", setTechnicalFlags); 21 | srv.after("READ", "Incidents", setPriorityCriticality); 22 | srv.before("SAVE", "Incidents", validateIncident); 23 | 24 | /** 25 | * Set technical flags, used 26 | for controlling UI behaviour, on the 'Incidents' 27 | entity 28 | * 29 | * @param Incidents { 30 | Incidents | Incidents[] 31 | }(Array of ) Incidents 32 | */ 33 | function setTechnicalFlags(Incidents) { 34 | 35 | function _setFlags(incident) { 36 | incident.isDraft = !incident.IsActiveEntity; 37 | // field control on the 'identifier' property 38 | if (incident.IsActiveEntity) { 39 | incident.identifierFieldControl = FieldControl.Optional; 40 | } else if (incident.HasActiveEntity) { 41 | incident.identifierFieldControl = FieldControl.ReadOnly; 42 | } else { 43 | incident.identifierFieldControl = FieldControl.Mandatory; 44 | } 45 | } 46 | 47 | if (Array.isArray(Incidents)) { 48 | Incidents.forEach(_setFlags); 49 | } else { 50 | _setFlags(Incidents); 51 | } 52 | }; 53 | 54 | /** 55 | * Set priority criticality used for display in LR table 56 | * 57 | * @param Incidents { 58 | Incidents | Incidents[] 59 | }(Array of ) Incidents 60 | */ 61 | function setPriorityCriticality(Incidents) { 62 | 63 | function _setCriticality(incident) { 64 | if (incident.priority) { 65 | incident.priority.criticality = parseInt(incident.priority.code); 66 | } 67 | } 68 | 69 | if (Array.isArray(Incidents)) { 70 | Incidents.forEach(_setCriticality); 71 | } else { 72 | _setCriticality(Incidents); 73 | } 74 | } 75 | 76 | /** 77 | * Validate a 'incident' 78 | entry 79 | * 80 | * @param req Request 81 | */ 82 | function validateIncident(req) { 83 | // check mandatory properties 84 | if (!req.data.identifier) { 85 | req.error(400, "Enter an Incident Identifier", "in/identifier"); 86 | } 87 | } 88 | }) --------------------------------------------------------------------------------