|
Código fuente -
Ejemplos ALV
|
|
Martes, 22 de Julio de 2003 17:24 |
Ejemplo de un table control programado mediante ALV
SAP Grid (ALV List Viewer)
- Display
table.
This tiny program just displays the T001 table using grid control and all
its default features.
Used object:
cl_gui_alv_grid
Screen 100
- Display
table.
Like previous but added print events handling for printing the table contents
using grid "Print" button.
Print events:
print_top_of_list
print_top_of_page
print_end_of_page
print_end_of_list
Used object:
cl_gui_alv_grid
cl_gui_splitter_container
cl_gui_container
- Display
table and show details.
Like previous but added double click event handling. After double clicking
on a table line detailed information for the line is displayed in another
grid.
Events:
- print events (see above)
double_click
Used object:
cl_gui_alv_grid
cl_gui_splitter_container
cl_gui_container
cl_gui_dialogbox_container
- Display
table and show details.
Like previous but added my own button to the grid toolbar. The function is
the same as for double click.
Events:
- print events (see above)
double_click
toolbar
user_command
Used object:
cl_gui_alv_grid
cl_gui_splitter_container
cl_gui_container
cl_gui_dialogbox_container
cl_alv_event_toolbar_set (in event handler)
- Display
table and show details.
Like previous but changed context menu for the column #2 - added my own function
code and disabled all standard functional codes. Context menus for other columns
remain unchanged. The function is the same as for double click or additional
button.
Events:
- print events (see above)
double_click
toolbar
user_command
context_menu_request
Used object:
cl_gui_alv_grid
cl_gui_splitter_container
cl_gui_container
cl_gui_dialogbox_container
cl_alv_event_toolbar_set (in event handler)
cl_ctmenu (in event handler)
|