2008 May 23 9:42 AM
Hi all good ABAP friends
When calling the method set_table_for_first_display, the resulting report is displayed in Grid view. The View button can then be used to change the view to List or Excel. It seems that Grid is the default view. Is there a way of seting the default view to List? In other words the report should be displayed in List view by the set_table_for_first_display method.
Any ideas?
Hi all good ABAP friends
When calling the method set_table_for_first_display, the resulting report is displayed in Grid view. The View button can then be used to change the view to List or Excel. It seems that Grid is the default view. Is there a way of seting the default view to List? In other words the report should be displayed in List view by the set_table_for_first_display method.
Any ideas?
2008 May 23 11:32 AM
After set_table_for_first_display you can call list by that way.
TYPE-POOLS: SLIS.
DATA: GT_FIELDCAT_ALV TYPE SLIS_T_FIELDCAT_ALV,
G_LAYOUT TYPE SLIS_LAYOUT_ALV.
CALL FUNCTION 'LVC_TRANSFER_TO_SLIS'
EXPORTING
IT_FIELDCAT_LVC = FCAT
IMPORTING
ET_FIELDCAT_ALV = GT_FIELDCAT_ALV.
G_LAYOUT-ALLOW_SWITCH_TO_LIST = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IS_LAYOUT = G_LAYOUT
IT_FIELDCAT = GT_FIELDCAT_ALV
TABLES
T_OUTTAB = OUTTAB[].
Code worked in system 6.0 (in 4.6 another structure of type-pool SLIS).
For full information you can read this blog: [Want to switch to ALV List from ALV Grid at runtime ?|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3696] [original link is broken] [original link is broken] [original link is broken];