Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

2 ALV's using oops

Former Member
0 Likes
449

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.

3 REPLIES 3
Read only

former_member188829
Active Contributor
0 Likes
420

Hi,

Check these threads..

Read only

RaymondGiuseppi
Active Contributor
0 Likes
420

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 2

Then 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

Read only

Former Member
0 Likes
420

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.