ABAP On Cloud - 5 - Introduction To RESTFul ABAP Programming
ABAP On Cloud - 5 - Introduction To RESTFul ABAP Programming
At the very onset, we would like to thank the entire SAP Community who are
enthusiasts and avid followers of SAPYard for the continued support, feedback,
suggestions, criticism and encouragement. We try to listen to every comment you
make and improve every single day and try to contribute our part in sharing the
little knowledge we gain working in real projects which might help someone in
need.
I treat acknowledgements like below from one of our supporters, a “Badge of Honor”.
Badge of Honor
Before we jump into thee new world of ABAP Programming, let us build some analogy. Let’s
look at the different variants offered by Apple in the mobile segment. We will focus on
phones (not just phones, smart phones :P) released by Apple after 2017. Apple iPhone X,
iPhone XR, iPhone XS, iPhone XS Max, iPhone 11, iPhone 11 Pro, iPhone 11 Pro Max and
finally iPhone SE (2nd generation).
Are they all different? Probably not. Then are they all the same? Again, no.
https://www.zapyard.com/abap-on-cloud-5-introduction-to-restful-abap-programming-2/ 1/14
6/27/23, 7:31 PM ABAP on Cloud – 5 – Introduction to RESTFul ABAP Programming |
All these have been released with different variations, some in old style new look, some
improvements, some delta changes, some new defects, some old defects , some
transformations and some revolutionary.
When the mobile phone manufacturer has created a brand and has a large consumer base,
there is a need to cater to newer needs, changing technological landscapes, consumer
wants, geographical demand and budget of the target audience. And they definitely have
buyers for every segment of phone they have released.
Similarly, SAP is not immune to such changes either. SAP has to cater the needs of
world wide customers with variety of business model, system landscape and
budget. Therefore SAP has different solution in its arsenal to suit the vast business
scenarios. SAP ABAP has seen its own evolution and every passing days, it is
evolving, sometime making things easier and at times confusing too. Vanilla
ABAP, OOPs ABAP, ISU ABAP, CRM ABAP, SAP ABAP on HANA, SAP ABAP for Fiori,
SAP ABAP on Cloud, SAP ABAP on/for (? blank). Fill in the blank.
Fwwww !!! Believe me it is one sentence and not a riddle for you to solve. We shall try to
explain each in more details.
https://www.zapyard.com/abap-on-cloud-5-introduction-to-restful-abap-programming-2/ 2/14
6/27/23, 7:31 PM ABAP on Cloud – 5 – Introduction to RESTFul ABAP Programming |
No SE14 (for that matter no GUI Screens and T-Codes are available) to activate and
adjust the database table and delete database table in RESTful- should we call this a gap
or new defect or is there a way around?
There are some Revolutionary Evolution too. We will discuss in details as and when
we reach the right time. So, for that to happen we humbly request you all to
continue reading our blogs and follow us.
CDS (Core Data Services) modeling in Database layer will get our undivided attention in
rest of this article.
Note: above diagram is exclusively seen for the first time in any forum, because we have created
it. If in future it is visible elsewhere, please credit us.
Those marked in green are related to Database Layer, those in light sky blue are
related to Presentation Layer and finally light orange correspond to Business
Logic Layer.
Now, to be very precise, the sequencing is also important. The most pivotal of all artifacts is
the Root View and then on top of it the Data Access Control is created and then
https://www.zapyard.com/abap-on-cloud-5-introduction-to-restful-abap-programming-2/ 3/14
6/27/23, 7:31 PM ABAP on Cloud – 5 – Introduction to RESTFul ABAP Programming |
1. Root View
Any CDS view built on top of a single database table is called as Basic Interface CDS.
We also have many situations where there can be combination of multiple data sources (in
turn they point to the DB tables) which are associated via certain fields with a cardinality.
These are called as Composite Views.
These concepts are taken from VDM. Click here to learn more.
Any of the above can qualify to be root view. This means we consider this CDS View as the
primary source and then built either Fiori Apps as the end product or expose the view as
an External API.
Also Watch – Free Video Course on Data Access Control in Core Data Services
3. Metadata Extension
Very important topic for the ABAPers to know is how to utilize the capability of building
robust and precise UI controls, analytical controls etc.
Metadata Extension enables to separate the database layer components and other
behavioral or UI components.
https://www.zapyard.com/abap-on-cloud-5-introduction-to-restful-abap-programming-2/ 4/14
6/27/23, 7:31 PM ABAP on Cloud – 5 – Introduction to RESTFul ABAP Programming |
4. Behavior Definition
New concept for new coders. The Behavior definition is built on top of the Root View. It is
used to just define the behavior of the root view.
Similar to class definition, it simply abstracts the elements that need to be implemented.
The different options available for implementation is Managed and Unmanaged Scenarios.
We will look into these in the coming articles how these are different.
Also other standard transactional operations like Create, Read, Update, Delete can be
controlled using Behavior Definition.
New language has been introduced called as Behavior Definition Language (BDL). Does
it mean the end of BOPF is nearing?
5. Behavior Implementation
Finally, we reach to the artifact called as Behavior Implementation. We implement the
Behavior Definition through a implementation class using ABAP OOPs.
Even though, ABAP OOPs is used to define the classes and methods it is the Entity
Manipulation Language (EML) that does the newer operations on the objects.
1. To Create a new package, just expand the project created in previous article. Right click
– New – ABAP Package.
https://www.zapyard.com/abap-on-cloud-5-introduction-to-restful-abap-programming-2/ 5/14
6/27/23, 7:31 PM ABAP on Cloud – 5 – Introduction to RESTFul ABAP Programming |
*Remember: All the packages are in the public domain and is visible to developers
across the globe.
3. Click on “Next” and below screen appears where click on “Create a New Request” and
provide a new to the Transport Request.
https://www.zapyard.com/abap-on-cloud-5-introduction-to-restful-abap-programming-2/ 6/14
6/27/23, 7:31 PM ABAP on Cloud – 5 – Introduction to RESTFul ABAP Programming |
4. On left side of the ABAP Perspective, scroll down to find the project just created.
https://www.zapyard.com/abap-on-cloud-5-introduction-to-restful-abap-programming-2/ 7/14
6/27/23, 7:31 PM ABAP on Cloud – 5 – Introduction to RESTFul ABAP Programming |
https://www.zapyard.com/abap-on-cloud-5-introduction-to-restful-abap-programming-2/ 8/14
6/27/23, 7:31 PM ABAP on Cloud – 5 – Introduction to RESTFul ABAP Programming |
8. Click on Next and provide the Name of the database table. Click on Next.
https://www.zapyard.com/abap-on-cloud-5-introduction-to-restful-abap-programming-2/ 9/14
6/27/23, 7:31 PM ABAP on Cloud – 5 – Introduction to RESTFul ABAP Programming |
10. Sample database table is as follows. You may play around and design you own db table.
So, finally you were able to create your first object using ABAP on Cloud. For experience
ABAPers it will not be wrong to say, it is the same old wine in a new bottle. But, let us not
conclude too early. You never know, what surprises the Cloud might hold for the age old
ABAP Developers.
We know, the above steps for creating the database table does not help you to understand
much of ABAP on Cloud. Also, we did not speak about the annotations (everything after “@”
are annotations). We will explain you in details each and every line written in the above
snippet to create your first database table in Cloud. Hope, you are not already missing your
SAP GUI based SE11 database creation process. How easy it was.
Team SAPYard is trying to break the concepts into layman’s terms on every new
topics SAP is coming with. We try to provide the concepts from the eyes of the
high school teacher and not through the mind of a multi PhD Professor (read
SAP Experts). We believe, unless we know the simple concepts, we cannot
research or assimilate the complex findings. That is the reason, we are very
https://www.zapyard.com/abap-on-cloud-5-introduction-to-restful-abap-programming-2/ 10/14
6/27/23, 7:31 PM ABAP on Cloud – 5 – Introduction to RESTFul ABAP Programming |
elaborate and do not mind leaving extra digital footprint in the internet world. If
our extra paragraph helps someone learn something, it is worth writing it.
FEEDBACK PLEASE!!
Please follow our LinkedIn Page , LinkedIn Group , Facebook Page , Twitter
and Instagram .
https://www.zapyard.com/abap-on-cloud-5-introduction-to-restful-abap-programming-2/ 11/14
6/27/23, 7:31 PM ABAP on Cloud – 5 – Introduction to RESTFul ABAP Programming |
ABAP on Cloud – 7 – Insert Records through Class and Create Metadata Extension
ABAP on Cloud – 8 – Behavior Definition and Service Definition and Binding & Output
ABAP on Cloud – 17 – ABAP Service & ABAP Instance in Trial SAP Cloud Platform
How to Create SM30 Like Table Maintenance T-Code in SAP RAP – Part 1
How to Create SM30 Like Table Maintenance T-Code in SAP RAP – Part 2 – Validations
and Action via RAP
https://www.zapyard.com/abap-on-cloud-5-introduction-to-restful-abap-programming-2/ 12/14
6/27/23, 7:31 PM ABAP on Cloud – 5 – Introduction to RESTFul ABAP Programming |
ABAP Programming Model for SAP Fiori – 6 – Generating Read-Only Application in Fiori
using Fiori Elements
ABAP Programming Model for SAP Fiori – 11 – Enabling Draft Functionality for
Transactional Apps
ABAP Programming Model for SAP Fiori – 12 – Scenario of Transactional App with Draft
Enabled Functionality
ABAP Programming Model for SAP Fiori – 13 – How to Preview and Download PDF in Fiori
Apps
ABAP Programming Model for SAP Fiori – 14 : Dynamic handling of CUD Operations &
Fields in the Transaction App
ABAP Programming Model for SAP Fiori – 15 : Automatic Popup Confirmation for Custom
Actions using ABAP Programming Model in S/4HANA
ABAP Programming Model for SAP Fiori – 16 : Automatic Dialogue with Parameters for
Custom Actions using ABAP Programming Model in S/4HANA
Single Popup Instead Multiple Popup for BAPI Return and Custom Messages
How to Create SM30 Like Table Maintenance T-Code in SAP RAP – Part 1
How to Create SM30 Like Table Maintenance T-Code in SAP RAP – Part 2 – Validations
and Action via RAP
Ruthvik Gautham
https://www.zapyard.com/abap-on-cloud-5-introduction-to-restful-abap-programming-2/ 13/14
6/27/23, 7:31 PM ABAP on Cloud – 5 – Introduction to RESTFul ABAP Programming |
https://sapyard.com/
New Technology Enthusiast and avid technical writer!!! Experience in working with clients from Retail,
Manufacturing, Mining, Pharma as ABAP Developer.
https://www.zapyard.com/abap-on-cloud-5-introduction-to-restful-abap-programming-2/ 14/14