11-12-2013 10:44 AM
12-05-2013 4:50 AM
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.