06-09-2015 10:59 AM
Hi,
In my performance tuning I have found that much time was taken under the syntax CALL SCREEN 9000.
main_grid->set_table_for_first_display(
EXPORTING
is_layout = ls_layout
* it_toolbar_excluding = lt_exclude
CHANGING
it_fieldcatalog = lt_fieldcat
it_sort = lt_sort
it_outtab = lt_alv ).
CALL SCREEN 9000.
Can any one suggest me why the process is taking much time to cross the next one.
06-09-2015 12:39 PM
Hi,
First of Take a example
REPORT sapmz_hf_alv_grid .
TABLES: zsflight.
*--------------------------------------------------------------------
* G L O B A L I N T E R N A L T A B L E S
*--------------------------------------------------------------------
DATA: gi_sflight TYPE STANDARD TABLE OF sflight.
*--------------------------------------------------------------------
* G L O B A L D A T A
*--------------------------------------------------------------------
DATA: ok_code LIKE sy-ucomm,
g_wa_sflight LIKE sflight.
* Declare reference variables to the ALV grid and the container
DATA:
go_grid TYPE REF TO cl_gui_alv_grid,
go_custom_container TYPE REF TO cl_gui_custom_container.
*--------------------------------------------------------------------
* S T A R T - O F - S E L E C T I O N.
*--------------------------------------------------------------------
START-OF-SELECTION.
SET SCREEN '100'.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
* Create objects
IF go_custom_container IS INITIAL.
CREATE OBJECT go_custom_container
EXPORTING container_name = 'ALV_CONTAINER'.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_custom_container.
PERFORM load_data_into_grid.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Form load_data_into_grid
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM load_data_into_grid.
* Read data from table SFLIGHT
SELECT *
FROM zsflight
INTO TABLE gi_sflight.
* Load data into the grid and display them
CALL METHOD go_grid->set_table_for_first_display
EXPORTING i_structure_name = 'SFLIGHT'
CHANGING it_outtab = gi_sflight.
ENDFORM. " load_data_into_grid
===================================================
call process of screen having a custom container is call screen 9000.
in that put container previous to call and in the pbo call
CREATE OBJECT go_custom_container
EXPORTING container_name = 'ALV_CONTAINER'.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_custom_container.
then fill the internal table & fill the fieldcat
then only call set_table_for_display method.
No need to call screen 9000<===== no need to call
06-09-2015 10:13 PM
Not sure it's literally possible to answer intelligently without knowing what that screen does exactly...