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”.
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).
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. 🙂
SAP ABAP on Cloud in a nut shell
ABAP RESTFul ( REpresentational State Transfer ) programming model is a newbie in the list of ABAP style of programming focused on building end to end custom business applications using the components like CDS (Core Data Services) modeling in Database layer for data fetching and manipulation, Behavior Definition and Implementation in Business layer for implementing business logic and Service implementation via OData for consumption in Fiori Applications internally within SAP environment or as API for external consumption; in UI Layer.
Fwwww !!! Believe me it is one sentence and not a riddle for you to solve. 😛 We shall try to explain each in more details.
Let’s break it down for more clarity.
1. CDS (Core Data Services) modeling in Database layer
2. Behavior Definition and Implementation in Business layer
3. Service implementation via OData for consumption in Fiori Applications UI Layer.
Let’s compare ABAP with RESTful ABAP
- R/3 is here to stay even in RESTful. 🙂 Good News. – Same Style New Look
- In Memory Database in RESTful – Some improvements
- 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?
- Data fetching and processing – Some transformations in RESTful
There are many, but above are simple to start with.
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.
Core Data Services modeling in Database layer
Each block above represents one functionality.
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 Metadata Extension, Behavior Definition and Behavior Implementation
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.
The Root View is written in DDL (Data Definition Language).
2. Data Access Control
Data Access Control is written in DCL (Data Control Language) which takes care of which user is authorized to use the DDL and what contents can be given as output in restriction.
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.
Please remember Metadata Extension is built using Annotations.
Also Read – ABAP Programming Model for SAP Fiori Series
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.
So, as we dig more we learn more about all of these in detail.
Steps to Create your First Database Table in Cloud
As a bonus, in this article let’s learn how to create a DB Table.
- To Create a new package, just expand the project created in previous article. Right click – New – ABAP Package.
- Enter the required details and click on “Next”
- Click on “Next” and below screen appears where click on “Create a New Request” and provide a new to the Transport Request.
- On left side of the ABAP Perspective, scroll down to find the project just created.
- Right Click on the project to create a new object.
- In the ABAP repository object, navigate to the “Dictionary”.
- Expand the dictionary to find “Database Table”
- Click on Next and provide the Name of the database table. Click on Next.
- Click on Finish with default Transport Request.
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 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.
Save our number +1-646-727-9273 and send us a Whatsapp message ‘LEARN’ to be part of our Learning Community.
All ABAP on Cloud Tutorials
- ABAP on Cloud – 1 – Introduction
- ABAP on Cloud – 2 – ABAP Trial Instance on Cloud
- ABAP on Cloud – 3 – Eclipse Set-up for ABAP Cloud
- ABAP on Cloud – 4 – Your First ABAP Cloud Project
- ABAP on Cloud – 5 – Introduction to RESTFul ABAP Programming
- ABAP on Cloud – 6 – DB Creation and Root View in ABAP Cloud
- 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 – 9 – Experimenting with Metadata Extension and CRUD Operations
- ABAP on Cloud – 10 – First Fiori Project on Cloud – 1
- ABAP on Cloud – 11 – First Fiori Project on Cloud – 2
- ABAP on Cloud – 12 – First Fiori Project on Cloud – 3
- ABAP on Cloud – 13 – First Fiori Project on Cloud – 4
- ABAP on Cloud – 14 – Advanced Topics – 1 – On Screen Validation for Managed Scenario
- ABAP on Cloud – 15 – Advanced Topics – 2 – On Screen Validation for Managed Scenario
- ABAP on Cloud – 17 – ABAP Service & ABAP Instance in Trial SAP Cloud Platform
- ABAP on Cloud – 18 – Business Application Studio – 1
- ABAP on Cloud – 19 – Business Application Studio – 2
- How to Create SM30 Like Table Maintenance T-Code in SAP RAP – Part 1
- SAP BTP. Part 9. Handling the Business Logic in RAP – Part 1
- How to Create SM30 Like Table Maintenance T-Code in SAP RAP – Part 2 – Validations and Action via RAP
- Table Maintenance Generator from SAP RAP – Part 3 – FIORI UI App
Also, Check ABAP Programming for SAP Fiori Tutorials
- ABAP Programming Model for SAP Fiori – 1 – Overview
- ABAP Programming Model for SAP Fiori – 2 – CDS – Introduction
- ABAP Programming Model for SAP Fiori – 4 – OData Service Creation
- ABAP Programming Model for SAP Fiori – 5 – OData Service Generation
- ABAP Programming Model for SAP Fiori – 3 – CDS Views Creation
- ABAP Programming Model for SAP Fiori – 6 – Generating Read-Only Application in Fiori using Fiori Elements
- ABAP Programming Model for SAP Fiori – 7 – BOPF – Introduction
- ABAP Programming Model for SAP Fiori – 8 – Developing Transactional Application – CRUD Operations using BOPF
- ABAP Programming Model for SAP Fiori – 9 – Use of Determinations in BOPF
- ABAP Programming Model for SAP Fiori – 10 – Use of Actions in BOPF
- 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
- Table Maintenance Generator from SAP RAP – Part 3 – FIORI UI App
Hello
In Step 10 — line numbers 13-16 gives error … Looks like something is missing.. I get errors ..
Please review and provide a clean code for learning…
Appreciate your help.
PM
Hi Prasad,
Thanks for trying out the code. It is said to be sample code of a Database table. There is no issue in code. We have given the foreign key relationship and a include structure. If you have aware of these two concepts in Core ABAP, it is easier to understand.
You need to have another table and same field name defined for employee phone (as in our example) to establish foreign key relationship. For include, you need to create one and embed into your DB Table.
Hope I have answered your question.
Hi Vignesh and Ruthvik,
Can you explain on this unmanaged and managed query. I have heard about this a lot.
Thanks in Advance,
Regards,
Shekhar
Hi.
I started scamming ABAP CLOUDS with you, but new posts are so rare and my trial period will end soon.
Thanks,
Andrey.
Hi Andrey,
Thanks for being an avid follower. Two things related to SCP Trial Account.
One ABAP Cloud being what it is we need to understand the limitations of using Trial Account. Reason why it is called Trial is because it expires within 30 days. But you would have an option to extend it after trial period ends.
Point two : Is there any option to get access to any SCP System with an unlimited access similar to S4 Hana or ECC on-premise? Answer is no OR I am not aware of it.
Related to frequency of articles published. Please be patient with us since we can’t publish just anything. We need to also think twice or may be more before it is given as a readable material, hence time consuming.
Stay Connected with SAP Yard.
Thanks,
Ruthik.
where is the 10. step ?
Hi,
Sorry we had given wrong numbering.
It is corrected now.
Thanks for bringing this point to our notice.
Thanks,
Ruthvik.
Hi,
Sorry we have corrected the numbering.
Thanks,
Ruthvik.
Hi Vignesh,
Thanks for bringing up this information. We will add this in the upcoming articles.
Thanks,
Ruthvik.
Hi,
Minor corrections – Root view Keyword is used for Transactional applications majorly in RAP. When we create display apps using unmanaged query in RAP, it is not mandatory to specify “Root” keyword for the view.
Thanks,
Vignesh.