Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

search option is available inside alv report ? like ctr+f

ramkumar007
Participant
0 Kudos

search option is available inside  alv report ? like ctr+f  .

1 REPLY 1

Former Member
0 Kudos

Hi Ramkumar,

Yes you will get the Search Option(Ctr+f) by using cl_gui_alv_grid in ALV report . For this you need to design a screen with custom container  cl_gui_custom_container.

Please find the steps below.

step 1 : Declaring the container and alv grid objects.

data : go_container TYPE REF TO cl_gui_custom_container,

         go_grid      TYPE REF TO cl_gui_alv_grid,

Step 2 : Create a Normal screen and create a container and name it. Here i am naming it as a CC_ALV.


Step 3 : Create the objects for container and ALV Grid.


IF go_container IS INITIAL.

     CREATE OBJECT go_container

       EXPORTING

         container_name              = 'CC_ALV'

       EXCEPTIONS

*--> No Need to Handle Exceptions

         cntl_error                  = 0

         cntl_system_error           = 0

         create_error                = 0

         lifetime_error              = 0

         lifetime_dynpro_dynpro_link = 0

         OTHERS                      = 0.

*--> Object of Grid

     CREATE OBJECT go_grid

       EXPORTING

         i_parent          = go_container

       EXCEPTIONS

*--> No Need to Handle Exceptions

         error_cntl_create = 0

         error_cntl_init   = 0

         error_cntl_link   = 0

         error_dp_create   = 0

         OTHERS            = 0.

Step 4 : Call the below method as same as REUSE_ALV_GRID_DISPLAY.

CALL METHOD go_grid->set_table_for_first_display

       EXPORTING

*        is_variant                    = lw_variant

         i_save                        = 'A'

         is_layout                     = lw_layout

       CHANGING

         it_outtab                     = lt_final

         it_fieldcatalog               = lt_fieldcat

         it_sort                       = lt_sort

       EXCEPTIONS

         invalid_parameter_combination = 0

         program_error                 = 0

         too_many_lines                = 0

         OTHERS                        = 0.

ENDIF.

Reward points if it helps.

Thanks,

Naveenkumar M.