Introduction
In today’s fast-paced world, understanding our eating habits and sensations can provide valuable insights into our overall well-being and improve our performance in work. Inspired by concept from “The Personal MBA by Josh Kaufman” about how tracking your food sensations could improve a little bit your performance in work and eager to test AI capabilities from SAP Joule, this blog post will guide you through the process of creating a CAP (Cloud Application Programming) application designed to record and track eating sensations.
The main goal of this proof of concept is to demonstrate that functional users, even those without extensive coding backgrounds, can effectively generate and comprehend code using powerful AI tools like SAP Joule and Microsoft Copilot Webbrowser. By leveraging these advanced technologies, we aim to bridge the gap between functional expertise and technical implementation, empowering more individuals to contribute to innovative solutions.
Join me as we explore the steps to build this application, from initial setup to deployment, and discover how AI can enhance our ability to create meaningful and user-friendly applications.
Creating and translating requeriment using Microsoft Copilot
Creating a requirement in your native language and then translating it can be much easier than doing it directly in English. In this case, I decided to add to the prompt to simplify and make the requirement much more understandable for later programming. The quality of the documentation and its understanding is essential for artificial intelligence to program correctly.
Once we have the requirement, we will set up an SAP BTP account to test creating a CAP application using SAP Build and SAP Joule without extensive knowledge of these technologies.
IMPORTANT: In this test, we will only program using natural language.
Set-up SAP Build Code using boosters
First of all, we need to get the SAP Build application running on our SAP BTP account. In this case, I don’t have technical knowledge in SAP BTP, but we can use boosters to have a fully operational SAP Build programming environment without needing extensive knowledge.
Setup SAP Build Code in SAP BTP | SAP Tutorials
Special thanks to Paola Laufer for the tutorial.
Programming application using SAP Joule and understanding details with Microsoft Copilot
IMPORTANT: Highlight that the steps used were taken from material provided by SAP and adapted to my application. Once again, special thanks to Paola Laufer for this SAP Build Code Test Drive that has served as my guide.
Create a Full-Stack Application with SAP Fiori UI using Joule in SAP Build Code | SAP Tutorials
Let’s get started with our application!
Artificial intelligence always needs to be reviewed and adapted by humans. Although this could probably have been done through a series of prompts, I have adapted the requirement to a format that I believed SAP Build would understand better.
Create Data Entities with SAP Joule
Using the requirement and the SAP Joule option in SAP Build Code, we can specify that we want to create a CAP application and generate the necessary data models and services.
1. Prompt SAP Joule with requirement:
2. Accept the response:
3. Results:
Enhance the Application Data Using SAP Joule
The data for testing applications must be real and reflect reality. Generating these datasets can be a tedious task that consumes a lot of time and imagination. You’ll never have to do this again because SAP Joule can generate the data you need to work on your application!
1. Prompt to generate data:
2. Accept and trigger the information for your testing table:
3. AI makes mistakes, but we review and correct them by filling in some fields that were left empty:
Sorry my mistake here, I should request to SAP Joule to delete ‘minutes’ column because it’s duplicated with ‘hour’.
Create Application Logic with SAP Joule
Now it’s time to add logic to our application to ensure that the behavior of the fields is as expected.
1. Add logic:
2. Prompt SAP Joule with data validation logic that you want to perform:
3. SAP Joule triggers a proposal of the code:
4. As I’m a noob in CAP language, I’ve requested to Microsoft Copilot to ensure that all steps are good and to understand the code:
5. Once code is reviewed and understood that works fine, this code is accepted and trigger to the application:
Add UI to the Application
We have all the code now; it’s time to create the screens to enter and view the information. Let’s do this!
1. Create UI application:
2. Most important step here is to decide which actions will be performed by this application. In this case, we’ve selected ‘Form Entry Object Page’ because UI application will be responsible to collect data from user:
3. UI application is created with few easy steps:
4. Repeat steps for application which is responsible to show information. In this case, we need to select ‘List Report Page’:
5. Finally, we can show how both applications are created:
Run application
Everything is ready! Now let’s run the application and test it.
Overview about ‘Food tracking for your job performance’ application
Application screen
The requirement called for two applications: one to add food items and another to review the data. We have successfully met this requirement:
Add a new entry
The requirement called for help fields to enter the data and only allow certain values.
The day and time fields have the correct drop-down menus.
But it wasn’t able to create a drop-down menu for the ‘Type of food’ and ‘Transmitted Sensation’ fields (it probably could have done this by iterating the system). Despite not having a selection menu for ‘Type of food’ and ‘Transmitted Sensation’, the system was able to create validations to ensure the correct field is selected.
Show your data
The system was able to generate the table to display and it works correctly, showing the entry added in the previous step:
Additionally, the requirement asked to group by ‘Day’, ‘Type of food’, and ‘Transmitted Sensation’, and this requirement has been met:
Conclusion
The application requirement wasn’t complicated, but I believe it’s enough to demonstrate that for simple application cases, we can use SAP Joule to generate a fully operational application. As we can see from the analysis, the application meets 90% of the requirements and only failed in generating the drop-down menu.
For me, the conclusion is clear: without any CAP knowledge, I was able to create an application in less than 45 minutes and generate a blog in less than 2 hours. Now, I’m excited to see what I could achieve with a bit more time!
End credits
Time is very valuable and creating blog easy to understand and with high quality content are difficult with few time. AI can help us doing it and you have an example with this post which mainly created using Microsoft Copilot (AI).