Essence of S/4HANA - Exercise Guide: Pre-Requisites

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Essence of S/4HANA - Exercise Guide

Pre-requisites:
OS: Windows 7, 8 or 10 OR Mac OS X 10.10, Universal 64-Bit

JRE version 1.8, 32-Bit or 64-Bit depending on your OS (most likely is 64-Bit, you can check via Control
Panel  System and Security  System)

Check the installation of jre in your machine via Control Panel Program  Programs and Features

You can install the latest jre from software corner and jdk from here:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Microsoft VC runtime: For Windows OS: DLLs VS2010 for communication with the backend system is
required.

Install from here: http://www.microsoft.com/download/details.aspx?id=14632 (64-Bit vesion)

Note: Even if you have a more recent version of the Microsoft Visual C++ runtime libraries, you still need
to install the Microsoft Visual Studio C++ 2010 libraries.

Users:

Get a user in SD4 (CD S/4HANA Sandbox)

Register for HANA Cloud Platform Trial and subscribe to Web IDE
SAP S/4HANA Sandbox (ABAP)

Client                    001

User ID                SAP-Name

Password            Will be provided

SID                         SD4

Server                  ldcisd4.wdf.sap.corp

Instance              02

Software Installations & configurations

1. Install eclipse Neon

http://www.eclipse.org/downloads/eclipse-packages/ Try the eclipse installer for Windows (64-Bit)

2. Install ABAP Development Tools for Eclipse

 In eclipse, choose in menu bar Help  Install New Software…


 For eclipse Neon, add the URL https://tools.hana.ondemand.com/neon
 Press Enter to display the available features
 Select ABAP Development Tools for SAP NetWeaver and choose Next
 On the next wizard page, you get an overview of the features to be installed. Choose Next.
 Confirm the license agreements and choose Finish to start the installation

Check if installation is OK:

1. Start eclipse neon


2. Change perspective to SAP HANA Development
3. Create new ABAP Project
4. Use the sandbox configuration provided above and your user and password to login

3. Install SAP HANA Cloud Connector

https://tools.hana.ondemand.com/#cloud : Choose msi installer as its simple 

Check if installation is OK: Start the program SAP HANA Cloud Connector and Run as Administrator

Troubleshooting: If you encounter an error, it’s most likely due to VC++ runtime libraries. From
programs and Features, uninstall the latest 2010 package and reinstall from the link given above. Finally
you must have the following version:
4. Configure SAP HANA Cloud Connector

Start browser and enter https://localhost:8443/

Accept security warnings and proceed

In the logon page, login with the following credentials:

User: Administrator

Password: manage

You should get the change password screen and please immediately change your password.

Proxy settings:

Host: proxy.wdf.sap.corp
Port: 8080

Account settings:

Account: Your HANA Trial account user (<iuser>trial)

Password: Domain password

Cloud to on-premise:

Backend Type: SAP Gateway

Protocol: HTTP

Internal Host: ldcisd4.wdf.sap.corp

Port: 50002

Resources accessible:

URL Path: /sap/opu/odata

Select the radio button Path and All sub-paths

https://help.sap.com/viewer/cca91383641e40ffbe03bdc78f00f681/Cloud/en-
US/db9170a7d97610148537d5a84bf79ba2.html#loiodb9170a7d97610148537d5a84bf79ba2__log_in

https://code-fiori.dispatcher.cert.hana.ondemand.com/
If all is well, Account Dashboard should show “Connected” status.

4. Login to SD4

Add SD4 to SAP Logon pad and login once.

5. Configure SAP HANA Cloud Platform

Login to HCP trial. Link: https://account.hanatrial.ondemand.com

From the left pane, click on Connectivity and choose ‘Cloud Connectors’. You must see a view as given
below:

Again from the left pane, click on Connectivity and choose ‘Destinations’. Add a new destination as given
below:

Note: Add properties precisely as given in the image.

Click on ‘Check Connection’. You should get the following message:


Data model for exercise

As you can see in the data model above, SFLIGHT is an aggregate table that collects the occupied seats
every time a booking / cancellation is done.

Our objective is to replace this with a CDS view that calculates occupied seats at runtime from SBOOK.

We will create a single CDS view that does selection, calculation and grouping.

Exercise 1: Create CDS View and Test

Step 1. Open eclipse and change to SAP HANA Development perspective


Step 2. If you have not done before, create new ABAP project and enter the system, user & password
details

Step 3. Click on New  Other and Choose ABAP  Core Data Services  Data Definition

Step 4. Choose the project created in Step 2 and enter $TMP in package. Provide a name that starts with
Z and a description. Choose Next.

Step 5. No transport required. Click Finish. Repository objects are created now and a default template
data definition view is opened.

Step 6. Create the CDS definition with annotations. Sample code given below:
@AbapCatalog.sqlViewName: 'Zbook_pbk_view'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Zbooking_PBK'
define view Zbooking_Pbk as select from sbook
{
key sbook.carrid as Carrier_ID,
key sbook.connid as Connection_ID,
key sbook.fldate as Flight_Date,
count(distinct sbook.bookid) as Booked_Seats,
sum(sbook.loccuram) as Ticket_Amount
}
group by sbook.carrid, sbook.connid, sbook.fldate;

DO NOT COPY PASTE BUT ADAPT.

Step 7. Activate. Right click on the View and Activate. DDIC view is created now.

Step 8. Access the view via SD4  SE11 or simply refresh the ABAP project and double click on the view.
DDIC view appears in a new tab in eclipse perspective.

Step 9. Click on Contents icon on the DDIC view

Step 10. You should see CDS in action and the power of HANA!! 

End result:
Exercise 2. Create OData service for the CDS and Test

Step 1: Logon to SD4 and start transaction SEGW

Step 2. Create a new GW Project in Z namespace of type ‘Service with SAP Annotations’ and save as
local object

Step 3. Right click on the data model node and choose Reference  Data Source

Step 4. Search for and select the CDS view created in the previous exercise

Step 5. Generate runtime objects from the main menu. In Runtime artifacts node, you should see the
service generated with suffix ‘SRV’.
Step 6. Start transaction /IWFND/MAINT_SERVICE

Step 7. Use Find option to locate the service and select. Default system alias is ‘LOCAL’. Leave it like this.
Step 8. In the ICF nodes view, you can choose to test via browser or SAP Gateway client. Click on SAP
Gateway Client.

Step 9. Click on execute. A status code 200 means ‘All is well’. But this is just the metadata query.

Step 10. Click on ‘EntitySets’ on the main menu and choose the associated entity set. Now execute to
get the complete data query.

End result:

Exercise 3: Create a Fiori List View and Test

Step 1. Logon to SAP HANA Cloud Platform trial edition: https://account.hanatrial.ondemand.com

Step 2. Go to Services and choose SAP Web IDE. Open Web IDE.

Step 3. Choose File  New  Project from template

Step 4. Choose List Report Application. Click Next.


Step 5. Provide a project name and title. Click Next.

Step 6. Choose Service Catalog and from the drop down select SD4

Step 7. Data connection would be established and you must see the list of services. Search for your
service, select and click on Next.
Step 8. Skip the Annotation Selection step and Click Next

Step 9. Select the corresponding OData Collection and Click on Finish

Step 10. The project is created that you can straightaway ‘Run’. Right click on the project and Choose
Run  Run flpSandbox.html

Step 11. A Fiori launch pad should appear as given below with the created Fiori application on top:
Step 12. Click on the App. A blank page will appear. Click on the ‘Settings’ button and select all columns.
Click on Go. That’s it!

Congratulations if you get a view as below:

You might also like