Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
tugay_birihan
Participant

Introduction


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.



Figure1: List Report Page



Data Sources


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.



Figure2: Data Provider Class


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.


Figure3: Object View Detail-1



Figure4: Object View Detail-2



Conclusion


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.

Note


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.

References


https://disease.sh

https://blogs.sap.com/2020/10/27/consuming-rest-apis-with-cloud-abap/

https://blogs.sap.com/2020/09/30/showing-an-avatar-with-initials-or-image-on-the-fiori-element-objec...

https://blogs.sap.com/2017/08/09/fiori-elements-status-icons-and-semantic-colors/

 
Labels in this area