Menu

How to Extend the SAP IMG with Custom Objects

2014-05-07       

In my last post, I demonstrated how to find the customizing table for a given IMG object. Following up on that, in this post I will demonstrate how easy it is to add your own nodes to the SAP standard IMG. It just takes four simple steps.

Unsere Literaturempfehlung

SAP – Der technische Einstieg: SAP-Technologien und Konzepte

Sind Sie neu in der SAP-Welt und möchten schnell mitreden? Mit diesem Buch finden Sie sich erfolgreich im SAP-Umfeld zurecht! Sie steigen direkt in die Konzepte und Technologien der SAP-Software ein und lernen die unterschiedlichen Systeme und Prozesse kennen. Schritt für Schritt zeigen die Autoren Ihnen die wichtigsten technischen Aufgaben und die Zusammenhänge zwischen den Objekten. Dank der vielen Beispiele und Abbildungen finden Sie sich schnell im SAP-Umfeld zurecht und können direkt in SAP ERP oder SAP S/4HANA anfangen.

Bei amazon.de ansehen →

Create a customizing table

First, of course you need to create the customizing table you want to add to the IMG. If you already have a table, skip this step and directly proceed to the next one. It’s also possible to add transaction links or a view cluster to the IMG, but for simplicity’s sake, I will use a table as an example here, since the approach is the same.

In my example, I’m using transaction SE11 to create a very simple table with just two key fields and a text field for data. It could be used to maintain additional texts for each plant in the SAP ERP system.

Maintain fields for the customizing table

When you maintain its attributes, make sure you do not check the “Table maintenance allowed” tick mark; this is a remnant of when SE16 was used to change table data. Since we will be using a generated table maintenance dialog with transaction SM30, we don’t need to set this flag.

Once you’ve added all the fields you need, don’t forget to set the technical settings of the table via Goto > Technical Settings. You should use the data class “APPL2”, the size category will usually be “0” (but of course, it’s up to you). Also, it might be recommendable to enable the change logs. If you’re done, save and activate your table.

Create the table maintenance dialog

Next, we need a table maintenance dialog for this table so we can maintain data for it. To create it go to Utilities > Table Maintenance Generator in transaction SE11. Enter the authorization group (usually it will be “&NC&” unless you want to add special authorization to a certain role for this table), a function group name, select the maintenance type and the standard recording routine so you can transport the settings made in your table.

Generate a table maintenance dialog in SE11

After you’re done, click the “New” button at the top to generate your maintenance dialog. You can now use transaction SM30 to maintain data for this table, and you should do it directly to check if everything worked so far.

Create an Enhancement ID

Now it’s time to get started with extending the IMG tree that you know from transaction SPRO. Call the transaction S_IMG_EXTENSION to do that. The first thing you need to do is create a so-called Enhancement ID, which allows you to group all the extensions you made to the IMG.

The transaction S_IMG_EXTENSION is a bit tricky to use, so be careful to follow the instructions in order to not mess up the IMG. First, press F4 on the “IMG Structure” field to make a search help appear. Enter the name of the node where you want to add your objects. Unfortunately, there is no search help via the tree structure, but you should be able to find the right one.

Once that is selected, use the F4 help on the next field to get a selection popup for the enhancement ID. Since you’re reading this guide, you probably don’t have one yet, so click the “New” button to create one. Enter an ID and a name, and click “Save” to take it over to the list.

Create an Enhancement ID in S_IMG_EXTENSION

Once that is done, just double-click it in the list (it should appear in the top part) to take it over into the selection field. Now, click “Enhance structure” at the top to proceed to the IMG structure itself.

Extend the IMG structure

Via the buttons at the top, you can now add new structure nodes and activities to the IMG structure. You’ll first want to add a structure node to group your extension. In my example, I’ve extended the “Enterprise Structure” node with my structure node.

Inserting a structure node into the IMG via S_IMG_EXTENSION

Once that is done, mark it and click the “Insert activity one level lower” button to add an executable activity to it.

Enter an activity into S_IMG_EXTENSION

This will take you to the IMG object attribute screen you already know from my last post, only this time you can define your IMG object yourself. Enter an ID and a name; the name will show up in the IMG tree in SPRO so make sure it is a sensible description of the customizing activity.

Adding documentation to an IMG node

Also, you should enter a document key and create some documentation for your IMG node, this will appear if the user clicks the documentation icon in the IMG.

Almost done! Now change to the tab “Maint. objects” and enter another ID/name combination for the maintenance object. Add your table to the table control and make sure you select “S” as the object type. If you had another type of object, like a transaction or a view cluster with a maintenance dialog, you could of course add it here accordingly. Set the transaction to “SM30” and save your IMG object.

Adding a Customizing Object to an IMG node

Be careful, there’s one more step to do! Return to the “Change IMG” structure view by pressing F3 or clicking the green arrow at the top. Once you’re there, you need to save again, otherwise your created object will not be added to the IMG.

That’s it! Once your changes are saved, change to the SPRO transaction to see the effects:

The extended IMG node in transaction SPRO

This is what the final object looks like. We’ve added a structure node and an activity node with a table maintenance dialog behind it. Now, you’ll be able to use this just like you use the standard IMG objects.