‎2007 Dec 10 7:57 AM
Hi Abapers,
I have two internal tables itab1 and itab2 which i want to display as ALV's. I can use the FM reuse_alv_block_list_display. But i want using OOPS. Kindly give me sample code using OOPS.
Please Help me.
Thanks in Advance.
‎2007 Dec 10 8:00 AM
‎2007 Dec 10 8:06 AM
Create a screen with two CUSTOM CONTAINTER.
Declare the object for two alv like
DATA: init_0101,
cont0101 TYPE REF TO cl_gui_custom_container,
grid0101 TYPE REF TO cl_gui_alv_grid,
init_0102,
cont0102 TYPE REF TO cl_gui_custom_container,
grid0102 TYPE REF TO cl_gui_alv_grid,In the PBO (i assume you have filled the two internal tables before calling the screen)
Check if screen already displayed (use init flag or check object is initial) and if not
CREATE OBJECT: cont0101 EXPORTING container_name = 'CONT0101',
grid0101 EXPORTING i_parent = cont0101. " do the same for alv 2Then link the internal tables via (twice)
CALL METHOD grid0101->set_table_for_first_display
EXPORTING
i_structure_name = 'ZFSH_TASK' " or fill a catalog via REUSE_ALV_FIELDCATALOG_MERGE
is_layout = is_layout
is_variant = is_variant
i_save = 'A'
i_default = 'X'
CHANGING
it_outtab = t_task.(Any similarity with the parameters of REUSE_ALV_GRID_DISPLAY is by no means fortuitous.)
Looking for samples : call transaction SE83 "Reuse Library"
Regards
‎2007 Dec 10 8:20 AM
Hi,
Goto se80 and see the programs in slis and all the programs starting with bcalv*
uses classes for displaying in alv
plzz reward points if it is helpful.