Skip to Content

Search Utility

Introduction

This Search Utility helps the ABAP Developer to search structures in ABAP Dictionary based on various flexible search criteria. Search utility is an extension to the standard functionality Where Used List and the search through SE84 transaction provided by SAP.
1. Search the Structures by field names. As in, if I choose 10 fields, the utility returns a structure with the same 10 fields.
2. Search the Structures by Data Elements. As in, if I choose 10 data elements, the utility returns a structure with the same 10 data elements.
3. Search the Structures by Data Type. As in, if I choose 10 Data Type with respective lengths, the utility returns a structure with the same 10 data types and the respective elements.
4. In Addition to this we can specify the maximum number of hits in the search criteria and also an option to return the structure containing fieldnames/data elements/data types in the consecutive positions as specified in search criteria.

Benefits

1. Extensively useful while developing RFC, BAPI in SAP. It promotes re-use by allowing the developer to search if the structure already exists in the ABAP Data Dictionary. Developer can re-use the existing structure.

2. ABAP Data Dictionary is not dumped with the identical structures. It saves memory in the application server.

3. It can be used for general search of structures too.

How to Execute?

Step 1 : Copy the code and paste it in se38 transaction and create the respective includes in se38.

Step 2 : Execute the report in se38.It takes you to the Search Criteria screen.

Initial Selection Screen

Initial Selection Screen

“Search by Field Name” is chosen if the search is based on field names.

“Search by Data Element” is chosen if the search is based on data elements.

“Search by Data Type and Size” is chosen if the search is based on data type.

The Parameter “No. Of Fields to be matched” specifies the number of fields to be searched in a structure.

The Parameter “No Of Struc/Tab to be searched” specifies the number of hits. As in if I choose 1,utility returns only one structure which contains the specified fields.

If the “Search by consecutive Pos” is checked then the utility searches for the structures with the fields in consecutive positions and displays it.

Step 3 : Depending on selection criteria chosen in the initial screen a dynamic selection screen is generated at the run time.

Dynamic Selection Screen

Dynamic Selection Screen

Key in the field names to be searched.

Step 4 :Press F8.The output is the structure containing PERNR AND ENAME.

Result Screen

Result Screen

Number of entries in the result screen = Value of “ No Of Struc/Tab to be searched” in the initial screen.

Step 5 : The structure can be verified in ABAP Dictionary if the structure contains the fields PERNR AND ENAME.

ABAP Dictionary

ABAP Dictionary

Case: If the option “Search by consecutive Pos” is checked in the initial screen then the utility searches the structure with PERNR AND ENAME in the consecutive positions and displays it.

The structure can be verified in ABAP Dictionary if the structure contains the fields PERNR AND ENAME in consecutive positions.

Result Screen

Result Screen

ABAP Dictionary

ABAP Dictionary

It is Time for the Reckoning…Can You Take the Heat??

ABAP PUNTERS, here is piece of code elucidating rich concepts of dynamic programming which generates report dynamically at the run time. In addition to it, the selection screen is generated dynamically. Anyone who cracks the code is sure to gain and the same person should work innovatively towards developing new tools.

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. Ryan Cannel
    Dear Ravikumar,

    I just looked at this tool. Its very helpful in finding the required fields from tables and structures. Also, the points that you have highlighted in the documentation regarding dynamic creation of selection screens, etc are definitely eye catching for new developers who have not yet stumbled accross the need to provide such functionality, including myself.

    Thanks for helping us improve ourselves and gain better knowledge of the SAP system.

    Regards,
    Madhur

    (0) 
  2. Michael Gutfleisch
    Did you already think about the possibility to display only those results that can be used from a decoupling point of view?
    This means only those structures that belong to packages for which my package has the using declarations.

    Regards Michael

    (0) 

Leave a Reply