Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Fiori eğitimi - kod

575 views

Published on

Bu doküman, Fiori çalıştaylarında kullandığım örnek kodları içermektedir.

Published in: Software
  • Be the first to comment

Fiori eğitimi - kod

  1. 1. Bu doküman, Fiori çalıştayında geliştirilecek örnek uygulamanın adımlarını ve çalışır haldeki kodlarını içermektedir. SAP Fiori Çalıştay haritası Dr. KeremKoseoglu
  2. 2. Table of Contents DDIC Nesneleri ...........................................................................................................................3 RFC Fonksiyonları.......................................................................................................................3 Havayolu.................................................................................................................................. 3 Liste...................................................................................................................................................................................3 Münferit............................................................................................................................................................................3 Bağlantı.................................................................................................................................... 4 Liste...................................................................................................................................................................................4 Münferit............................................................................................................................................................................4 Uçuş......................................................................................................................................... 5 Liste...................................................................................................................................................................................5 Münferit............................................................................................................................................................................5 Not .......................................................................................................................................... 5 Liste...................................................................................................................................................................................5 Münferit............................................................................................................................................................................6 Yaratma.............................................................................................................................................................................6 Güncelleme......................................................................................................................................................................6 Silme..................................................................................................................................................................................7 Gateway Service.........................................................................................................................7 Servis Tanımı............................................................................................................................ 7 Havayolu.................................................................................................................................. 8 SEGW.................................................................................................................................................................................8 Test....................................................................................................................................................................................8 Bağlantı...................................................................................................................................10 SEGW...............................................................................................................................................................................10 Test..................................................................................................................................................................................11 Uçuş........................................................................................................................................13 SEGW...............................................................................................................................................................................13 Test..................................................................................................................................................................................15 Notlar .....................................................................................................................................17 SEGW...............................................................................................................................................................................17 Elle Veri Oluşturma.......................................................................................................................................................19 Test..................................................................................................................................................................................19 Yaratma Testi.................................................................................................................................................................21 Güncelleme Testi ..........................................................................................................................................................22 Silme Testi ......................................................................................................................................................................23 SAP UI5.....................................................................................................................................24 Proje Hazırlığı..........................................................................................................................24 Proje Oluşturma ............................................................................................................................................................24 OData Import.................................................................................................................................................................26 Routing Hazırlığı............................................................................................................................................................29 Havayolu Sayfası .....................................................................................................................30 View Oluşturma.............................................................................................................................................................30 Routing Ek ......................................................................................................................................................................32 Sayfanın Testi.................................................................................................................................................................35 Bağlantı Sayfası .......................................................................................................................35
  3. 3. View Oluşturma.............................................................................................................................................................35 Airline  Connection...................................................................................................................................................37 Test..................................................................................................................................................................................41 Uçuş Sayfası ............................................................................................................................42 View Oluşturma.............................................................................................................................................................42 Connection  Flight.....................................................................................................................................................43 Test..................................................................................................................................................................................49 Not Liste Sayfası......................................................................................................................50 View Oluşturma.............................................................................................................................................................50 Connection  Notes ....................................................................................................................................................52 Test..................................................................................................................................................................................55 Not Detay Sayfası ....................................................................................................................55 View Oluşturma.............................................................................................................................................................55 Notes  Note................................................................................................................................................................57 Test..................................................................................................................................................................................59 Not Yaratma............................................................................................................................60 Note.................................................................................................................................................................................60 Notes ...............................................................................................................................................................................62 Test..................................................................................................................................................................................63 Not Güncelleme ......................................................................................................................64 Not Silme ................................................................................................................................65 Deployment..............................................................................................................................68 Web IDE Gateway...............................................................................................................68 Launchpad...............................................................................................................................71 Checklist..........................................................................................................................................................................71 Lauchpad Tanımı...........................................................................................................................................................72 Semantik Nesne ............................................................................................................................................................74 Launchpad İçeriği..........................................................................................................................................................75 ROL ..................................................................................................................................................................................80 Test..................................................................................................................................................................................82 CDS View List Report................................................................................................................83 CDS View.................................................................................................................................83 OData .....................................................................................................................................85 SAP UI5...................................................................................................................................86
  4. 4. DDIC Nesneleri RFC Fonksiyonları Havayolu Liste FUNCTION ZCMA01_KK_GET_AIRLINES EXPORTING VALUE(ET_AIRLINE) TYPE SCARR_TAB. clear et_airline[]. select * from scarr into corresponding fields of table @et_Airline. ENDFUNCTION. Münferit FUNCTION ZCMA01_KK_GET_AIRLINE
  5. 5. IMPORTING VALUE(IV_CARRID) TYPE S_CARR_ID EXPORTING VALUE(ES_AIRLINE) TYPE SCARR. CLEAR es_airline. SELECT SINGLE * FROM scarr WHERE carrid EQ @iv_carrid INTO CORRESPONDING FIELDS OF @es_airline. ENDFUNCTION. Bağlantı Liste FUNCTION zcma01_kk_get_connections. *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(IV_CARRID) TYPE S_CARR_ID *" EXPORTING *" VALUE(ET_SPFLI) TYPE SPFLI_TAB *"---------------------------------------------------------------------- CLEAR et_spfli[]. SELECT * FROM spfli WHERE carrid EQ @iv_carrid INTO CORRESPONDING FIELDS OF TABLE @et_spfli. ENDFUNCTION. Münferit FUNCTION zcma01_kk_get_connections. *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(IV_CARRID) TYPE S_CARR_ID *" VALUE(IV_CONNID) TYPE S_CONN_ID *" EXPORTING *" VALUE(ES_SPFLI) TYPE SPFLI *"---------------------------------------------------------------------- CLEAR es_spfli. SELECT SINGLE * FROM spfli WHERE carrid EQ @iv_carrid AND connid eq @iv_connid INTO CORRESPONDING FIELDS OF ES_SPFLI. ENDFUNCTION.
  6. 6. Uçuş Liste FUNCTION zcma01_kk_get_flights. *"-------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(IV_CARRID) TYPE S_CARR_ID *" VALUE(IV_CONNID) TYPE S_CONN_ID *" EXPORTING *" VALUE(ET_SFLIGHT) TYPE FLIGHTTAB *"-------------------------------------------------------------------- CLEAR et_sflight[]. SELECT * FROM sflight WHERE carrid EQ @iv_carrid AND connid EQ @iv_connid INTO CORRESPONDING FIELDS OF TABLE @et_sflight. ENDFUNCTION. Münferit FUNCTION zcma01_kk_get_flight. *"-------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(IV_CARRID) TYPE S_CARR_ID *" VALUE(IV_CONNID) TYPE S_CONN_ID *" VALUE(IV_FLDATE) TYPE S_DATE *" EXPORTING *" VALUE(ES_SFLIGHT) TYPE SFLIGHT *"-------------------------------------------------------------------- CLEAR es_sflight. SELECT SINGLE * FROM sflight WHERE carrid EQ @iv_carrid AND connid EQ @iv_connid AND fldate EQ @iv_fldate INTO CORRESPONDING FIELDS OF @es_sflight. ENDFUNCTION. Not Liste FUNCTION zcma01_kk_get_notes. *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(IV_CARRID) TYPE S_CARR_ID *" VALUE(IV_CONNID) TYPE S_CONN_ID *" EXPORTING
  7. 7. *" VALUE(ET_NOTE) TYPE ZCMA01_KK_NOT_TAB *"---------------------------------------------------------------------- CLEAR et_note[]. SELECT * FROM zcma01_kk_not WHERE carrid EQ @iv_carrid AND connid EQ @iv_connid INTO TABLE @et_note. ENDFUNCTION. Münferit FUNCTION zcma01_kk_get_note. *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(IV_CARRID) TYPE S_CARR_ID *" VALUE(IV_CONNID) TYPE S_CONN_ID *" VALUE(IV_NOTEID) TYPE CHAR5 *" EXPORTING *" VALUE(ES_NOTE) TYPE ZCMA01_KK_NOT *"---------------------------------------------------------------------- CLEAR es_note. SELECT SINGLE * FROM zcma01_kk_not WHERE carrid EQ @iv_carrid AND connid EQ @iv_connid AND noteid EQ @iv_noteid INTO CORRESPONDING FIELDS OF @es_note. ENDFUNCTION. Yaratma FUNCTION zcma01_kk_insert_note. *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(IS_NOTE) TYPE ZCMA01_KK_NOT *"---------------------------------------------------------------------- INSERT zcma01_kk_not FROM is_note. ENDFUNCTION. Güncelleme FUNCTION ZCMA01_KK_UPDATE_NOTE. *"-------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(IS_NOTE) TYPE ZCMA01_KK_NOT *"-------------------------------------------------------------------- MODIFY zcma01_kk_not FROM is_note. ENDFUNCTION.
  8. 8. Silme FUNCTION zcma01_kk_delete_note. *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(IV_CARRID) TYPE S_CARR_ID *" VALUE(IV_CONNID) TYPE S_CONN_ID *" VALUE(IV_NOTEID) TYPE CHAR5 *"---------------------------------------------------------------------- DELETE FROM zcma01_kk_not WHERE carrid EQ @iv_carrid AND connid EQ @iv_connid AND noteid EQ @iv_noteid. ENDFUNCTION. GatewayService Servis Tanımı İşlem kodu: SEGW Servis aktivasyonu: /IWFND/MAINT_SERVICE Servis testi: /IWFND/GW_CLIENT
  9. 9. Havayolu SEGW Test /sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/AirlineSet
  10. 10. /sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/AirlineSet('AA')
  11. 11. Bağlantı SEGW
  12. 12. Test /sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/AirlineSet('AA')/NAV_AIR_CONN
  13. 13. /sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/ConnectionSet(Carrid='AA',Connid='001 7')
  14. 14. Uçuş SEGW
  15. 15. Test /sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/ConnectionSet(Carrid='AA',Connid='001 7')/NAV_CONN_FLI
  16. 16. /sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/FlightSet(Carrid='AA',Connid='0017',Fld ate=datetime'2016-11-15T00%3A00%3A00')
  17. 17. Notlar SEGW
  18. 18. Elle Veri Oluşturma Test /sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/ConnectionSet(Carrid='AA',Connid='001 7')/NAV_CONN_NOTE
  19. 19. /sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/NoteSet(Carrid='AA',Connid='0017',Note id='NOT01')
  20. 20. Yaratma Testi /sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/NoteSet(Carrid='AA',Connid='0017',Note id='NOT01')
  21. 21. Güncelleme Testi /sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/NoteSet(Carrid='AA',Connid='0017',Note id='NOT01')
  22. 22. Silme Testi /sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/NoteSet(Carrid='AA',Connid='0017',Note id='NOT01')
  23. 23. SAPUI5 Proje Hazırlığı Proje Oluşturma localhost:8080/webide/index.html
  24. 24. OData Import
  25. 25. webapp/manifest.json { "_version": "1.5.0", "sap.app": { "id": "KK_UI5ZCMA01_KK_UI5", "type": "application", "i18n": "i18n/i18n.properties", "applicationVersion": { "version": "1.0.0" }, "title": "{{appTitle}}", "description": "{{appDescription}}", "sourceTemplate": { "id": "servicecatalog.connectivityComponent", "version": "0.0.0" }, "dataSources": { "ZCMA01_KK_SERVICE_SRV": { "uri": "/sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/", "type": "OData",
  26. 26. "settings": { "odataVersion": "2.0", "localUri": "localService/metadata.xml" } } } }, "sap.ui": { "technology": "UI5", "icons": { "icon": "", "favIcon": "", "phone": "", "phone@2": "", "tablet": "", "tablet@2": "" }, "deviceTypes": { "desktop": true, "tablet": true, "phone": true }, "supportedThemes": [ "sap_hcb", "sap_belize" ] }, "sap.ui5": { "rootView": { "viewName": "KK_UI5ZCMA01_KK_UI5.view.View1", "type": "XML" }, "dependencies": { "minUI5Version": "1.30.0", "libs": { "sap.ui.core": {}, "sap.m": {}, "sap.ui.layout": {}, "sap.ushell": {}, "sap.collaboration": {}, "sap.ui.comp": {}, "sap.uxap": {} } }, "contentDensities": { "compact": true, "cozy": true }, "models": { "i18n": { "type": "sap.ui.model.resource.ResourceModel", "settings": { "bundleName": "KK_UI5ZCMA01_KK_UI5.i18n.i18n" } }, "": { "settings": {}, "dataSource": "ZCMA01_KK_SERVICE_SRV", "preload": true } }, "resources": { "css": [ { "uri": "css/style.css" }
  27. 27. ] } } } Routing Hazırlığı manifest.json { "_version": "1.5.0", "sap.app": { "id": "KK_UI5ZCMA01_KK_UI5", "type": "application", "i18n": "i18n/i18n.properties", "applicationVersion": { "version": "1.0.0" }, "title": "{{appTitle}}", "description": "{{appDescription}}", "sourceTemplate": { "id": "servicecatalog.connectivityComponent", "version": "0.0.0" }, "dataSources": { "ZCMA01_KK_SERVICE_SRV": { "uri": "/sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/", "type": "OData", "settings": { "odataVersion": "2.0", "localUri": "localService/metadata.xml" } } } }, "sap.ui": { "technology": "UI5", "icons": { "icon": "", "favIcon": "", "phone": "", "phone@2": "", "tablet": "", "tablet@2": "" }, "deviceTypes": { "desktop": true, "tablet": true, "phone": true }, "supportedThemes": [ "sap_hcb", "sap_belize" ] }, "sap.ui5": { "rootView": { "viewName": "KK_UI5ZCMA01_KK_UI5.view.View1", "type": "XML" }, "dependencies": { "minUI5Version": "1.30.0", "libs": { "sap.ui.core": {}, "sap.m": {}, "sap.ui.layout": {}, "sap.ushell": {},
  28. 28. "sap.collaboration": {}, "sap.ui.comp": {}, "sap.uxap": {} } }, "contentDensities": { "compact": true, "cozy": true }, "models": { "i18n": { "type": "sap.ui.model.resource.ResourceModel", "settings": { "bundleName": "KK_UI5ZCMA01_KK_UI5.i18n.i18n" } }, "": { "settings": {}, "dataSource": "ZCMA01_KK_SERVICE_SRV", "preload": true } }, "resources": { "css": [ { "uri": "css/style.css" } ] } } } view/View1.view.xml <mvc:View controllerName="KK_UI5ZCMA01_KK_UI5.controller.View1" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m"> <App id="KK_UI5ZCMA01_KK_UI5"> </App> </mvc:View> Buradaki “id” değeri, manifest.json dosyasından geliyor. Havayolu Sayfası View Oluşturma webapp  New  SAPUI5 View Airline.view.xml  Open with  Layout editor
  29. 29. Title’ı değiştirebiliriz. Outline  Airline.view.xml  Data Set = /AirlineSet Controls  List  List, sürükle & bırak, 2 ve 3’ü sil
  30. 30. Outline  sap.m.List  Set as template List Item 1 ve Description text değiştirilecek Routing Ek mainfest.json
  31. 31. { "_version": "1.5.0", "sap.app": { "id": "KK_UI5ZCMA01_KK_UI5", "type": "application", "i18n": "i18n/i18n.properties", "applicationVersion": { "version": "1.0.0" }, "title": "{{appTitle}}", "description": "{{appDescription}}", "sourceTemplate": { "id": "servicecatalog.connectivityComponent", "version": "0.0.0" }, "dataSources": { "ZCMA01_KK_SERVICE_SRV": { "uri": "/sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/", "type": "OData", "settings": { "odataVersion": "2.0", "localUri": "localService/metadata.xml" } } } }, "sap.ui": { "technology": "UI5", "icons": { "icon": "", "favIcon": "", "phone": "", "phone@2": "", "tablet": "", "tablet@2": "" }, "deviceTypes": { "desktop": true, "tablet": true, "phone": true }, "supportedThemes": [ "sap_hcb", "sap_belize" ] }, "sap.ui5": { "rootView": { "viewName": "KK_UI5ZCMA01_KK_UI5.view.View1", "type": "XML" }, "dependencies": { "minUI5Version": "1.30.0", "libs": { "sap.ui.core": {}, "sap.m": {}, "sap.ui.layout": {}, "sap.ushell": {}, "sap.collaboration": {}, "sap.ui.comp": {}, "sap.uxap": {} } }, "contentDensities": { "compact": true, "cozy": true
  32. 32. }, "models": { "i18n": { "type": "sap.ui.model.resource.ResourceModel", "settings": { "bundleName": "KK_UI5ZCMA01_KK_UI5.i18n.i18n" } }, "": { "settings": {}, "dataSource": "ZCMA01_KK_SERVICE_SRV", "preload": true } }, "routing": { "config": { "routerClass": "sap.m.routing.Router", "viewType": "XML", "viewPath": "KK_UI5ZCMA01_KK_UI5.view", "controlId": "KK_UI5ZCMA01_KK_UI5", "controlAggregation": "pages", "transition": "slide" }, "routes": [ { "pattern": "", "name": "r_welcome", "target": "t_airline" } ], "targets": { "t_airline": { "viewName": "Airline", "viewLevel": 1 } } }, "resources": { "css": [ { "uri": "css/style.css" } ] } } } Component.js sap.ui.define([ "sap/ui/core/UIComponent", "sap/ui/Device", "KK_UI5ZCMA01_KK_UI5/model/models" ], function(UIComponent, Device, models) { "use strict"; return UIComponent.extend("KK_UI5ZCMA01_KK_UI5.Component", { metadata: { manifest: "json" }, /** * The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
  33. 33. * @public * @override */ init: function() { // call the base component's init function UIComponent.prototype.init.apply(this, arguments); // set the device model this.setModel(models.createDeviceModel(), "device"); // Routing this.getRouter().initialize(); } }); }); Sayfanın Testi Webapp  Run as  Web application Bağlantı Sayfası View Oluşturma webapp  New  SAPUI5 View
  34. 34. Connection.view.xml  Open with  Layout editor  Outline Connection.view.xml  Data Set = /AirlineSet Controls  Title’ı değiştirebiliriz List  Table  Sürükle & bırak, ikinci satırı sil Outline  sap.m.Table  items  sap.m.ColumnListItem  Data Set = /AirlineSet/NAV_AIR_CONN ve Table’daki değerleri değiştiriyoruz.
  35. 35. Table  Mode = SingleSelectLeft Airline  Connection Routing manifest.json { "_version": "1.5.0", "sap.app": { "id": "KK_UI5ZCMA01_KK_UI5", "type": "application", "i18n": "i18n/i18n.properties", "applicationVersion": { "version": "1.0.0" }, "title": "{{appTitle}}", "description": "{{appDescription}}", "sourceTemplate": { "id": "servicecatalog.connectivityComponent", "version": "0.0.0" },
  36. 36. "dataSources": { "ZCMA01_KK_SERVICE_SRV": { "uri": "/sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/", "type": "OData", "settings": { "odataVersion": "2.0", "localUri": "localService/metadata.xml" } } } }, "sap.ui": { "technology": "UI5", "icons": { "icon": "", "favIcon": "", "phone": "", "phone@2": "", "tablet": "", "tablet@2": "" }, "deviceTypes": { "desktop": true, "tablet": true, "phone": true }, "supportedThemes": [ "sap_hcb", "sap_belize" ] }, "sap.ui5": { "rootView": { "viewName": "KK_UI5ZCMA01_KK_UI5.view.View1", "type": "XML" }, "dependencies": { "minUI5Version": "1.30.0", "libs": { "sap.ui.core": {}, "sap.m": {}, "sap.ui.layout": {}, "sap.ushell": {}, "sap.collaboration": {}, "sap.ui.comp": {}, "sap.uxap": {} } }, "contentDensities": { "compact": true, "cozy": true }, "models": { "i18n": { "type": "sap.ui.model.resource.ResourceModel", "settings": { "bundleName": "KK_UI5ZCMA01_KK_UI5.i18n.i18n" } }, "": { "settings": {}, "dataSource": "ZCMA01_KK_SERVICE_SRV", "preload": true } }, "routing": {
  37. 37. "config": { "routerClass": "sap.m.routing.Router", "viewType": "XML", "viewPath": "KK_UI5ZCMA01_KK_UI5.view", "controlId": "KK_UI5ZCMA01_KK_UI5", "controlAggregation": "pages", "transition": "slide" }, "routes": [ { "pattern": "", "name": "r_welcome", "target": "t_airline" }, { "pattern": "p_air_conn/{iv_carrid}", "name": "r_air_conn", "target": "t_connection" } ], "targets": { "t_airline": { "viewName": "Airline", "viewLevel": 1 }, "t_connection": { "viewName": "Connection", "viewLevel": 2 } } }, "resources": { "css": [ { "uri": "css/style.css" } ] } } } Airline’dan VeriGöndermek Airline.view.xml  Open with  Layout editor Sap.m.List  Events  Item Press
  38. 38. Airline.controller.js sap.ui.define(["sap/ui/core/mvc/Controller"], function(Controller) { "use strict"; return Controller.extend("KK_UI5ZCMA01_KK_UI5.controller.Airline", { onItemPress: function(evt) { var selPath = evt.getSource().getBindingContext().getPath(); var oModel = this.getView().getModel(); var obj = oModel.getProperty(selPath); var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.navTo("r_air_conn", { "iv_carrid": obj.Carrid }); } }); }); Connection’da VeriGösterimi controller/Connection.controller.js sap.ui.define([ "sap/ui/core/mvc/Controller" ], function(Controller) { "use strict"; var oView = null; return Controller.extend("KK_UI5ZCMA01_KK_UI5.controller.Connection", {
  39. 39. onInit: function() { oView = this.getView(); var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.getRoute("r_air_conn").attachPatternMatched(this.navFromAirline, this); }, navFromAirline: function(oEvent) { var sCarrid = oEvent.getParameter("arguments").iv_carrid; var sPath = "/AirlineSet('" + sCarrid + "')"; oView.bindElement({ path: sPath }); } }); }); Test Dilersek, Connection sayfasında Airline’dan da herhangi bir veri gösterebiliriz.
  40. 40. Uçuş Sayfası View Oluşturma webapp  New  SAPUI5 View Flight.view.xml  Open with  Layout editor  Outline Flight.view.xml  Data Set = /ConnectionSet Controls  Title’ı değiştirebiliriz
  41. 41. List  Table  Sürükle & bırak, ikinci satırı sil Outline  sap.m.Table  items  sap.m.ColumnListItem  Data Set = /ConnectionSet/NAV_CONN_FLI ve Table’daki değerleri değiştiriyoruz. Connection  Flight Routing manifest.json { "_version": "1.5.0", "sap.app": { "id": "KK_UI5ZCMA01_KK_UI5", "type": "application", "i18n": "i18n/i18n.properties", "applicationVersion": { "version": "1.0.0" }, "title": "{{appTitle}}", "description": "{{appDescription}}", "sourceTemplate": {
  42. 42. "id": "servicecatalog.connectivityComponent", "version": "0.0.0" }, "dataSources": { "ZCMA01_KK_SERVICE_SRV": { "uri": "/sap/opu/odata/sap/ZCMA01_KK_SERVICE_SRV/", "type": "OData", "settings": { "odataVersion": "2.0", "localUri": "localService/metadata.xml" } } } }, "sap.ui": { "technology": "UI5", "icons": { "icon": "", "favIcon": "", "phone": "", "phone@2": "", "tablet": "", "tablet@2": "" }, "deviceTypes": { "desktop": true, "tablet": true, "phone": true }, "supportedThemes": [ "sap_hcb", "sap_belize" ] }, "sap.ui5": { "rootView": { "viewName": "KK_UI5ZCMA01_KK_UI5.view.View1", "type": "XML" }, "dependencies": { "minUI5Version": "1.30.0", "libs": { "sap.ui.core": {}, "sap.m": {}, "sap.ui.layout": {}, "sap.ushell": {}, "sap.collaboration": {}, "sap.ui.comp": {}, "sap.uxap": {} } }, "contentDensities": { "compact": true, "cozy": true }, "models": { "i18n": { "type": "sap.ui.model.resource.ResourceModel", "settings": { "bundleName": "KK_UI5ZCMA01_KK_UI5.i18n.i18n" } }, "": { "settings": {}, "dataSource": "ZCMA01_KK_SERVICE_SRV", "preload": true
  43. 43. } }, "routing": { "config": { "routerClass": "sap.m.routing.Router", "viewType": "XML", "viewPath": "KK_UI5ZCMA01_KK_UI5.view", "controlId": "KK_UI5ZCMA01_KK_UI5", "controlAggregation": "pages", "transition": "slide" }, "routes": [ { "pattern": "", "name": "r_welcome", "target": "t_airline" }, { "pattern": "p_air_conn/{iv_carrid}", "name": "r_air_conn", "target": "t_connection" }, { "pattern": "p_conn_fli/{iv_carrid},{iv_connid}", "name": "r_conn_fli", "target": "t_flight" } ], "targets": { "t_airline": { "viewName": "Airline", "viewLevel": 1 }, "t_connection": { "viewName": "Connection", "viewLevel": 2 }, "t_flight": { "viewName": "Flight", "viewLevel": 3 } } }, "resources": { "css": [ { "uri": "css/style.css" } ] } } } Connection’dan VeriGöndermek Connection.view.xml  Open with  Layout editor Sap.m.Table  Events  Selection Change
  44. 44. Controls  Container  Bar  Sürükle & bırak Controls  Action  Button  Sürükle & bırak
  45. 45. Button  Events  Press
  46. 46. Connection.controller.js sap.ui.define(["sap/ui/core/mvc/Controller"], function(Controller) { "use strict"; var oView = null; var selObj = null; return Controller.extend("KK_UI5ZCMA01_KK_UI5.controller.Connection", { onInit: function() { oView = this.getView(); var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.getRoute("r_air_conn").attachPatternMatched(this.navFromAirline, this); }, navFromAirline: function(oEvent) { var sCarrid = oEvent.getParameter("arguments").iv_carrid; var sPath = "/AirlineSet('" + sCarrid + "')"; oView.bindElement({ path: sPath }); }, onSelect: function(evt) { var selPath = evt.getSource().getSelectedItem().getBindingContext().getPath(); var oModel = oView.getModel(); selObj = oModel.getProperty(selPath); }, onFlightPress: function() { if (selObj === null) return; var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.navTo("r_conn_fli", { "iv_carrid": selObj.Carrid, "iv_connid": selObj.Connid }); } }); });
  47. 47. Flight’ta Veri Gösterimi controller/Flight.controller.js sap.ui.define([ "sap/ui/core/mvc/Controller" ], function(Controller) { "use strict"; var oView = null; return Controller.extend("KK_UI5ZCMA01_KK_UI5.controller.Flight", { onInit: function() { oView = this.getView(); var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.getRoute("r_conn_fli").attachPatternMatched(this.navFromConn, this); }, navFromConn: function(oEvent) { var sCarrid = oEvent.getParameter("arguments").iv_carrid; var sConnid = oEvent.getParameter("arguments").iv_connid; oView.bindElement({ path: "/ConnectionSet(Carrid='" + sCarrid + "',Connid='" + sConnid + "')" }); } }); }); Test
  48. 48. Not Liste Sayfası View Oluşturma webapp  New  SAPUI5 View Notes.view.xml  Open with  Layout editor  Outline
  49. 49. Notes.view.xml  Data Set = /ConnectionSet Controls  Title’ı değiştirebiliriz List  List  Sürükle & bırak, 2 ve 3. Satırları sil
  50. 50. Outline  sap.m.List  items  sap.m.StandardListItem  Data Set = /ConnectionSet/NAV_CONN_NOTE ve listedeki değerleri değiştiriyoruz. Notes.controller.js içerisine, buradaki Connection’u atayacak bir kod ekliyoruz. sap.ui.define([ "sap/ui/core/mvc/Controller" ], function(Controller) { "use strict"; var oView = null; var sCarrid = ""; var sConnid = ""; return Controller.extend("KK_UI5ZCMA01_KK_UI5.controller.Notes", { onInit: function() { oView = this.getView(); }, setConnection: function(Carrid, Connid) { sCarrid = Carrid; sConnid = Connid; var sPath = "/ConnectionSet(Carrid='" + sCarrid + "',Connid='" + sConnid + "')"; oView.bindElement({ path: sPath }); } }); }); Connection  Notes
  51. 51. Connection.view.xml dosyasına XML View’u ekliyoruz <mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:html="http://www.w3.org/1999/xhtml" controllerName="KK_UI5ZCMA01_KK_UI5.controller.Connection"> <App> <pages> <Page title="Connection"> <content> <Text text="{Carrname}" id="__text3"/> <Table noDataText="Drop column list items here and columns in the area above" id="__table0" mode="SingleSelectLeft" items="{NAV_AIR_CONN}" selectionChange="onSelect"> <items> <ColumnListItem id="__item0"> <cells> <Text text="{Connid}" id="__text0"/> <Text text="{Cityfrom}" id="__text1"/> <Text text="{Cityto}" id="__text2"/></cells> </ColumnListItem></items> <columns> <Column id="__column0"> <header> <Label text="ID" id="__label0"/> </header> </Column> <Column id="__column1"> <header> <Label text="From" id="__label1"/> </header> </Column> <Column id="__column2"> <header> <Label text="To" id="__label2"/> </header> </Column></columns></Table> <mvc:XMLView id="vnote" viewName="KK_UI5ZCMA01_KK_UI5.view.Notes"></mvc:XMLView> </content> <footer> <Bar class="sapContrast sapContrastPlus" id="__bar0"> <contentRight> <Button text="Flights" width="100px" id="__button0" press="onFlightPress"/> </contentRight> </Bar> </footer> </Page> </pages> </App> </mvc:View> Connection.view.xml  Open with  Layout Editor
  52. 52. Connection.controller.js içerisine, Connection seçildiğinde not View’u içerisindeki veriyi güncelleyecek kodu ekliyoruz. sap.ui.define(["sap/ui/core/mvc/Controller"], function(Controller) { "use strict"; var oView = null; var selObj = null; return Controller.extend("KK_UI5ZCMA01_KK_UI5.controller.Connection", { onInit: function() { oView = this.getView(); var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.getRoute("r_air_conn").attachPatternMatched(this.navFromAirline, this); }, navFromAirline: function(oEvent) { var sCarrid = oEvent.getParameter("arguments").iv_carrid; var sPath = "/AirlineSet('" + sCarrid + "')"; oView.bindElement({ path: sPath }); }, onSelect: function(evt) { var selPath = evt.getSource().getSelectedItem().getBindingContext().getPath(); var oModel = oView.getModel(); selObj = oModel.getProperty(selPath); sap.ui.controller("KK_UI5ZCMA01_KK_UI5.controller.Notes").setConnection(selObj.Carri d, selObj.Connid); }, onFlightPress: function() {
  53. 53. if (selObj === null) return; var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.navTo("r_conn_fli", { "iv_carrid": selObj.Carrid, "iv_connid": selObj.Connid }); } }); }); Test Not Detay Sayfası View Oluşturma webapp  New  SAPUI5 View Note.view.xml  Open with  Layout editor  Outline
  54. 54. Note.view.xml  Data Set = /NoteSet Controls  Title’ı değiştirebiliriz Controls  Layout  Form’u sürükleyip bıraktıktan sonra, yeni bir Form oluşturabiliriz. NoteId alanının ElementID’sini değiştiriyoruz.
  55. 55. Note.controller.js içerisine, burada istediğimiz notu gösterebilmek için bir kod ekliyoruz. sap.ui.define([ "sap/ui/core/mvc/Controller" ], function(Controller) { "use strict"; var oView = null; var sCarrid = ""; var sConnid = ""; var sNoteid = ""; return Controller.extend("KK_UI5ZCMA01_KK_UI5.controller.Note", { onInit: function() { oView = this.getView(); }, setNote: function(Carrid, Connid, Noteid) { sCarrid = Carrid; sConnid = Connid; sNoteid = Noteid; var sPath = "/NoteSet(Carrid='" + sCarrid + "',Connid='" + sConnid + "',Noteid='" + sNoteid + "')"; oView.bindElement({ path: sPath }); oView.byId("txtNoteid").setEnabled(false); } }); }); Notes  Note Notes.view.xml dosyasına XML View’u ekliyoruz. <mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:html="http://www.w3.org/1999/xhtml" controllerName="KK_UI5ZCMA01_KK_UI5.controller.Notes"> <App> <pages> <Page title="Notes"> <content> <List noDataText="Drop list items here" id="__list0" items="{NAV_CONN_NOTE}"> <items> <StandardListItem type="Navigation" title="{Stext}" description="{Noteid}" icon="sap-icon://picture" id="__item0"/></items> </List> <mvc:XMLView id="vnote" viewName="KK_UI5ZCMA01_KK_UI5.view.Note"/>
  56. 56. </content> </Page> </pages> </App> </mvc:View> Notes.view.xml  Open with  Layout Editor Outline  sap.m.List  Mode = SingleSelectLeft Outline  sap.m.List  Events  Selection Change
  57. 57. Notes.controller.js sap.ui.define(["sap/ui/core/mvc/Controller"], function(Controller) { "use strict"; var oView = null; var sCarrid = ""; var sConnid = ""; var selObj = null; return Controller.extend("KK_UI5ZCMA01_KK_UI5.controller.Notes", { onInit: function() { oView = this.getView(); }, setConnection: function(Carrid, Connid) { sCarrid = Carrid; sConnid = Connid; var sPath = "/ConnectionSet(Carrid='" + sCarrid + "',Connid='" + sConnid + "')"; oView.bindElement({ path: sPath }); }, onSelect: function(evt) { var selPath = evt.getSource().getSelectedItem().getBindingContext().getPath(); var oModel = oView.getModel(); selObj = oModel.getProperty(selPath); sap.ui.controller("KK_UI5ZCMA01_KK_UI5.controller.Note").setNote(selObj.Carrid, selObj.Connid, selObj.Noteid); } }); }); Test
  58. 58. Not Yaratma Note Note.view.xml içerisinde tüm kontrollere mantıklı isimler veriyoruz. <mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:html="http://www.w3.org/1999/xhtml" controllerName="KK_UI5ZCMA01_KK_UI5.controller.Note"> <App> <pages> <Page title="Note"> <content> <sap.ui.layout.form:Form xmlns:sap.ui.layout.form="sap.ui.layout.form" editable="true" id="__form0"> <sap.ui.layout.form:formContainers> <sap.ui.layout.form:FormContainer title="Note details" id="__container0"> <sap.ui.layout.form:formElements> <sap.ui.layout.form:FormElement label="ID" id="__element0"> <sap.ui.layout.form:fields> <Input width="100%" id="txtNoteid" value="{Noteid}"/> </sap.ui.layout.form:fields> </sap.ui.layout.form:FormElement> <sap.ui.layout.form:FormElement label="Text" id="__element1"> <sap.ui.layout.form:fields> <Input width="100%" id="txtStext" value="{Stext}"/> </sap.ui.layout.form:fields> </sap.ui.layout.form:FormElement> </sap.ui.layout.form:formElements> </sap.ui.layout.form:FormContainer> </sap.ui.layout.form:formContainers> <sap.ui.layout.form:layout>
  59. 59. <sap.ui.layout.form:ResponsiveGridLayout id="__layout0"/> </sap.ui.layout.form:layout></sap.ui.layout.form:Form> </content> </Page> </pages> </App> </mvc:View> Note.view.xml içerisine kaydetmek için yeni bir buton ekleyip, Event ekliyoruz. Note.controller.js sap.ui.define(["sap/ui/core/mvc/Controller"], function(Controller) { "use strict"; var oView = null; var sCarrid = ""; var sConnid = ""; var sNoteid = ""; return Controller.extend("KK_UI5ZCMA01_KK_UI5.controller.Note", { onInit: function() { oView = this.getView(); }, setNote: function(Carrid, Connid, Noteid) { sCarrid = Carrid; sConnid = Connid; sNoteid = Noteid; var sPath = "/NoteSet(Carrid='" + sCarrid + "',Connid='" + sConnid + "',Noteid='" + sNoteid + "')"; oView.bindElement({ path: sPath }); oView.byId("txtNoteid").setEnabled(false); }, clearView: function() { oView.byId("txtNoteid").setValue(""); oView.byId("txtStext").setValue("");
  60. 60. oView.byId("txtNoteid").setEnabled(true); }, newNote: function(Carrid, Connid) { sCarrid = Carrid; sConnid = Connid; sNoteid = ""; this.clearView(); }, onSavePress: function() { var oNote = { Carrid: sCarrid, Connid: sConnid, Noteid: oView.byId("txtNoteid").getValue(), Stext: oView.byId("txtStext").getValue() }; var oModel = oView.getModel(); oModel.create("/NoteSet", oNote, null, function() { sap.m.MessageToast.show("Not yaratıldı", {duration: 3000} ); }, function() { $.sap.log.info("Error"); }); } }); }); Notes Notes.view.xml içerisine, yeni not oluşturacak bir buton ve arkasına bir Event ekliyoruz. Notes.controller.js sap.ui.define(["sap/ui/core/mvc/Controller"], function(Controller) { "use strict"; var oView = null; var sCarrid = ""; var sConnid = ""; var selObj = null;
  61. 61. return Controller.extend("KK_UI5ZCMA01_KK_UI5.controller.Notes", { onInit: function() { oView = this.getView(); }, setConnection: function(Carrid, Connid) { sCarrid = Carrid; sConnid = Connid; var sPath = "/ConnectionSet(Carrid='" + sCarrid + "',Connid='" + sConnid + "')"; oView.bindElement({ path: sPath }); }, onSelect: function(evt) { var selPath = evt.getSource().getSelectedItem().getBindingContext().getPath(); var oModel = oView.getModel(); selObj = oModel.getProperty(selPath); sap.ui.controller("KK_UI5ZCMA01_KK_UI5.controller.Note").setNote(selObj.Carrid, selObj.Connid, selObj.Noteid); }, onCreatePress: function(evt) { sap.ui.controller("KK_UI5ZCMA01_KK_UI5.controller.Note").newNote(sCarrid, sConnid); } }); }); Test
  62. 62. Not Güncelleme Note.controller.js sap.ui.define(["sap/ui/core/mvc/Controller"], function(Controller) { "use strict"; var oView = null; var sCarrid = ""; var sConnid = ""; var sNoteid = ""; return Controller.extend("KK_UI5ZCMA01_KK_UI5.controller.Note", { onInit: function() { oView = this.getView(); }, setNote: function(Carrid, Connid, Noteid) { sCarrid = Carrid; sConnid = Connid; sNoteid = Noteid; var sPath = "/NoteSet(Carrid='" + sCarrid + "',Connid='" + sConnid + "',Noteid='" + sNoteid + "')"; oView.bindElement({ path: sPath }); oView.byId("txtNoteid").setEnabled(false); }, clearView: function() { oView.byId("txtNoteid").setValue(""); oView.byId("txtStext").setValue(""); oView.byId("txtNoteid").setEnabled(true); }, newNote: function(Carrid, Connid) { sCarrid = Carrid; sConnid = Connid; sNoteid = ""; this.clearView(); }, onSavePress: function() { var oNote = { Carrid: sCarrid, Connid: sConnid, Noteid: oView.byId("txtNoteid").getValue(), Stext: oView.byId("txtStext").getValue() }; var oModel = oView.getModel(); if (sNoteid === "") { oModel.create("/NoteSet", oNote, null, function() { sap.m.MessageToast.show("Not yaratıldı", {duration: 3000} ); }, function() { $.sap.log.info("Error"); }); } else { var sPath = "/NoteSet(Carrid='" + sCarrid + "',Connid='" + sConnid + "',Noteid='" + oView.byId("txtNoteid").getValue() + "')"; oModel.update(sPath, oNote, null, function() { sap.m.MessageToast.show("Not güncellendi", {duration: 3000} ); }, function() { $.sap.log.info("Error");
  63. 63. }); } } }); }); Test Not Silme Note.view.xml içerisine, not silmek için bir buton ve arkasına Event ekliyoruz.
  64. 64. Note.controller.js sap.ui.define(["sap/ui/core/mvc/Controller"], function(Controller) { "use strict"; var oView = null; var sCarrid = ""; var sConnid = ""; var sNoteid = ""; return Controller.extend("KK_UI5ZCMA01_KK_UI5.controller.Note", { onInit: function() { oView = this.getView(); }, setNote: function(Carrid, Connid, Noteid) { sCarrid = Carrid; sConnid = Connid; sNoteid = Noteid; var sPath = "/NoteSet(Carrid='" + sCarrid + "',Connid='" + sConnid + "',Noteid='" + sNoteid + "')"; oView.bindElement({ path: sPath }); oView.byId("txtNoteid").setEnabled(false); }, clearView: function() { oView.byId("txtNoteid").setValue(""); oView.byId("txtStext").setValue(""); oView.byId("txtNoteid").setEnabled(true); }, newNote: function(Carrid, Connid) { sCarrid = Carrid; sConnid = Connid; sNoteid = ""; this.clearView(); }, onSavePress: function() { var oNote = { Carrid: sCarrid, Connid: sConnid, Noteid: oView.byId("txtNoteid").getValue(), Stext: oView.byId("txtStext").getValue() };
  65. 65. var oModel = oView.getModel(); if (sNoteid === "") { oModel.create("/NoteSet", oNote, null, function() { sap.m.MessageToast.show("Not yaratu0131ldu0131", { duration: 3000 }); }, function() { $.sap.log.info("Error"); }); } else { var sPath = "/NoteSet(Carrid='" + sCarrid + "',Connid='" + sConnid + "',Noteid='" + oView.byId("txtNoteid").getValue() + "')"; oModel.update(sPath, oNote, null, function() { sap.m.MessageToast.show("Not gxFCncellendi", { duration: 3000 }); }, function() { $.sap.log.info("Error"); }); } }, onDelPress: function() { this.clearView(); var sPath = "/NoteSet(Carrid='" + sCarrid + "',Connid='" + sConnid + "',Noteid='" + sNoteid + "')"; var oModel = oView.getModel(); oModel.remove( sPath, { method: "DELETE", success: function(data) { $.sap.log.info("Success"); }, error: function(e) { $.sap.log.info("Error"); } } ); } }); }); Test
  66. 66. Deployment Web IDE  Gateway Projeye sağ tıklayıp, Deploy  Deploy to SAP UI5
  67. 67. Gateway  SE80
  68. 68. Launchpad Checklist Application ZCMA01_KK_APP URL /sap/bc/ui5_ui5/sap/zcma01_kk_app
  69. 69. Lauchpad (henüz tanımlamadık) Application Alias (henüz tanımlamadık) Semantik Nesne (henüz tanımlamadık) Katalog (henüz tanımlamadık) Grup (henüz tanımlamadık) Rol (henüz tanımlamadık) Lauchpad Tanımı LPD_CUST –> New Launchpad Application ZCMA01_KK_APP URL /sap/bc/ui5_ui5/sap/zcma01_kk_app Lauchpad ZCMA01_KK Application Alias (henüz tanımlamadık) Semantik Nesne (henüz tanımlamadık) Katalog (henüz tanımlamadık) Grup (henüz tanımlamadık) Rol (henüz tanımlamadık) Toolbar  New Application
  70. 70. Buradaki SAPUI5.Component değeri SE80’den alınabilir Kaydediyoruz. Application ZCMA01_KK_APP URL /sap/bc/ui5_ui5/sap/zcma01_kk_app Lauchpad ZCMA01_KK Application Alias ZCMA01_KK_ALIAS Semantik Nesne (henüz tanımlamadık) Katalog (henüz tanımlamadık) Grup (henüz tanımlamadık) Rol (henüz tanımlamadık) Semantik Nesne /UI2/SEMOBJ  Yeni kayıt
  71. 71. Application ZCMA01_KK_APP URL /sap/bc/ui5_ui5/sap/zcma01_kk_app Lauchpad ZCMA01_KK Application Alias ZCMA01_KK_ALIAS Semantik Nesne ZCMA01_KK_SEM Katalog (henüz tanımlamadık) Grup (henüz tanımlamadık) Rol (henüz tanımlamadık) Launchpad İçeriği Sayfaya Erişim /UI2/FLPD_CUST Eğitime özel bir durum var. http://vhcala4hci.dummy.nodomain:50000/sap/bc/ui5_ui5/sap/arsrvc_upb_admn/main.html?s cope=CUST&sap-client=001&sap-language=EN gibi bir adres açılacak. Buradaki Domain adresini, IP ile değiştiriyoruz. Örnek: http://54.89.172.39:50000/sap/bc/ui5_ui5/sap/arsrvc_upb_admn/main.html?scope=CUST&sa p-client=001&sap-language=EN Bu adres ikinci bir adrese FWD edecek, onu da IP ile değiştiriyoruz. Örnek: https://54.89.172.39:50001/sap/bc/ui5_ui5/sap/arsrvc_upb_admn/main.html?scope=CUST
  72. 72. Katalog Catalogs  New
  73. 73. Application ZCMA01_KK_APP URL /sap/bc/ui5_ui5/sap/zcma01_kk_app Lauchpad ZCMA01_KK Application Alias ZCMA01_KK_ALIAS Semantik Nesne ZCMA01_KK_SEM Katalog ZCMA01_KK_CATALOG Grup (henüz tanımlamadık) Rol (henüz tanımlamadık) Target Mapping  Create
  74. 74. Tiles  Create  Static Grup Groups  New Add  ZCMA01_KK_CATALOG  Test Tile
  75. 75. Application ZCMA01_KK_APP URL /sap/bc/ui5_ui5/sap/zcma01_kk_app Lauchpad ZCMA01_KK Application Alias ZCMA01_KK_ALIAS Semantik Nesne ZCMA01_KK_SEM Katalog ZCMA01_KK_CATALOG Grup ZCMA01_KK_GROUP Rol (henüz tanımlamadık)
  76. 76. ROL PFCG  Single Role User  (kendi kullanıcınız) Menu  Add  SAP Fiori Tile Catalog
  77. 77. Menu  Add  SAP Fiori Tile Group
  78. 78. Application ZCMA01_KK_APP URL /sap/bc/ui5_ui5/sap/zcma01_kk_app Lauchpad ZCMA01_KK Application Alias ZCMA01_KK_ALIAS Semantik Nesne ZCMA01_KK_SEM Katalog ZCMA01_KK_CATALOG Grup ZCMA01_KK_GROUP Rol ZCMA01_KK_ROLE Test /UI2/FLP
  79. 79. CDS ViewList Report CDS View @AbapCatalog.sqlViewName: 'ZCMA01_KK_V01' @AbapCatalog.compiler.compareFilter: true @AccessControl.authorizationCheck: #NOT_REQUIRED @EndUserText.label: 'Flight CDS View' @OData.publish: true @UI.headerInfo: { typeName: 'Flight CDS View', typeNamePlural: 'Flights CDS View',
  80. 80. title: { type: #STANDARD, value: 'SCARR.CARRNAME' }, description: { type: #STANDARD, value: 'SPFLI.COUNTRYFR' } } @Search.searchable: true define view ZCMA01_KK_FLIGHT as select from sflight inner join scarr on scarr.carrid = sflight.carrid inner join spfli on spfli.carrid = sflight.carrid and spfli.connid = sflight.connid { @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 } @UI: { lineItem.position: 10, selectionField.position: 10, identification.position: 10 } key sflight.carrid, @Search: { ranking: #MEDIUM, fuzzinessThreshold: 0.8 } @UI: { lineItem.position: 20, selectionField.position: 20, identification.position: 20 } key sflight.connid, key sflight.fldate, @DefaultAggregation: #SUM @Semantics.amount.currencyCode: 'CURRENCY' sflight.price, @Semantics.currencyCode: true sflight.currency, scarr.carrname, spfli.countryfr, spfli.countryto }
  81. 81. OData /sap/opu/odata/sap/ZCMA01_KK_FLIGHT_CDS/ZCMA01_KK_FLIGHT
  82. 82. SAP UI5 New  List Report Application

×