0% found this document useful (0 votes)
51 views144 pages

Copy of ABAP on Cloud

The document outlines a training course focused on ABAP on Cloud, specifically utilizing the Restful Application Programming model and Embedded Steampunk. It details the target audience, course structure, motivation for learning, and the benefits of using RAP for application development in SAP environments. Additionally, it covers the differences between on-premise and cloud offerings, the architecture of SAP BTP, and the use of CDS entities for data modeling.

Uploaded by

nadeemilyasahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views144 pages

Copy of ABAP on Cloud

The document outlines a training course focused on ABAP on Cloud, specifically utilizing the Restful Application Programming model and Embedded Steampunk. It details the target audience, course structure, motivation for learning, and the benefits of using RAP for application development in SAP environments. Additionally, it covers the differences between on-premise and cloud offerings, the architecture of SAP BTP, and the use of CDS entities for data modeling.

Uploaded by

nadeemilyasahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 144

LIVE SESSIONS

ABAP ON CLOUD
RESTFUL APPLICATION
PROGRAMMING
EMBEDDED STEAMPUNK
TRAINING

www.anubhavtrainings.com
Agenda 01 Who is this course
for

02 Motivation

03 Benefits of RAP

04 Demo

www.anubhavtrainings.com 2
Who is this course for www.anubhavtrainings.com

ABAP Solution
Consultant Architect
James- Embrace the Ruhaan- Extend S/4
change in the HANA in cloud with
technology make your ABAP skillset and build
ABAP code run on new innovative Fiori
cloud or use RAP with Element Applications
CDS model using RAP

Scrum Lead Any SAP


Emayaa – Consultant
Understand how BTP Ronny – understand
helps customers to embedded steampunk
help adaption with for SAP S/4HANA for new
ABAP with BTP ABAP programming paradigm
Enviornment
3
Course Outlook – 40 Hours

SAP BTP CDS Entities Managed RAP Embedded


Steampunk
ABAP & Implementation
and
and EML
Environme Unmanaged
language for Extensibilit
RAP
nt Implementati
ABAP y
on

Understanding Understand Use EML Side-by-side


SAP BTP and CDS entities language with extension
ABAP and un- Managed RAP scenarios
Environment managed RAP implementatio & Embedded
with different implementatio n for fully Steampunk for
Development n in ABAP Ready RAP S/4HANA
tools and Environment Applications
options RAP on BTP (actions, determinations,
side effects, behaviors,
and CAP validations, numbering,
www.anubhavtrainings.com
authorizations, Fiori
6
Motivation- ABAP is evolving, are you?

ECC / S/4HANA SAP BTP


Business 1909 OP Releases
Suite Yearly Quarter
Custom
Apps or
SAP Extend
NetWeaver SAP Cloud
7.5x ABAP Platform
Layer ABA Layer Java,
RESTful Application Node.js
Programming Model HANA,
Any ABAP
DB/HANA HANA

www.anubhavtrainings.com 4
Motivation
Fiori UX Cloud Ready
Build Transactional Fiori Extension
Side-by-side extension
Apps scenarios
Responsive Web Design using Cloud solutions with
embedded steampunk

Robust
programming with Leverage HANA
Squeeze the power of in-
ABAP
Utilize your ABAP skills
memory
to
DB with Code-to-data
develop cloud native
apps
www.anubhavtrainings.com 5
RAP- Application development paradigm?

RAP Build New apps


Extend S/4 HANA
Create applications using New
restful Application Utilize ABAP
programming model and EML knowledge to
with both approaches of consume, APUHUB
managed and Unmanaged with S/4HANA and
implementation. Learn the
extend your existing
latest EML with RAP for OP
and Cloud
solutions by
consuming web
APIs, using
embedded
steampunk

www.anubhavtrainings.com 7
Are you ready for our use case?
You are working in sports industry on S/4HANA solution. You
have been asked to analyze the IPL Auctions data.
By implementing such display analytics, IPL team sponsors can
make more data-driven decisions during auctions, optimize
their team compositions, manage budgets effectively, and
ultimately enhance their chances of success in the
tournament.

www.anubhavtrainings.com
Title
<>

www.anubhavtrainings.com 9
Title
<>

www.anubhavtrainings.com 10
Title
<>

www.anubhavtrainings.com 11
ON-PREMISE V/S CLOUD

www.anubhavtrainings.com
TYPE OF CLOUD OFFERINGS

Application Application Customer


Data As a Service Managed
Runtime Customer
Middleware Platform as Managed
Database a Service Customer SAP
OS Managed SAP/Partner Managed
Virtualization Managed
Servers Infrastructur
SAP/Partner
e as a
Storage Managed
Service
Networking
www.anubhavtrainings.com
WHAT IS SAP CLOUD FOUNDRY?
Application Application
Data Data
Runtime
Managed
by SAP Middleware Platform as
implementi a Service Fully ready
Database
ng open landscape
OS with reusable
source CF
Virtualization services
Managed
by Servers Infrastructur
e as a • Scalability
Infrastructu
Storage Service • Elasticity
re
Networking • Low TCO
providers
Data Center
s www.anubhavtrainings.com
SAP BTP - Cloud Foundry Architecture

www.anubhavtranings.com 5
Environment, Subscriptions & Instances
Environments

Environments constitute the actual platform-as-a-service offering of SAP BTP that allows for the development and administration of business
applications. Environments are anchored in SAP BTP on subaccount level.
SAP BTP offers three environments: ABAP, Cloud Foundry and Kyma. Some existing customers still have Neo, but this is no longer offered.

Subscription based services


You will also see these ones called software as a service (SaaS), or multitenant applications. The experience here is that you subscribe to the
service, and in return you receive a URL, from which you can access that service. Opening the URL brings you to a web application from which
you can leverage the service. This is how other SaaS like SuccessFactors or S/4HANA Cloud work as well. They are also enabled at a
subaccount level, and are independent of the environments. You don’t need to have Cloud Foundry enabled to subscribe to SAP Launchpad
Service, for example.
Examples include Launchpad, SAP Business Application Studio, Cloud Integration, Process Automation…

Instance based services

These are the purest services. They provide a specific functionality, like databases, connectivity, authentication…. You connect your
application to them to leverage that functionality. These services don’t provide a UI to manage them. Instead, they rely on API to connect to
applications and other services and provide their services. They are provisioned inside an environment, so they are environment specific.
Each environment has its own organization (for users and applications): In Cloud Foundry, instances are created inside a space. For Kyma,
instances are created inside a namespace.

16
www.anubhavtrainings.com
Backing Service
Each service has one or more service plans available.
A service plan is the representation of the costs and
Choose Your service Select Plan benefits for a given variant of a particular service. For
instance, a database may be configured with various "T-
Backing Service Service Plan shirt sizes", each of which is a different service plan.

17
www.anubhavtrainings.com
Backing service instance
Car key to use Car
Actual Car
Service Key to
Service Instance
Consume Service
instance

18
www.anubhavtrainings.com
Vital parts of SAP BTP ABAP Enviornment

www.anubhavtrainings.com 19
Setup BTP Account
• We have to create a fresh account with sap (sap universal id) – https://sap.com
• Login to SAP BTP Cockpit to create your BTP account -
https://account.hanatrial.ondemand.com/trial/#/home/trial

www.anubhavtrainings.com 20
BTP Account Structure

www.anubhavtrainings.com 21
ABAP on Cloud – the environment
ABAP on cloud is an ABAP environment running on SAP BTP on top of AWS infrastructure. It is a
shared ABAP system in trial mode.
• Since it’s a shared system with other abap trial users, we will see all the packages of other users
as well.
• With ABAP on Cloud, NO ONE EVER-EVER access SAPGUI, No Tcodes are allowed with GUI. In fact,
you cant event use SAPGUI to connect to ABAP on Cloud system
• We don’t have control to install notes, patches, and upgrade
• No access to SPRO (customizing) is allowed in the cloud
• ABAP on Cloud is just abap environment, its not a SAP Solution (like s/4hana or ecc), so you will
never find standard sap tables like MARA, VBAK, ACDOCA, MATDOC etc.
• You are only allowed to use DDIC objects which are marked released
• We cannot create everything like what we do in a on-premise system e.g. forms, workflow, scripts,
dialog prog.
• We cannot create ABAP programs in the AoC system, all code will be in-form of classes.
• The AoC only allows whitelisted ABAP statements, no other abap statements can be used freely
e.g. write.
https://help.sap.com/docs/sap-btp-abap-environment?locale=en-US
• You can create your packages under a standard package ZLOCAL
• The preferred programming model to develop applications is RAP – Restful Application
Programming model
• ABAP in Cloud has a code name called “steampunk”
www.anubhavtrainings.com 22
How to setup Eclipse tool with ADT
https://tools.hana.ondemand.com/#abap
Starters:
1. JRE - https://download.oracle.com/java/17/archive/jdk-17.0.10_windows-x64_bin.msi
2. For windows we need micosoft C++ runtime -
https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual
-studio-2013-vc-120
3. SAPGUI
Main Course:
To install the front-end component of ADT, proceed as follows:
4.Get an installation of Eclipse 2023-12 (x86_64) (e.g. Eclipse IDE for Java Developers)
5.In Eclipse, choose in the menu bar Help > Install New Software...
6.Enter the URL https://tools.hana.ondemand.com/latest
7.Press Enter to display the available features.
8.Select ABAP Development Tools and choose Next.
9.On the next wizard page, you get an overview of the features to be installed. Choose Next.
10.Confirm the license agreements and choose Finish to start the installation.
ABAP Cloud project is a CONNECTION to our ABAP on Cloud system

www.anubhavtrainings.com 23
Title
you have written in the steps to install SAP GUI, but do we need not to do to handson as part of this
training
Try this at home, not during the class

CDS Table Function


Yes we can create, next class

do we need to create the package under ZLOCAL package due to we are using trail system?
Yes, since it’s a shared abap trial in btp, we have to create always under ZLOCAL

what is the SAP certification code for RAP


Wait…

how to visualize the dev,qa and prod in btp system?


Park…

you have written in the steps to install SAP GUI, but do we need not to install it as part of handson as part of this training
https://docs.google.com/document/d/1kF6L-DQROtYgfvJ2r7uqgDURHEsWs6vV/edit?rtpof=true

is there any alternative for custom enhancement for abap on cloud?


No

www.anubhavtrainings.com 24
Use cases 1 – Building Full Stack Application

www.anubhavtrainings.com 2
Use Case 2 – Side by Side Extension

www.anubhavtrainings.com 2
Use Case 3 – S/4HANA Cloud Extension
S – Simplification 4 – 4th Generation ERP
S/4HANA – Onpremise, Cloud

www.anubhavtrainings.com 2
CDS – Core Data & Services
CDS is the new approach of building semantically rich data models. It is an extension of SQL in ABAP world.
What has been extended?
DDL – Data definition language – design new data models – new tables, structures
DQL – Data Query Language (CDS Views and CDS Entities) – new views to extract data (agg., join, load, calculate,formulas)
DEL – Data Expression language (expressions like path expression, case expressions)
DCL – Data Control Language (security)

Since in ABAP on Cloud Environment we do not have GUI access (no access to SE11) – we will use CDS

Naming convention – is a best practice to follow in a project. ZCOMPANY_PROJ_OBJTTP_NAME


ZATS_XX_*

We will use an uploader utility provided by SAP, get this in our ABAP on Cloud System to test it
🡪 Install the abap git plugin so we can interact with github from our adt tool - http://eclipse.abapgit.org/updatesite/
🡪 Download the code from SAP standard repository - https://github.com/SAP-samples/abap-file-uploader
🡪 Register a service
🡪 Run the utility

www.anubhavtrainings.com 2
JSON – Java Script Object Notation
It is a light weight data format to transmit data from one system (peer) to another system.

{
“prop”: val, gitHUB
“prop”: val,
“prop”: val,
Repository of code
“prop”: val,

}

{
“empStr”: { “empId”:1001,
“empName”:”Anubhav”,
“salary”: 5000
},
“empTab”: [ {“empId”:1001,
“empName”:”Anubhav”, ADT Abap git plugin
“salary”: 5000
} , {“empId”:1001,
“empName”:”Anubhav”,
“salary”: 5000
} , {“empId”:1001,
“empName”:”Anubhav”, AOC (BTP)
“salary”: 5000
}
]
}

www.anubhavtrainings.com 2
DB Design
Suppose you are working on a company which has recently opt for Rise with SAP and bought a subscription of BTP with ABAP
on cloud environment. You do not have an on-premise system, and you have many SAP ABAP consultants in the team. You
want to build end to end software in cloud for your customer. We always starts with DB Tables.

www.anubhavtrainings.com 3
CDS Views (DQL)
Using the views we can build the Data models which can optimum expose the data out of sap system. The execution of CDS
view happens inside the database because when we activate a CDS view, system creates a HANA view. All the logic hence
gets executed inside the database. This process is known as code-to-data paradigm.
CDS views are obsolete now, a successor concept was introduced in 2019 called CDS entities.

Application Layer

Database Layer

www.anubhavtrainings.com 3
CDS entities
CDS entities are advance version of CDS Views. If you know CDS view, you can implement CDS entities very easily
• When we activate CDS view, 2 objects gets created. One will be HANA view, and another will be the DDIC view. This DDIC
view is of no use. When we CDS entity, No DDIC view gets created.
• It save activation time hence the cds entity activation is faster than the cds view activation.
• A view have 3 names – file name, cds name and ddic view name. CDS entity is simplified and just have only one name
• SAP also improved the runtime engine for entities to make it work faster
• CDS entities are strict in nature.

ABAP on Cloud system


SAP does not allow direct access of some of standard database tables available in AOC environment. These objects are called
restricted objects. SAP have built the CDS entities on top of these objects, these entities are marked as Released. Which
means we can use them in our code.

www.anubhavtrainings.com 3
VDM – Virtual Data Modeling
It is a best practice/gold standard to build cds entities in SAP system. It is layered approach which provide clear guidance to
development teams to create cds views in modular way. It increase the code readability, and reduce the maintenance of the
code. All the views are categorised in below categories
1. Private views – They starts with P_ / Marked with @VDM.private: true / We should never use them in our code as the
contract of these views can change release on release.
2. Interface Views – They starts with I_ / Marked with @VDM.viewType: #BASIC , #COMPOSITE / Highly reusable views and
can be used as the contract is stable. In AOC system for example we have I_Currency, I_Country
3. Consumption Views – They starts with C_ / Marked with @VDM.viewType:#CONSUMPTION / Used for final consumption
of data for our use case.
4. Help Views – They are marked with I_*VH / Purely used for Value helps in Fiori Applications.

Consumption Views

Interface Views Interface Views

Private Views Private Views Interface Views Interface Views

DB Tables DB Tables DB Tables DB Tableswww.anubhavtrainings.com 3


Title
CDS View Annotation documentation:
https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/63/0ce9b386b84e80bfade96779fbaeec/content.htm?no_cache=true

Complementary OData basics tutorial:


https://www.youtube.com/watch?v=nrGtYA2IqgE&pp=ygUUb2RhdGEgYmFzaWNzIGFudWJoYXY%3D
Fiori Elements annotations
https://github.com/SAP-samples/abap-platform-fiori-feature-showcase?tab=readme-ov-file

SAP System

www.anubhavtrainings.com 3
www.anubhavtrainings.com 3
AMDP – ABAP managed Data procedure
• Sometimes, the CDS performance is not suitable for our use case and we need more complex technique to process our
data deep into database to get best performance using code-to-data paradigm
• We want to use database specific features
• CDS views have limitations
• CDS views cannot be debugged
• Overcome the disadvantages of CDS where we need to branch output of one Queries to another
• We cannot write imperative logic using CDS – IF, ELSE, LOOP, WHITE, EXCEPTION etc.
• CDS also does a strict type check while writing joins and associations
An AMDP is:
• A static function in ABAP class marked with marker interface IF_AMDP_MARKER_HDB
• The function can only have Import and Export parameters and all parameters must be passed by value
• We cannot use complex data types (deep)
• Any DB table which we plan to use with AMDP should be added to using clause
• When we run the AMDP, A procedure gets created inside the DB
• All the code will be written in SQL scripting programming language which will be pushed into the database
• Since we directly execute AMDP in DB, there is no automatic client handling

www.anubhavtrainings.com 3
SQL Scripting
SQL Script is a programming language used inside databases, which is an advance version of plain SQL. It is the last option to
improve performance of our applications and achieve code to data paradigm by code-push-down.
Why SQL Script
In the past we used to Fetch the data in ABAP, Loop over the data, Process the data and then write data back to database. We
want to fully leverage the computational powers of SAP HANA, hence using SQL script we can achieve it. All our data
intensive logic which we write using ABAP can now be pushed down to HANA DB using SQL Script.
https://help.sap.com/docs/SAP_HANA_PLATFORM?locale=en-US&task=use_task

❑ SQL Script is not case-sensitive and every line ends with semi-colon (;)
❑ We can use the code constructs like IF, ELSE, LOOP, FOR, WHILE, RAISE
❑ When we create variables, they are assigned with null value
❑ The = is comparison operator and := is the assignment operator. We can assign the value to variable using the var = val but
when we use the variable in the code, we use value of (:) operator to use a variable.
❑ When we assign the a query to a variable, the variable will allocate memory automatically

www.anubhavtrainings.com 3
CDS Table function
Bridge the gap between CDS and AMDP, A CDS table function
• Defines the skeleton of the data which we want from DB
• When it executes, it actually calls SQL Script code
• It creates a FUNCTION database unlike AMDP creates a PROCEDURE in database
• The CDS table function, can later be used to build view on view or can be used in OTHER CDS views also as JOIN/Agg

Plain CDS functions:


https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abencds_f1_builtin_functions.htm

www.anubhavtrainings.com 3
Title
<>

www.anubhavtrainings.com 3
Challenges in ABAP development
UI
Common needs
Create A/c documents
• Create application logic
Manage Documents Application Code • Insert, update, delete,
I, U, D, S, V validate, select data
Search Documents
• Perform validations
• Check customizing
Validate before save
• Handle locks
Alex, ABAP Developer,
SAP FICO
Challenges
Create Sales Orders UI
• Thinks differently
Manage Sales Orders • Adapt application code
• High maintenance
Search/Filter Sales Order Application Code • No standardization
I, U, D, S, V • Different coding practices
Compute Sales total • Lack of standard

Stella, ABAP Developer,


SAP SD
Trainer: Anubhav Oberoy
Evolution of ABAP Programming
Model

Trainer: Anubhav Oberoy


Restful ABAP Programming

Trainer: Anubhav Oberoy


Restful ABAP Programming
The ABAP RAP (Restful Application Programming) Model defines the architecture for efficient application development for
HANA optimized ABAP applications. It supports development of
Greenfield applications – A completely new application from scratch
Brownfield applications – A new/extension of application using OLD code
It is based on proven technologies and frameworks such as CDS entities to define semantically rich data model and service
model infrastructure for creating and binding OData services for different use cases e.g. Fiori App, WebAPI, InA

Trainer: Anubhav Oberoy


Components in RAP app – Technical Level
• CDS entities – To develop our RAP BO (Business Object)
• Business Object here is a TREE data structure which is composed of multiple nodes (parent, child), The tree starts from a
root node.
• Once the business object is ready, we define the behavior of the business object like can this object be created, updated,
deleted. Business object is a static structure (like a class) and the records of actual data is the instance of BO (object of a
class).
• Finally we can create service definition and service binding
• UI layer to consume the service to build application.

www.anubhavtrainings.com 4
Development Approach
Third Party
Application UI (Fiori Apps) Analytical Tools
Your own ABAP
Transactional | Analytical | Factsheet Excel | SAC | Other..
code
Service layer (expose data over HTTP/HTTPS protocol) – OData Services (V2, V4)
SEGW, SADL, @OData, Serv. Definition and Binding

API Layer
Business logic, Data validations, Lock Unlock, Sync. Points, Branches, Manipulation
logic, data flow logic, processing logic - RICEF

Customizing layer (SPRO, SM30)

Database Layer – (function modules and classes to interact with database)


LUW, Update FM, BAPIs – SELECT INSERT MODIFY UPDATE DELETE, EQ, DQ

SE11 – Data Dictionary – Tables, Views, Data Elements, Domains, LO, MC…
www.anubhavtrainings.com 4
RAP – The Big picture

Trainer: Anubhav Oberoy


https://www.youtube.com/watch?v=8vhDVym3zD
What is a Business Object

Trainer: Anubhav Oberoy


Types of Implementation (Scenario)
Brownfield Implementation
• Is used when we want to create a transactional
application which can insert, update, delete 02. Managed
data from the system by writing your own logic Scenario
• You already have Business logic with you and
you want to use that business logic to perform
transactional capability
• You are own your own to manage your
implementation.

Greenfield Implementation
• Is used when we want to create a transactional
application which can insert, update, delete
01. Un-Managed data from the system by using the framework
provided implementation
Scenario • You do not have Business logic with you and
you want system to create business logic for
you automatically.

Trainer: Anubhav Oberoy


BO runtime implementation types

Trainer: Anubhav Oberoy


Explanation of Flight Data Model

_M

_M _M

If Data is not found in these Table’s please execute Data Generator Class “/dmo/cl_flight_data_generator”

Trainer: Anubhav Oberoy


Managed RAP implementation
The managed RAP implementation addresses use cases where all the essential parts of the applications are to be developed
from scratch. However, these new applications can highly benefit from out-of-box support for transactional processing.
Standard operations like create, update, delete must only be specified in the behavior definition to obtain a ready-to-run
business object. The provisioning of transaction buffer is also done automatically for us by the framework. The interaction
phase and save sequence are also implemented generically. The application developer can focus on business part of app like
adding custom validation, actions, determinations. The RAP transaction engine manages the life cycle of our Business object
and covers all the aspects of our app development.
The managed implementation type is aimed for building new applications from scratch without having any prior coding exist.
The standard functionality that given in managed business objects is easily retrieved. The business logic implemented using
predefined implementation methods that are integrated during the runtime in the interaction phase and save sequence.

www.anubhavtrainings.com 5
Business use case
We will implementing 2 different applications on travel data model. These applications will target different user groups. We
will manage the travel requests and booking through our applications which are booked by agency for customer.

Processor – a processor is an employee of our company who will request a new travel plan through the application. He/she
will be allowed to create, update, delete, copy travel requests including bookings and supplements. They have full control to
manage their travel.
Approver – an approver is a manager who will only be able to view the travel requests created by employees, and can only
change the booking fees and approval status of the request (approve/reject).

Approval App
MakeMyTrip.com- processor app
The manager would review the travel
Processor needs to create, update,
requests created by processor, can only
delete a travel request through agency
change the booking fees and approve or
including all bookings and supplements
reject the travel request

www.anubhavtrainings.com 5
Understanding projection
If we ever get requirement in our company to develop a use case where we want to reuse the data model (e.g. sales,
purchase, accounting, finance) but develop many applications. We will go with RAP and projections. A projection takes part
of the base functionality according the needs to user. This will reduce effort, increase reusability in our app.

www.anubhavtrainings.com 5
Business Object Definition
From structural point of view, a business object consists of a tree of entities (cds) that are linked in compositions. Every entity
in this composition tree is an element that is modeled with CDS view entities. For our demo travel scenario we will
implement 3 level composition tree.

/dmo/travel_m 1..N
(root entity)

Business
/dmo/booking_m 1..N
Object (child entity)

/dmo/bookingsuppl_m
(child entity)

www.anubhavtrainings.com 5
Association v/s Composition
Both are the relation between cds entities
Association – lose coupling between entities, both objects can function independently (created, updated and deleted), it is
always a good to have relation.
Composition – tight coupling between entities, both objects must function together, there is a MUST have relationships
because they cannot work independently

www.anubhavtrainings.com 5
Development Flow – Processor and Approver
Fiori App – Processor Fiori App – Approver
Create, update, delete, copy travel Display the travel request data

Service Service Service Service


definition Binding definition Binding

MDE for Processor Projection MDE for approver Projection

BDEF Projection Behaviour Definition (BDEF) BDEF Projection


For Processor Tell RAP framework regarding our For Approver
Expose what is needed by a operations which needs to be Expose what is needed by a
processor role in company supported for BO (managed) approver role in company

Business Object Projection Business Object (definition) Business Object Projection


Includes the Travel, Booking and
For Processor Booking Supplement CDS entities
For Approver
30 fields to internet 100 fields 25 fields

www.anubhavtrainings.com 5
SAP Fiori elements boosts SAP Fiori development efficiency

www.anubhavtrainings.com
SAP Fiori elements prioritizes efficiency over flexibility

www.anubhavtrainings.com
Developer Persona – Fiori Elements
Anubhav
Happy User

Rob
Roxana S/4HANA Technical consultant
UX Designer | Fiori Developer ABAP Developer

ABAP Dev. Tools


VS Code
On
BAS
Eclipse

OData Service
Fiori Elements
Annotations.xml MDE
Project CDS Views
@

www.anubhavtrainings.com
Big Picture – Architecture

www.anubhavtrainings.com
Fiori Elements - List Report Application
The list report offers powerful features for finding and acting on relevant data sets. It is often used as an entry point
for navigating to the item details, which are usually shown on an object page.

List Report Object Page

www.anubhavtrainings.com
Object Page

www.anubhavtrainings.com
Annotation Documentation
https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/63/0ce9b386b84e80bfade96779fba
eec/content.htm?no_cache=true

https://ui5.sap.com/#/topic/1cf5c7f5b81c4cb3ba98fd14314d4504

@UI.SelectionField – Create filter fields on screen 1 (List Report)


@UI.LineItem – Create Columns on first Screen (Table area on list report)
@UI.HeaderInfo – Provide title to the table and arrange header for the object page (second screen)
@UI.Facets – To create tabs on the object page
@UI.Identification – can only be one, Configure default fields on object page (inside facet)
@UI.FieldGroup – To create field groups (group of fields) in a block with label and text
@UI.datapoint – to create a single value to be displayed in a chart or on top of page
@UI.Chart – to create a chart with a particular chart type

66
www.anubhavtrainings.com
Title
<>

www.anubhavtrainings.com 6
Title
<>

www.anubhavtrainings.com 6
Behavior Definition (BDEF)
Behavior definition describes the behavior of the business object in terms of what operations are allowed for our entire BO. If
the BO consists of multiple entities (e.g. Travel, Booking, Booking Suppl), there is exactly one BDEF which exist for this
business object.
The BDEF will have exactly same name as your root entity, you are not allowed to change the name. We can test our business
object once the behavior definition is created. The RAP framework will auto generate all the necessary code behind the
scenes to handle the CURD (Create, Update, Read, and Delete) operations on our BO.
Based on the BDEF, the RAP framework will decide whether it’s a managed or unmanaged scenario. In addition to CURD, we
can also maintain the actions, determinations, prechecks, validations, draft availability, draft actions etc. as part of behaviour
definition.
The name of BDEF is always same name as your BO.
https://help.sap.com/docs/ABAP_PLATFORM_NEW/fc4c71aa50014fd1b43721701471913d/761d389302e8463a9c3509907f2
2f22f.html?q=behavior%20definition#loio761d389302e8463a9c3509907f22f22f__impl_strict_transAct

1 0..1
Business Object Behaviour Definition
Travel(root)+Booking+Booking Suppl

www.anubhavtrainings.com 6
Title
<>

www.anubhavtrainings.com 7
Title
<>

www.anubhavtrainings.com 7
Title
<>

www.anubhavtrainings.com 7
Framework generated IDs
The RAP framework will contain multiple framework generated values when data comes to us in our ABAP code or when we
process the BO instance. All the framework generated parameters starts with %

%CID
During create mode the primary key of BO instance is not generated, until the save sequence is execute (like late numbering)
like in our case the travel id is created after all the validations are passed. We have %CID also known as content id and is used
in the OData request to bind the result operation to a name so that it can be referenced in another operation later. I sent a
call from my laptop, one of the browser session, so if there is a issue, I only should get the error on my screen.
It is like a temporary primary key which is given by the RAP framework kept in the transaction buffer to track the user session
or our BO instance. Later on once the actual key is generated, the %CID will act like a foreign key to associate with session
and will sent back to RAP by us to inform RAP that which session does this operation belongs to.

%tkey
When we apply operations on our table like a action. We also receive a table key in our code, and based on that we will reply
the RAP that a particular operation on the table was completed. If something goes wrong we will also inform the error to the
RAP framework using this table key.

%key
For a single operation like Edit, Delete inside the object page, we will also receive the key of the object which we are editing
or deleting.
www.anubhavtrainings.com 7
EML – Entity Manipulation Language
The EML is part of ABAP language that access to RAP BO. Because the consumption of business object via odata protocol
requires a Fiori UI or Web API, the EML enables a type-safe access to business object directly. EML interacts with the business
object entities (single entity – travel) to perform all the entity operations.
EML can be used to provide behaviour for business object. For example, we can implement an action that first triggers a
create and then a update using the EML. It is one of the best way to consume our RAP framework and Business object using
plain ABAP code w/o creating any special API or service.
Use cases:
• Consumption of RAP functionality in Plain ABAP
• Testing purpose
• Build special business logic
• Generate test data
• For integration with classic code

www.anubhavtrainings.com 7
Syntax for EML
Read operation
• Read from Root entity and by the key
• Read the root entity with its composition child (travel and booking together)

A read operation always either returns a RESULT 🡺 capture in a internal table


OR returns an error table called as FAILED 🡺 capture in a internal table
AND returns an table of messages as REPORTED 🡺 capture in a internal table (other messages)

If we use second option we can specify the associated entity using \_AssociationName

READ ENTITIES OF RootEntityName


ENTITY EntityAlias FROM keys ---(primary key value)
RESULT lt_result
BY \_Composition FROM child_keys
RESULT lt_result_child
FAILED lt_failed
REPORTED lt_reported.

www.anubhavtrainings.com 7
Update and Delete operations
MODIFY ENTITY OF EntityName AS alias_name
ENTITY EntityName
CREATE FROM lt_create
UPDATE FROM lt_update
DELETE FROM lt_delete
CREATE BY \_AssociationName FROM lt_instance_cba
RESULT lt_result
FAILED lt_failed
REPORTED lt_messages
MAPPED lt_mapped.

www.anubhavtrainings.com 7
Class Pool
Local types for global classes are the bunch of data types and classes with a single global class. It can be defined to ensure
better structure of implementation of global class.

Imagine we are developing an application which requires so many classes, each class will have a few methods only.
1. More number of classes in our application will cause excessive modularization and confusion among our developers.
2. More number of global classes, will increase the chance of code being exposed to other programs which we want to keep
as private.
3. We need a mechanism which is a good trade-off between modularization, reuse and maintenance w/o exposing too
much functionality to the caller of our application code. We should never have too many objects, especially when each
class have just a few methods.
4. At times, we need to add only a few functions inside a class but likewise we need so many many classes, managing these
classes and their lifecycle including transport will be a big task inviting maintenance also for future and making over all
design very complex.

www.anubhavtrainings.com 7
Behavior Pool
• The transaction behavior of a BO in the context of RAP is implemented in one or more than one global class.
• These special classes are dedicated only to implementing the business object behavior and called as behavior pool.
• You can assign any number of behavior pool to behavior definition (a 1:n relationship)
• Within a single global class, we can define multiple local classes that can handle the business object behavior.
• The global class is just like a container and basically empty while the actual behavior logic is written inside the class pool.
• We can assign any number of behavior pool to behavior definition (1:n). This allows us to distribute our implementation
across multiple units. This is called contribution design pattern. Which allow team to work in parallel on multiple tasks.
• A behavior implementation class always inherits from cl_abap_behavior_handler class.

Travel
(root) Behavior pool

Helper
Booking Behavior pool
classes

Booking Suppl Behavior pool


www.anubhavtrainings.com 7
Implicit Response Parameters
When implementing a BO contract, we can make use of implicit parameters. These parameters do not have FIX data type,
instead they are assigned by the compiler with the type derived from BDEF.
The implicit parameters can be declared explicitly as CHANGING parameters in the method signature of the class using
generic type
DATA: lt_imp_param FOR <OPERATION> entity.
Data : lt_mapped FOR CREATE BO-Travel.
FAILED
This is an exporting parameter which is defined as nested table contains one table
for each entity. The failed table includes the information for identifying the data
set where the error occurred. It has %CID, the ID of the BO instance, %FAIL which
has the reason of failure. If_abap_behv=>t_failinfo
REPORTED
This is an exporting parameter which is defined as nested table contains one table
for each entity.it includes the instance specific messages.
%CID, ID of the relevant BO, %MSG with the message interface, %ELEMENT
MAPPED – Only during Create/Update operation
This is an exporting parameter which is defined as nested table contains one table
for each entity. The mapped parameter provide the consumer with ID mapping
information. They include information about key values were created by the
application for given content id. The BO runtime passes the created key values in
any subsequent call in the sample request.
www.anubhavtrainings.com 7
%CID and %KEY
BO instance features
Early numbering
• It allows a managed numbering for bo instances during creation process. Like in ABAP we use sequence numbers (SNRO)
to auto generate primary keys, here in RAP we can use early numbering. It can be handled for all the entities. For this we
need to implement the logic in RAP BIMP.
• Every assigned key must be unique, otherwise the instances will be rejected by the database which will result to dump.
We will be reusing a SNRO sequence already created by SAP in the system.

www.anubhavtrainings.com 8
Sequence of calls
Fiori app OData RAP BIMP HANADB

entities

FAILED, MAPPED,
REPORTED

www.anubhavtrainings.com 8
Exercise
Assign the booking Supplement ID automatically during creation with early numbering.

www.anubhavtrainings.com 8
Data Actions in RAP
In the context of RAP, an action is a non-standard operation that change the data of a BO instance or create new BO
instances. They are self implemented operations. There are two main categories of data actions can be implemented in RAP:
Non factory action: Defines a RAP action which offers the non-standard behavior and implement custom logic in handler
with MODIFY clause. A non factory action can be of 2 sub types (change a property of a record)
a. Static – they are not bound to any instance, they are generic and can be applied to all instances, like we want to change
the booking fees for all travel request as fix price during promotion period.
b. Instance – An action that, by default relates to a BO RAP entity instance and changes the state of BO instance. E.g. like
approve or reject a travel request where user choose a instance which they want to work with.
Factory Action – A factory action used to create new BO instances. A factory action can be instance-bound (default) or static.
c. Instance – that copy specific values of an instance and create new instances based on copied data
d. Static – can be used to create instances with prefilled default values

www.anubhavtrainings.com 8
Feature Control
As an application developer we want to determine which entities of our BO needs to allow create-, update-, delete-
operations. Apart from that which properties of BO are allowed to be mandatory, read only, creatable, updatable. We can
also control the availability of our data actions.
In RAP, feature controls are of 2 types:
1. Static feature control – are specified at the level of behavior definition only. Statically declared and easy to implement.
2. Dynamic feature control – complex to implement for more complex requirements. They require a mandatory
implementation in BIMP class. We use keyword features:instance

www.anubhavtrainings.com 8
Determination
A determination modifies instance of business object based on trigger condition. Trigger condition can be modify operations such as create,
update, and delete and modified field. There are 2 types of determination
• on modify – will be triggered before save whenever trigger condition is met e.g. when I change booking fee
• on save – will always trigger at the time of save

Steps
1. Add the code for defining the determination in behavior definition, we want to do it in reusable way
2. Use quick fix to generate the code for determination
1. Define a structure where we can store all the booking fees and currency code
2. Read all travel instances, subsequent bookings using EML
3. Total all booking and supplement amounts which are in common currency
4. Delete the values w/o any currency
5. Loop at all amounts and compare with target currency
6. Perform currency conversion
7. Put back the total amount
8. Return the total amount in mapped so the RAP will modify this data to DB

www.anubhavtrainings.com 8
Validations
Many times we would like to perform business specific checks in our application, The rap framework is only responsible to
perform CURDQ operations. It does not know what are all the business rules applies to our code.
If we return FAILED and MESSAGE then the RAP will terminate the update/create and shows the message to the user on Fiori
App.

www.anubhavtrainings.com 8
www.anubhavtrainings.com 8
Additional Save
In some application scenario, an external functionality must be invoked during save sequence, after the managed runtime
has gathered the changed data of business object’s instance, but before final commit work has been executed.
For example, reuse services like change documents and application logging/tracing must be triggered during save sequence
and changes the current transaction in a change request or logging table.

www.anubhavtrainings.com 8
Side Effects
Side effects are useful in UI scenarios based on BO which makes the Fiori element UI know/aware about the data changes in
backend. Whenever data is reevaluated in backend, the frontend is unaware of that, we need to make sure that the frontend
make a forceful call to GET the data back on UI.
The Fiori UI will never make an unnecessary call to perform a round trip. If we know that, a change in a field would certainly
change the data in SAP system, we need to inform the same to RAP BO, so that it can make a GET call to reload the particular
field value and display the updated data on UI. E.g. when we change the booking fee, or flight price under booking table, we
need to reload the total price (which is getting calculated in backend using determination), this is exactly what the side effect
can do for us.

www.anubhavtrainings.com 8
Authorization
Authorization control in RAP protects our business object against the unauthorized access of data. Authorization control is
always relevant when the permission to execute an operation depends on a role of BO consumer. In the RAP, each read or
modify request can be checked via authorization object against the user role before the request is finally executed and
reaches data.
• The auth check with auth object is called from cds entities in case of read request – was covered in Anubhav trainings
abap on hana course
• And behavior implementation in case of modify request

Global authorization
• Global authorization is used for all authorization checks that only depends on the user.
• Global authorization checks can be implemented both for static and instance bound operations
Instance authorization
• Instance authorization is used for all auth checks that, in addition to the user role, depend on the state of the entity
instance in question (like exact record level). Its only possible for instance based operation
• Operations that are executed from instance auth are CREATE and static actions

Use case: when a user tries to edit a travel request, if the travel request status is cancelled, then we need to check that if
he/she is a manager or not. Only managers can edit a cancelled travel request. Since each travel request is different, we need
to go with instance-based authorizations.

www.anubhavtrainings.com 9
Draft

Draft is a very important functionality of an enterprise application, which allows us


• To create a stateful application from stateless
• Store intermediate data in sap system
• Perform validations on-fly, increases the collaboration with our app
• Device switch
• The Odata V4 never allow CURD operation without having draft feature to your BO
www.anubhavtrainings.com 9
Draft Runtime

www.anubhavtrainings.com 9
Title
<>

www.anubhavtrainings.com 9
Solution for draft issue – Short Dump
<>

www.anubhavtrainings.com 9
Prechecks
While the system is saving the draft in the draft table we can use prechecks to make sure that checks/authorizations are
checked in the system before data reaches to draft table. Unlike validations (while saving/updating data to main table)
Prechecks will trigger before data reaches to transaction buffer.
They are very helpful when we even want to validate data of one control based on another control. Currently as a developer
you need to take additional pain to clean the data when draft is activated. If you apply precheck, system ensures that only
the clean data reaches to transaction buffer.

www.anubhavtrainings.com 9
Augment
Before data reaches to transaction buffer, the augment code will be executed and here we can set some default data to the
BO instance.

www.anubhavtrainings.com 9
Virtual Elements
There is a requirement to expose extra elements out of cds entities for which there is no data inside the database, basically
these element values are calculated at runtime (on-fly). If you worked with SAP UI5 development, we have similar concept
called formatter. We have a implementing class in which we will add our code for calculating the runtime data of virtual
elements.
Rules:
• We should only add them to projection view. Because if you add in main view, your draft table will disturb and your main
table will never have these column.
• RAP does not support filtering and sorting of virtual elements, also the aggregation and group is not allowed
• We cannot select data from virtual elements using direct SELECT or EML
• We have to write implementation in a class for virtual element that class must use the interface
IF_SADL_EXIT_CALC_ELEMENT_READ.

www.anubhavtrainings.com 9
Steps to implement the approver scenario
1. Go to base behavior definition and add non factory actions, provide implementation for the same
2. Create copy from processor cds entity projections and make new cds entities for projection for approver. Both travel and
booking, ignore the booking supplement as a approver will only allowed to view upto the booking data.
3. Create metadata extensions for approver. Since approver can only see the data of travel and booking, we only created 2
MDE. Keep all the relevant fields and integrate code to show accept and reject travel buttons.
4. Now we provide behavior definition projection for approver which controls what an approver can do. As we know an
approver can only edit bookingfee and travel status, he/she not allowed to create/update/delete any of the entities.
5. Customize our BDEF according to the needs of our user scenario.
6. Create a service definition for approver and service binding for approver.
7. Testing ☺

www.anubhavtrainings.com 9
Question
Currently you are testing the Fiori App by using the standard preview option in eclipse tool. Will our end user have the ability
and skill to open eclipse tool, go to package and search BIMP and then open preview and that too in production system.

• Business Application Studio – It is a multi cloud development tool which allows developers to build, test, package, deploy,
and manage end to end Fiori applications.
• SAP build work zone (aka cFLP in BTP) – it helps us to configure a site called Fiori launchpad in the cloud. All the Fiori Apps
which you build in BTP will be accessed via this build workzone from end user. End user will get single URL, which contains
the tiles for all our apps deployed in BTP.
• Continuous Integration Service – When a developer change the application, and push to central repository like git, the CI
service will automatically build and deploy our app.

Note:
• All the Fiori apps which we create in BTP will be called MTA – Multi target application, they are deployed with mta.yml file.
Which will contain the configuration for the Fiori App.
• In SAP BTP, there is a storage space called html-5-repository where the BTP will store our Fiori apps.
• When we deploy our app, there is html5-deployer which will take our app from BAS tool and deployes it to the HTML5
Repository (Design time)
• When we run the app, there is a service called html5-rt (runtime) service which will load our app from the repository in
the build workzone.
• Apart from that the application will contain a connectivity service to communicate with our abap on cloud system.
• And a destination service which will read the destination (RFC) of AOC system to access data in Fiori.
www.anubhavtrainings.com 9
Dev Space in BAS

cf login -a https://api.cf.us10-001.hana.ondemand.com --sso

www.anubhavtrainings.com 1
Title
{
"xsappname": "comatstproctravelprocessorapp",
"tenant-mode": "dedicated",
"description": "Security profile of called application",
"scopes": [],
"role-templates": [],
"oauth2-configuration": {
"token-validity": 60000,
"refresh-token-validity": 2592000,
"redirect-uris": [
"https://*.cfapps.us10-001.hana.ondemand.com/login/callback"
]
}
}

www.anubhavtrainings.com 1
How did Anubhav build and deploy fiori
• Create the Dev space in BAS tool
• Open the bas tool and open folder to choose projects folder
• We have to open terminal and login to btp a/c cf login -a https://api.cf.us10-001.hana.ondemand.com --sso
• Press F1 and choose open application generator to generate Fiori app of template: List Report Template
• Select the system as AOC and choose our service binding name for processor
• Provide app details, deployment details (btp), launchpad details and create app
• Right click on mta.yml and build MTA archieve
• Choose F1, open application info and select deploy
• Assign the roles of our Launchpad service to our user
• Open SAP Build workzone and create a site with name mylaunchpad
• Go to channel manager and refresh the apps which are stored in html5-repository
• Go to content manager and choose content explorer and pull the app
• Create a catalog and a group and add our app to them
• Go to everyone role and assign the app to the role
• Open the site to test our app
• Repeat the same steps if there is a change in the app.
• We need to create a git repository and push our app code (backup)
• Register a web hook and use the same in CI CD service so that the application will deploy automatically to BTP cloud

www.anubhavtrainings.com 1
Reference Scenario – Unmanaged Impl.
Imagine in our company we had written all the business logic in the past ourself in form of FM, Classes. Today we want to
reuse our old code which has the business logic, validation, sequence, processing, along with transaction buffer. So if you
want to manage all these codes yourself and integrate your legacy (old code written by you or your team), you will opt for
unmanaged (here RAP is not managing the CURD operation) scenario.
SAP is providing a demo class for learning purpose viz. /dmo/cl_flight_legacy
In this class we have our own old logic which contains the transaction buffer and business logic to maintain all the source
code to interact with database ourself.
The RAP framework allows us to implement the entire runtime of the BO
• Interaction Phase (code to interact and keep data inside itab)
• Transaction Buffer (like a internal table where we keep temporary data)
• Save Sequence (Commit work and Rollback)

UPDATE_BAPI
(LUW)

BAPI_TR_COMMIT BAPI_TR_ROLLBACK

www.anubhavtrainings.com 1
Development Flow

Serv Impl.

BIMP-unmanaged Serv definition

BDEF - unmanaged Travel_U Travel_U_MDE

Agency Customer

agency customer /dmo/travel


www.anubhavtrainings.com 1
Title
<>
How you know in the code
which fields are changed on the
screen by the user.
*
So accordingly we can update
* the data into the database only
for the changed fields??
* RAP provides a compiler
structure called %control which
will tell us what fields were
changed on UI.
We need to tell the RAP, what
will be the datatype for the
control structure.

www.anubhavtrainings.com 1
Attachments
Starring SAP ABAP on Cloud release 2208 SAP started direct support for attachments (PDF, Excel, Images, TXT, Word) including binary files.
We must need to create a database table with atleast following columns
• Attachment (Data type: RAWSTRING length 0)
• Mimetype (Document type, String128)
• Filename (Document Name, String128)

1 n
Travel Attachments

www.anubhavtrainings.com 1
Steps
1. Create new attachment table according to need and design
2. Create a Interface Entity for the attachment table and mark our attachment field with special attachment annotation, So
the RAP framework can treat it as an attachment accordingly.
3. Add annotations for admin fields, and user labels.
4. Create composition of our attachment table with travel entity like we had the composition of booking with travel entity.
5. Create a projection view for attachment
6. Relationship between Travel processor view with attachment processor view entity
7. Enhance the BDEF with attachment like booking
8. Also expose the attachment functionality with draft to processor in behavior projection for processor
9. Expose the entity of attachment processor in service definition
10. Republish the OData V4 binding
11. Add the metadata extension for attachment scenario and link a new facet in travel for attachment table
12. Testing

www.anubhavtrainings.com 1
Git and ABAP on git
Git is a source code repository management system, git hub is a repository on internet. We interact with github using git
software. If I want to take a backup of all our code which we created in AOC system, git is a great choice. This way we can also
export import our code between cloud and on-premise system.
For cloud system, we use git plugin in eclipse which is provided by SAP. The installation was covered in 3 rd session.
Steps:
1. We need to add the plugin for abap git in ADT - http://eclipse.abapgit.org/updatesite/
2. Create a github account and add a PAT token under developer setting
3. Create a repository in git hub
4. Click on Add to link a repository and paste url from step 3

www.anubhavtrainings.com 1
Git and ABAP on git
Git is a source code repository management system, git hub is a repository on internet. We interact with github using git
software. If I want to take a backup of all our code which we created in AOC system, git is a great choice. This way we can also
export import our code between cloud and on-premise system.
For cloud system, we use git plugin in eclipse which is provided by SAP. The installation was covered in 3 rd session.
Steps:
1. We need to add the plugin for abap git in ADT - http://eclipse.abapgit.org/updatesite/
2. Create a github account and add a PAT token under developer setting
3. Create a repository in git hub
4. Click on Add to link a repository and paste url from step 3

www.anubhavtrainings.com 1
From classic ABAP extensions to ABAP Cloud
development
<>

www.anubhavtrainings.com 1
What is ABAP Cloud Development Means:
• Use public SAP APIs (local or remote) released by SAP to access SAP functionality and SAP data
• Use public SAP extension points released by SAP to extend SAP objects. Modifications to SAP standard objects are not
supported (applies to S/4HANA Cloud system)
• Use of Adt (ABAP development tools) on eclipse
• Use Steampunk (RAP – Restful Application Programming model) to build Fiori Applications and services. SAP technologies
like Dynpro and webdynpro are not released for cloud development.

www.anubhavtrainings.com 1
What is Embedded Steampunk
• If we are using SAP BTP to develop side by side extensions, full stack SAP applications in BTP (Steampunk)
• If we are using In-app Developer extensibility with released objects in S/4HANA (all editions) with RAP (Embedded
Steampunk)

If you using RAP and enhancing your Standard SAP Applications delivered by SAP in S/4HANA system, the recommended
approach is Embedded Steampunk.

Every Customer using S/4HANA can decide whether they want to use new approach (embedded Steampunk) or classic
extension approach (BADI) @ Object level
This can be done by switching a setting @ object level.

www.anubhavtrainings.com 1
Finding RAP extension objects in ADT and HUB
As a developer in our company how can we ensure or find the released SAP object (CDS views, APIs, RAP business object) so
when a requirement comes to me for enhancing standard Fiori Apps or functionality in S/4HANA, I can use the embedded
Steampunk for developer extensibility.

1. Directly using ADT – appl:sd api:extend_in_cloud_development


2. Refer the documentation on https://api.sap.com

Example of Sales order

SAP Standard Fiori App

I_SalesOrderTP C_SalesOrderManage

R_SalesOrderTP
www.anubhavtrainings.com 1
Steps to Activate Standard App
1. We need to find the sales order application in SAP Fiori App reference library
2. We need to check its configuration
3. Activate the Standard Fiori App using Rapid Fiori Activation Task list and generate the role
Will activate all the odata services, and configure catalog and group with the role so that our user can access the Fiori apps.
Tcode: STC01
Tasklist: SAP_FIORI_CONTENT_ACTIVATION
Role: SAP_BR_INTERNAL_SALES_REP
Go to PFCG and assign the role ZSAP_BR_INTERNAL_SALES_REP

4. Assign the role to our user to access this Fiori app


5. Make sure that in SPRO all the pricing conditions, pricing procedure and mapping of Sales org with procedure in tcode
OVKK is maintained – Functional consultant
Test Data: if you are using Anubhav training system to demo this scenario use below test data:
Order Type: ZDPL
Sales Organization: CCPL
Distribution Channel: ZG
Division: 01
Ship to Party: 610000
Material: 167
6. Testing – Create sales order - /n/ui2/flp

[email protected]
Subscribe an S/4HANA 2023 OP system access @ 40 USD per month
www.anubhavtrainings.com 1
Demo Scenario
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
User Persona
<>

www.anubhavtrainings.com 1
Development Flow of Scenario
<>

www.anubhavtrainings.com 1
Documentation link
RAP Extensibility
https://help.sap.com/docs/abap-cloud/abap-rap/extensibility-architecture-overview?locale=en-US
Event
https://help.sap.com/docs/abap-cloud/abap-rap/business-events?locale=en-US&q=business%20event

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Embedded Steampunk – RAP Extensibility

www.anubhavtrainings.com 1
Abstract Entity
It is an entity which cannot be used as part of a business object directly. They are solely use for the purpose of exchange of
data as a parameter. Like in ABAP we create local types and structures which are used as import/export parameters in our FM
and classes.

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
Title
<>

www.anubhavtrainings.com 1
FAQ’s
Do I need to have prior knowledge of SAP BTP?
No, We will cover BTP foundation in this course for you.

How much CDS knowledge required to learn ABAP on Cloud?


You must have to have very good understanding on CDS views without which this course will be
irrelevant for you. If you new for CDS views, join our ABAP on HANA Course.

I am an BW and BI Consultant, Can I learn ABAP on Cloud


Yes, you must because now you can build cloud native analytic apps on BTP ABAP Environment.

Will this course convers Embedded Steampunk


Yes, its actually RAP programming model’s code name used in S/4HANA Cloud

What about server access?


We will use SAP BTP ABAP Environment which offers free trial and In the next class, I will cover
the setup of the environment.

Will this course convers CAP also?


No, please join our SAP BTP CAPM Course for CAP development.
www.anubhavtrainings.com 142
FAQ’s
Which version of HANA and S/4HANA are we going to learn?
Latest BTP ABAP environment

How of this course we spend time on RAP?


Around 70% of the course is on RAP, rest is embedded steampunk, RAP generator, Extensibility

Do I need prior OData Service experience?


No, we will provide one complementary OData session and API HUB

Can I also take the course in video mode as timings does not suite me?
Yes, You can even check the video after the class

What tools do I need to practice in the course?


ADT, we will cover the installation of ADT in next class. Also, we use BAS tool to create Fiori
Apps on S/4HANA.

How to join this course?


Email us on [email protected] for signing up!
www.anubhavtrainings.com 143
Thank
you [email protected]
Join us for free demo!!
+91 8448454549

www.anubhavtrainings.com

144

You might also like