Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
BjoernSchulz
SAP Mentor
SAP Mentor
1,057

Introduction

Since release 2502, the ABAP environment has included IDE Actions. This allows you to extend the ABAP development tools with your own actions. Various standard actions are available for this, such as inputs, side effects and outputs. The implementation is carried out in the backend in ABAP OO and can be tested directly. The SAP Help documentation gives you an easy introduction to the topic of implementation and if you want to see the whole thing live, there is a recording with details from the ABAP Environment Roundtable #20.

 

Challenge

In everyday life we ​​try to follow best practices, we implement an additional interface for our classes, create a factory to decouple our actual implementation and if we want to write clean ABAP unit tests, we need an injector for the factory. Basically, we create the same objects over and over again.

 

Implementation

Let's take a look at the development and the frameworks used. In this article, we will not go into every detail of the development.

 

IDE Action

The framework provides various options for implementing your action. In the first step, we define a trigger for when our action is available.

my-ide-actions-01.png

 

This should become active when exactly one package has been selected or is in focus. In the second step, we create a UI because we need various information from the user. Since we suggest the names for the objects, they should be recreated when certain fields are changed. The side effects are available for this.

my-ide-actions-05.gif

 

As a result, we receive a message as an HTTP popup. Here you can find information about the transport and the objects created.

my-ide-actions-08.png

 

XCO Library

Finally, we use various XCO libraries to, for example, access the corresponding transport of a package or to generate the various objects in the system. The XCO libraries contain many useful components for reading and writing ABAP artifacts, but also helper classes for strings, messages or system fields.

 

Process

Some more details about the process and the procedure:

  • Determination - From the selected package we can deduce which namespace we are in (Y, Z or /NSPAC/). If the package is new and assigned to a transport request, we can derive the transport and assign it in the form.
  • Generation - A class can be created using the generator; interface, factory and injector are optional. If you delete the entries, the corresponding object will not be created. But be careful, some objects are dependent on each other.

 

Open Source

We make the current development of MIA available as open source. In our GitHub repository you can find further information on installation and the features related to the actions. If you want to learn how to build IDE Actions, take a look at the official documentation or take a look at the project to see how we solved it.

 

Conclusion

With IDE Actions, SAP finally provides ABAP developers a simple way to adapt their IDE to their own requirements and even with ABAP. You initially have a large framework at your disposal with which you can carry out many everyday tasks while remaining clean core and cloud ready.

 

For more technical insights: Blog Article

2 Comments