Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all articles
Browse latest Browse all 935

Favourite Objects Tool

$
0
0

If you are an ABAP developer, the chances of which should be high given that you are lurking around in the ABAP Development space, you must have come across situations in your projects where you had a string of development objects you worked on frequently. This string would have ran through objects of different types - classes, programs, function modules, tables, views etc. Often, this string would have been long enough to make you ruminate over the name of the object you wanted to work on next so that you could enter that name in the corresponding transaction (SE24, SE38, SE37 etc.) before engaging in a tete-a-tete with that object. What I would like to offer you is a simple tool that aspires to make it easier for you to keep a tab on your favourite objects and be able to navigate to them like a breeze.

 

The tool is built in ABAP and mainly comprises a report program, besides a few supporting objects. It makes use of a custom table where you can maintain your favourite objects. The good news is that you can maintain entries in the table from the tool's simple-to-use interface itself. Another good news is that it's not really mandatory for you to create this table and maintain data in it; if you don't, the tool automatically picks up, from TADIR, all objects authored by you and displays them as your favourites.

 

To give you a hint of what the tool's interface looks like, here is a screenshot:

 

As you can see, it neatly lists your favourite objects organized by the object type. You simply have to double-click on the object you want to navigate to and you will be taken there. Or, you can just right-click on the object and from the context menu, choose to open it in a new window so as not to lose the window hosting the tool.

 

In the application toolbar are buttons to add and delete favourite objects, and a button to open an object in a new window. You can either use these buttons or carry out the respective operation by choosing the relevant option from the context menu.

 

If you wish you can set the transaction for the tool as the start transaction so that as soon as you log on to your ABAP system, you are presented with your favourite objects.

 

If the above has sparked an interest in you, feel free to try out the tool and provide feedback. Below are instructions on how to deploy and use the tool.

 

Deploying the Tool

  1. Create the main report program
    1. Go to SE38 and create a new report program and copy the code from the attachment titled 'Favourite_Objects_Program.txt.'.
    2. Find the “SET PF-STATUS” statement in the report source code and double-click on the PF status “BUTTONS” to create the PF Status.
      1. Maintain application toolbar buttons ‘ADD’, ‘DELETE’ and ‘OP_NEW_WIN’ as shown in the screenshot below.

                        

                        

                    ii. Maintain PICK against function key F2 under ‘Recommended Function Key Settings’.

                        

                    iii. Activate the PF status.


          c. In the CONSTANTS section of the report source code, maintain values for the following constants:

               gc_fm_new_win – Add the name of your RFC function module for openings objects in new window as the value for this constant.

                gc_fav_obj_tab – Add the name of your favourite objects table as the value for this constant. If you do not wish to create the table (in which       case, the tool will automatically pick all objects authored by you from TADIR), you can leave this constant unchanged.

 

     2. Create the RFC Function Module for Openings Objects in New Window

    1. Go to SE37 and create an RFC function module
    2. Copy the code from the attachment titled 'Favourite_Objects_RFC.txt' to the function module and activate it.

 

     3. Create the Favourite Objects Table

          Note: This is an optional step. If you do not wish to create the favourite objects table, you need not do so. In such cases, the tool will automatically 

           pick objects you have authored from TADIR.

               a. Go to SE11 and create the favourite objects table having delivery class ‘C’

               b. Add the following fields to the table. Please use the same field names as in the screenshot else you will need to adjust the report source

   where these fields are being used.

                   

             c. Assign the search help (the one that would be created in step 4 below) for searching repository objects to field OBJ_NAME.

                   

               d. Maintain the technical settings of the table.

                   

                   

 

                e. Maintain the enhancement category of the table (preferably ‘Cannot be Enhanced’) and activate the table.


     4. Create the Search Help for Searching Development Objects

               a. Go to SE11 and create a search help according to the screenshot below.

                   

     

     5. Create a Transaction for Executing the Main Report Program

               a. Go to SE93 and create a transaction for your report program. You can use this transaction code to open the favourite objects tool and

                    additionally, you can set the transaction code as the start transaction (menu path: SAP Easy Access screen > Extras > Set Start Transaction).

 

 

Using the Tool

1. Launching the Tool

    1. If you have set the transaction for the tool as your start transaction, then it will automatically open up as soon as you log on to the system

            b. If you have not set it as your start transaction or you need to navigate to the tool from another open transaction, you can simply use the transaction

                code for the tool.


2. Adding Favourite Objects

           a. From the tool's application toolbar or the context menu, choose the option to add a favourite object. That should bring up the below pop-up.

              

 

          b. Enter the details of the object you want to add and click on Continue. The object will get added to your favourites and will instantly show up in the

              list.

 

3. Deleting Favourite Objects

     Simply click on the object you want to remove from your favourites and choose the option to delete either from the application toolbar or the context menu.

 

4. Navigating to a Favourite Object

          a. Method 1: Double-click on the object to open it in the same window.

          b. Method 2: Right-click on the object and choose 'Open in New Window' from the context menu to launch the object in a new window.


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>