This is a test message to test the length of the message box.
Login
|

058: From Specification to ABAP Solution

77

In this episode, we'll look at how to create a complete ABAP application from a specification and have our agent structure it. We'll also revisit the basic setup in VS Code.

Advertising


In this episode, we'll look at spec-driven-development, where we present our chosen AI agent with a specification that we've already developed, either on our own or with AI, to build a complete solution. In this case, we'll also look at the configuration within VS Code and what else we need to consider.

 

Include path

In our starting scenario, we've already integrated our cloud system and our AI package, which we've used in previous episodes. We'll log in to the system again so we can start working with it. For our small project, we'll use a directory. We've already created this directory to define all the objects we'll generate later. Let's take another look inside the package and see that it really is empty.

In the next step, we want to integrate our actual specification into VS Code. To do this, we go to the menu and add a new directory. However, we don't find the directory here because we are currently in the virtual file system. This means the system is not based on our physical file system, and we therefore have to take a small detour to be able to mount an additional folder. Using the command "Open Workspace Settings", we open our settings, and in the upper part, you will find the configuration as a JSON file. Here you will find the mounted virtual folder, which already exists. Here, we add an additional entry below, where we also want to mount the folder. Autocomplete will also help you here. We select the physical path, then add our local path and escape all slashes so that they are cleanly integrated into the JSON structure. After saving, we can already see in the background that our local folder is now also present in our workspace, alongside our SAP system.

 

Specification

In the next step, we will check the specification that we have already created. With a normal click, we open it in the system and see the Markdown file that we created earlier. We use Markdown because it is very easy and understandable for the agent to read. If reading the Markdown isn't very convenient for you, you can also enable preview mode. This way, you'll see the preview and formatted lists alongside the Markdown text. In our specification, we first outlined the requirements. We want to build a load class that reads the clean core objects from the shared Core Data Service and calculates their levels. We specify various weights and define several test cases for a unit test. Additionally, we specify that the results should be stored in a table entity, not a traditional table. Next, the agent should create a read-only RAP application based precisely on this table, and finally publish the OData service directly so that we can start with the finished application.

In the lower section, we define some rules, namely where the packages are created, how the packages are specified (i.e., that we want separate packages for the application and for the load class under the specification), that we always need interfaces, that we want to use Clean ABAP, and we also specify the naming convention. Finally, we reference the system and the existing MCP server. Here's another general reminder: Naming conventions, writing unit tests, and so on should, of course, also be defined in the agent file, as this is always a foundation for all applications we write. Likewise, the presence of the MCP server and which tools are available should be specified. For completeness, however, we have included this in the specification.

 

Start Agent

In the next step, let's prepare our agent and open GitHub Copilot via the side menu. First, we define the session as Local and add our own ABAP agent. This loads the configuration. [via the back menu] Let's double-check that the MCP server is indeed running and the tools are available, and finally select our personal model, which we will use for the implementation. In this case, we're using Opus 5.5, as we've had very good experiences with it. The specification is already automatically attached to the chat, since it's the open document. This simply tells the agent: Use the specification to build the application and packages in the system. The agent now starts the implementation, and we set the tools to "Allow All" so that the initial queries are also handled completely automatically. The agent then starts making the first tool calls and checks, for example, whether the Standard Core Data Service is enabled and available for use, before beginning the actual work within the system. Additionally, he creates a to-do list for us to show which steps he will now perform.

Now, it can of course happen that the agent doesn't have any permission to access our directory, either to read or write. Therefore, we check the settings for the ABAP Development Tools and the MCP server again to see if any restrictions are set and, if so, which restrictions are set. In the lower section, we see that all destinations are allowed and our package is shared via the parent package, meaning all changes are possible. Should the agent encounter a permissions problem or be unable to modify this package, it will generally notify you, and you can then extend the permissions and tell the agent to continue.

 

Review

In just under 10 minutes, the agent has completed its run, created our objects, and provides us with a summary of the various objects and actions it performed. We essentially gain an overview, but also some insights into which classes we should execute, for example, to initialize the objects. We also receive information that we forgot to specify which error category corresponds to which object in the specification. Here, it uses the standard that an error message becomes Level D, a warning Level C, and, for example, no finding is classified as Level A.

Let's first take a look at the system and open our package. Here we see that two subpackages were created directly: one for loading and the actual report, which was created for display in Fiori Elements. Let's go to the loader and look at the table entity. A classic table wasn't created here, but rather a table entity directly, as we defined in the specification, and the field names also look correct. Let's move on to the various ABAP objects that were created: a factory, an injector, a loader class, and a repository were also created. In the factory, we see that two objects are created, each with an interface, and the naming conventions have been correctly adhered to by the system. In the Loader class, we see the logic that is executed; for example, the weighting is performed here after the classes are loaded. Moving on to the interface, we also see, for example, the different levels, which have been defined as constants, as well as the weighting, so that we can easily adjust them later. Let's move on to the application and call the service for the Fiori application. This has already been published by the agent, so we can start directly with the application preview.

Now, in the final step, if we start our Fiori application, it is already displayed. We see the project, the object types, names, and the package; this information is already displayed clearly. However, we currently don't receive any data when we press "Go" because we haven't yet loaded any data from the system. Looking at the output of our agent, we see that we need to populate the table ourselves by calling the loader function. We check again directly in the class to see if there is already a main method that loads the data. This is not the case, which means we need to make further adjustments to our agent.

 

Load Data

To do this, we enter the next prompt and tell the agent to build an executable class where the table population will then be performed. As an additional step, we add that it should also add the ABAP documents. This should have been included in the rules beforehand; we forgot to do that, but the agent can generally handle this for us and correct the objects. After the prompt, the agent starts and executes the changes in the system. We now have to wait again until the changes are implemented. We can already see in our open object that the ABAP documentation for the individual methods is being added, just as we wanted. As a result, we then need to find out the name of the new class that we now have to execute to provide data for our application. In the upper part of the result, we find what we're looking for: The new class is specified there, which we can now open via our tools.

The executable interface has been implemented in the upper part of the class. There is an additional method, also called Load Project, and it uses our repository object via the factory to retrieve the projects and then save them. We can then execute the class by pressing F5 and load the data into our application. We then receive a message that two new data records have been loaded. Returning to our application, we now see these two data records in the list and can navigate to the Object Page. Here we notice the next point: All fields are grouped together in one cluster. We want to cluster the different pieces of information onto different facets to get a clearer overview of the output data.

 

UI Customization

In the next step, we'll start customizing the UI to get it back to our desired state. For this, we need to change the UI annotations. However, we won't do this ourselves; instead, we'll let the agent handle it. We inform the agent that we want to cluster the object page again by object, technical debt, and admin information so that it can separate the different fields and visualize them better for the user. We then hand this task over to the agent, which begins reading our DDLX file (Metadata Extension), interpreting the fields, and clustering them accordingly.

After the agent has made the change, we can return to the UI, refresh it, and view the new changes. As we can see, a cluster has been created for the object; that is, the project, object type, object name, and package are all in one cluster. The technical debt, that is, which object it is, the amount of technical debt, and the number of related messages, is displayed as a second block. And when the whole thing was calculated can now be found in the administrative information. So the changes worked, and without much intervention, the agent interpreted the data model and categorized the fields for us.

 

Unit Test

Finally, let's take another look at the generated unit tests, because at the very beginning we had the requirement that unit tests should also be generated for the load class. We can have the agent execute these by telling it to run all unit tests within the package. After executing the steps, it also points out that we actually only have unit tests in a single class. We call this class and look at the unit tests that were defined locally. Then, we run the unit tests, this time with coverage, to see how much of the code is actually covered by the unit tests. The unit test will run for a moment before we get the result. Overall, the coverage is very good; 98% of the code is covered. Here, we can switch back to the main class and see where the distribution lies, and only one special case in the level derivation wasn't automatically tested.

 

Summary

That concludes our specification, and we have a solution, at least as we wrote the specification. The specification is generally in a separate file because we should take the time to write it and describe precisely which objects we need, the underlying architecture, how everything should interact, and perhaps even what the objects should be called. The more precise and better the specification, the better the final result, and we won't have to do as much rework as we did in this case, for example, because we didn't have ABAP documentation or the UI wasn't perfect yet. This episode was just meant to give you an initial impression of how to approach Spec-Driven-Development and show you what's important. Thank you for watching, and see you next time.

 

YouTube
Video


Included topics:
YouTubeScriptAgentic AISpecification
Comments (0)



And further ...

Are you satisfied with the content of the article? We post new content in the ABAP area every Tuesday and Friday and irregularly in all other areas. Take a look at our tools and apps, we provide them free of charge.


057: Fix my RAP Application with AI

Category - YouTube

How can AI actually help us find and correct errors in our RAP application? Let's look at the new features in the MCP Server and configure the IDE to find the error.

11/16/2026

056: Fiori Elements for ABAP Developers

Category - YouTube

What are the key elements for an ABAP developer to become a full-stack developer? Let's look at some of the building blocks from the ABAP developer's perspective and define a goal for the journey.

11/02/2026

055: Clean Core Measurement

Category - YouTube

Are you on the path to Clean Core? But how do you ensure you actually get there? This open-source project is about moving from feeling to knowing. It offers insights into Clean Core and measurement for greater transparency.

10/19/2026

054: Recycling-Heroes - Data Generation (Document)

Category - YouTube

In this episode, we generate test data off-stack with Claude and have the method written for us, before we then perform the review in the real ABAP system and load the sample data for our documents.

10/05/2026

053: Recycling-Heroes - Multi-Input Field (Document)

Category - YouTube

In this episode, we'll introduce additional convenience features to the Recycling Heroes document app, address the various value helps and activate multi-input for the tags on the Object Page.

09/28/2026