ABAP RAP Covid-19 List Report
In this blog post, I am going to show you how to create the Covid-19 app using Abap restful application programming model. I guess many of us have hard times due to the coronavirus but every cloud has a silver lining. I’m sure that we will come across better days soon after the vaccination process. There has been a remarkable increase in the number of people who are affected by the virus and increasing every minute. According to social science theory “sixth degrees of separation” we all have connected each other at most six steps. I can reach the president of any country within six steps, I know the guy who knows the guy. That means we are all connected and we can spread the virus easily. The purpose of this block is to raise awareness and show how to use RAP for external data.
First of all, I used open disease data from the website which provides data from WorldoMeter and Johns Hopkins University. When I tried to collect data from different sources I ran into some problems, for example, one data source give abbreviation of some countries but other provide the full name of countries(United Kingdom or UK), service haven’t provided country code and province names have begun with lower case for one service but it was the upper case for another. I created database tables and data generation class, playing with data for normalization, and saved them to the database to follow RAP principle after that I have created interface views, projection views, metadata extensions, etc.
I saved all package to GitHub, if you would like to inspect codes click here. I didn’t use all database tables but at the begging of this little project I was planning to create List Report Page (LRP), Overview Page, and Analytical List Page, but I only give you (LRP). Maybe other types of pages can be issues of another blog. You can see country details and province data if countries have provinces and give province details. Also, you can see the last 30 days’ details to observe changes in object view details.
The vaccination process had just begun in my country when I started developing it. I have been imagining that what a world it would be like if there was something that could disappear through epidemic coding. In my personal opinion, unlike vaccines, a developer would push all code into a “git system” and the whole world would benefit from codes with the same equally.
I think that many good reports can be made in Fiori or Abap with the tables created. I also believe that the code will give an idea to developers who have little idea about how to call external services from Abap. Lastly, I believe that it will be both an instructive and a fun leisure activity.
Codes are developed 1909 SP-02 on-premise system. Before you try to run this code in your own system you can need to upload SSL certificates.