Essence of S/4HANA - Exercise Guide: Pre-Requisites
Essence of S/4HANA - Exercise Guide: Pre-Requisites
Essence of S/4HANA - Exercise Guide: Pre-Requisites
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.
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:
Register for HANA Cloud Platform Trial and subscribe to Web IDE
SAP S/4HANA Sandbox (ABAP)
Client 001
SID SD4
Server ldcisd4.wdf.sap.corp
Instance 02
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
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:
Cloud to on-premise:
Protocol: HTTP
Port: 50002
Resources accessible:
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
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:
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.
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;
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 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 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:
Step 2. Go to Services and choose SAP Web IDE. Open Web IDE.
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 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!