Skip to Content

Hello Techies,

I had created a document on enhancement of standard search helps in SAP.

Kindly go through the same provide your valuable suggestions.

Introduction:

      R/3 system has enabled a standard functionality for the users to display all possible values for an input field in the screen with input help or Search help often referred to as F4 help. When there is any custom requirement for a search help, then the standard search help could be enhanced using append search help functionality. This document illustrates the enhancement of Standard search help.       

Introduction on Search Helps in SAP:

The search helps are basically classified into two types:

  1. Elementary search help
  2. Collective search help

Elementary search helps defines from where the data has to be read with the user input in the selection field and how the result has to be displayed etc. Whereas collective search helps are combination of various elementary search helps which could offer various paths for the search.

Procedure:

Let us consider standard search help for GL accounts-SAKO for an example.

SAKO is a collective search help which offers various search paths for a GL account.

SAKO.png

Screenshot 1: SAKO search help for GL account

This collective search help comprises of various elementary search helps. In the below screenshot it could be found that the GL account could be searched based on various criteria.

/wp-content/uploads/2013/10/collective_295478.png

Screen shot 2: GL account search help screen

1.   

W

When there is a custom requirement for the search help , this colelctive search help could be enhanced in such a way without modifying the existing one usign append search helps.

  1. Go to transaction SE11 and in search help provide the collective search help which has to be enhanced and choose display.

     /wp-content/uploads/2013/10/tcode_295479.png

          Screen shot 3: SE11 initial screen

     2.    In the next screen , click on Go to menu and select append search help as below.

          /wp-content/uploads/2013/10/next_295480.png

    

          Screen shot 4 : Append search help

      3.  In the screen appearing , seelct option highlighed in red below to create a new append search help.

          /wp-content/uploads/2013/10/below_295481.png

    

     Screen shot 5: Create new append search help

  A pop up appears for providing append search help name. Provide the required name and press continue.

     /wp-content/uploads/2013/10/cus_295482.png

     Scren shot 6 : Append search help name

Now the next screen appears as below. Provide the descripton for the new append search help and click on save and then activate it.

/wp-content/uploads/2013/10/main_295483.png

     Screen shot 7 :  New custom append search help

     4. Now the new append search help is added to the existing collective search help.

         

          /wp-content/uploads/2013/10/app_295487.png

         

         

          The search help is not yet assigned to the append search help. For this we need to include an elementary search help      to      the      newly      created      append   search help .

     5. Create an elementary search help from SE11 .

          /wp-content/uploads/2013/10/el_295488.png

               Screen shot 8 : Search help type

    6.    Provide the description and selection method and fields required for the user input in the search help as below.

               /wp-content/uploads/2013/10/des_295489.png

              

               Screen shot 10: Search help definition

          The selection method determined the database table from which the value has to be fetched.

          When the dialog type is gived as diaply values immediately, there is no restriction for the values.

          If the value has to be restricted , the dialog type ‘Display values with restrictions’ could be selected and also search help exit has to be provided.

                   /wp-content/uploads/2013/10/dia_295496.png

               Screen shot 11: Dialog behaviour

          A search help exit restricts the values returned by the standard search help according to the custom requirement.

         7. Create a Function module with the logic required to restcit the search help values with the parameters as bewlo  and assign it to the search help exit option in the elementary search help.

                    /wp-content/uploads/2013/10/changing_295498.png

                    /wp-content/uploads/2013/10/tables_295499.png

                       Scren shot 12: FM parameters

                  /wp-content/uploads/2013/10/exit_295500.png

                    Screen shot 13: search help exit assignment     

         

The required logic could be written in the FM to resrtict the values. In the below code , the values are restrcited based on company code, Alternate account number and GL account value

IF callcontrolstep = ‘DISP’.

   LOOP AT shlpselopt INTO f_selopt.
    
CASE f_seloptshlpfield.
      
WHEN ‘BUKRS’. “Company code
        
MOVE-CORRESPONDING f_selopt TO r_bukrs.
        
APPEND r_bukrs.
      
WHEN ‘ALTKT’. “Alternate account
        
MOVE-CORRESPONDING f_selopt TO r_altkt.
        
APPEND r_altkt.
      
WHEN ‘SAKNR’. “GL account
        
MOVE-CORRESPONDING f_selopt TO r_saknr.
        
APPEND r_saknr.
      
ENDCASE.
  
ENDLOOP.

SELECT bukrs saknr erdat altkt INTO TABLE gt_temp FROM skb1

WHERE bukrs IN r_bukrsAND saknr IN r_saknrAND altkt IN r_altkt.

** Build the record table with the details obtained
   
IF gt_temp IS NOT INITIAL.
     
LOOP AT gt_temp INTO gf_temp.
        record_tab
string+0(10)  = gf_tempsaknr.
        record_tab
string+10(4)  = gf_tempbukrs.
        record_tab
string+64(10) = gf_tempaltkt.
        
COLLECT record_tab.

      ENDLOOP.
   
ENDIF.

     8. Now the search help could be tested from the menu bar Searchhelp-> Test or just by pressing F8.

          /wp-content/uploads/2013/10/test_295501.png

          /wp-content/uploads/2013/10/fin_295502.png

          Screen shot 14: Testing Search help 

                                         

          9. Provide the inputs in the selection screen and the values are obtained as follows.

               /wp-content/uploads/2013/10/fin2_295503.png

              

               Screen shot 15: Search help result

         

          Conclusion:

               Thus the append search help could be used to enhance a standard search help without modifying the existing collective search help logic as illustarted above.

   

To report this post you need to login first.

7 Comments

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

  1. Pedro Rios

    Good post Vaishnavi.

    How did you put the MASTER RECORD button on screen shot 15. I’m trying to add the “Keep” button in a custom SH by using  F4IF_INT_TABLE_VALUE_REQUEST. To fix the search help on the screen and be able to keep working with the window opened.

    (0) 

Leave a Reply