End to End Development Example in SAP® NetWeaver 7.4 & SAP® HANA SAP NetWeaver 2013 - Developer Experience III Author: Jens Weiler – [email protected] Target Audience (cid:374) Developer (cid:374) Consultants For Public usage Document version 1.00 – May 9th, 2013 Installation Guide: ABAP Development Tools for SAP NetWeaver Contents 1 Remarks before you start............................................................... 3 2 The Scenario .................................................................................. 4 2.1 Description ..................................................................................... 4 2.2 Scenario Procedure ....................................................................... 4 2.3 Data model ..................................................................................... 4 2.3.1 SNWD_BPA .......................................................................................................... 5 2.3.2 SNWD_SO_INV_HEAD ......................................................................................... 5 2.3.3 SNWD_SO_INV_ITEM .......................................................................................... 5 2.4 Full Reference Application ........................................................... 5 3 Technical Prerequisites .................................................................. 6 3.1 Install SAP HANA Studio .............................................................. 6 3.1.1 Only relevant if your HANA Studio version is lower than 1.0.55 .......................... 6 3.2 Install needed Eclipse Plug-Ins .................................................... 6 3.3 Enter system in SAP Logon.......................................................... 9 3.4 Adding your system to the ABAP Development Tools .............. 9 3.5 Generate Example Data............................................................... 13 3.6 ICF Configuration ........................................................................ 17 3.7 Customizing for the Scenario ..................................................... 19 3.8 Customizing for UI5 & Gateway Services ................................. 23 4 Classical ABAP Implementation .................................................. 25 5 ABAP & HANA Implementation ................................................... 28 5.1 SAP HANA Calculation View ...................................................... 28 5.2 ABAP External view..................................................................... 40 5.3 SAP NetWeaver Gateway Service .............................................. 44 5.4 SAP UI5 Implementation ............................................................. 58 6 Appendix ...................................................................................... 69 6.1 ADT Shortcuts .............................................................................. 69 6.1.1 Edit .................................................................................................................... 69 6.1.2 Help ................................................................................................................... 69 6.1.3 Navigate ............................................................................................................ 69 6.1.4 Run, Debug ........................................................................................................ 69 6.2 SAP HANA Development Guide ................................................. 70 6.3 SAP HANA SQL Script Reference .............................................. 70 6.4 Full SQL Script coding of Calculation View BUPA_Figures .... 70 2 1 Remarks before you start (cid:76) This demo can be executed on an SAP NetWeaver AS ABAP 7.4 running on a SAP HANA database SPS5 or higher. (cid:76) All screenshots have been made in a AS ABAP System with SID “A4H” installed in the HANA Database Schema “SAPH74”. Please consider to adapt this based on the SID and schema of your System. (cid:76) All ABAP Entities have been created in the “$TMP” Package of the user “DEV4CLONE”. (cid:76) All HANA Entities have been created in the HANA Package system-local.A4H and the user “SYSTEM”. (cid:76) You will need users on SAP NetWeaver AS ABAP and SAP HANA. o AS ABAP users need to have at least the following role assigned: (cid:131) SAP_BC_DWB_ABAPDEVELOPER (cid:131) SAP_BC_DWB_WBDISPLAY (cid:131) /IWFND/RT_DEVELOPER (For Gateway Service Development) o HANA User needs the HANA Role “ABAP_DEV”. (cid:76) The screenshots have been created based on HANA Studio for SAP HANA SPS5 and can differ with respect to other HANA releases. (cid:76) For more details, information and guides based on SAP NetWeaver AS ABAP and SAP HANA please visit our SCN Page: http://scn.sap.com/docs/DOC-35518 3 Description 2 The Scenario 2.1 Description The scenario you are going to implement is a part of the reference scenario delivered with AS ABAP 7.40 SP2. It will give you an overview about different business figures based on open invoices. Including the average number of days the invoices of a customer are open, the sum of the amount of these open invoices (including currency conversion) and a flag set by customization values to identify critical customers. 2.2 Scenario Procedure 2.3 Data model The data model you will be using consists of 3 tables. Each table has a primary key (datatype GUID) called NODE_KEY together with CLIENT. 4 Full Reference Application 2.3.1 SNWD_BPA This table contains all relevant data of the business partner for this scenario. 2.3.2 SNWD_SO_INV_HEAD This is the header table of the invoices containing the BUYER_GUID, which is connected in a 1:1 relation to the SNWD_BPA table. 2.3.3 SNWD_SO_INV_ITEM The Invoices Item table containing all items of a invoice in different currencies. The PARENT_KEY contains the SNWD_INV_HEAD-NODE_KEY connecting the item and header table with a n:1 relation. 2.4 Full Reference Application The scenario described here is just a part of the full reference application, showing you more details how ABAP on HANA can be leveraged. For more details start Transaction “SEPM_OIA” in your AS ABAP. 5 Install SAP HANA Studio 3 Technical Prerequisites 3.1 Install SAP HANA Studio The HANA Studio Installer is available with your SAP HANA Installation DVD or through the Service Market Place. Please keep in mind to always use the version of the SAP HANA Studio corresponding to the installed version of your SAP HANA Database. HDBSetup.exe can be started with parameters “ -a studio” for installing only the SAP HANA Studio. The HANA version must be least 1.0.55 in order to install the following Plug-Ins. Important Remark: If you install your SAP HANA Studio or Eclipse in the “Program Files” Folder you must always run it with Administrator Privileges. We would advise to not install it under this folder. If your version is 1.055 or higher you can continue with 3.2 and ignore the next paragraph. 3.1.1 Only relevant if your HANA Studio version is lower than 1.0.55 Please use 2 different Eclipse Installation: The SAP HANA Studio itself as standalone and a separate Eclipse Juno, version 4.2 or higher (http://www.eclipse.org/). The guide will always show the process only with one eclipse. Please use SAP HANA Studio only for chapters relevant with HANA configuration & development (Eclipse Views “Modeler” or “Administration Console”). 3.2 Install needed Eclipse Plug-Ins 1. Open SAP HANA Studio and in the “Help” menu open the entry “Install new Software…” 2. Click on “Add...” to add the needed update Sites for the Plug-Ins. 6 Install needed Eclipse Plug-Ins 3. Add the listed updatesite to your Repository. Name Location SAP DT Tools https://tools.hana.ondemand.com/juno 4. Check the following Plug-Ins according to the screenshot below 7 Install needed Eclipse Plug-Ins 5. The next screen shows a summary of Plug-Ins - just click next. 6. Accept the terms of the license agreements and click Finish. 7. Please press OK if one or two Security Warning appears 8. Last step for this chapter is to restart Eclipse if you are asked for. 8 3.3 Enter system in SAP Logon To add a ABAP System to the ABAP Development Tools you need to create the entry for your system in the SAP Logon. 1. Open SAP Logon 2. Click New System 3. Add your System and Finish 3.4 Adding your system to the ABAP Development Tools 1. Start SAP HANA Studio and click on Workbench if the overview screen shows up. 9 Adding your system to the ABAP Development Tools 2. Add the ABAP Perspective to access your ABAP System. Go to Menu: Window -> Open Perspective -> Other 3. Add the ABAP Perspective to access your ABAP System by first clicking on “ABAP” and afterwards on the OK Button 10
Description: