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: 

ABAP OOABAP ALV GRID

Former Member
0 Kudos
197

Hi Experts,

i have one requirement. i need to Develop Alvgrid in one Screen.in the Same Screen another Grid.in First i need to Display Summary information.if we Double Click on First Grid of line Detail output of paricular contract.How to Acheive using classes.

plz send me the material Regarding this.and give me Some examples.How to approach.

Thanks,

Venkat.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
133

Hello,

<b>Check this link:</b>

http://www.geocities.com/mpioud/Z_DEMO_2_ALV_LIST.html

This program is an example with 2 ALV Grid lists.The Sales Orders are displayed in the first list.When a line is selected, the items of the order are displayed in the second list.

Regards,

Beejal

**reward if this helps

5 REPLIES 5

Former Member
0 Kudos
133

Hi,

Here is a code for a single grid.

In the screen layout,make a custom container (Icon with C ) and name it in Capital letters as CONTAINER.The code below in bold letters is what exactly you want.I ve given a small example on how to use ALV:

REPORT SAMPLE.

DATA: alv type ref to cl_gui_alv_GRID,

cont type ref to cl_gui_custom_container,

itab_spfli type table of spfli.

START-OF-SELECTION.

select * from spfli into table itab_spfli.

call screen 100.

END-OF-SELECTION.

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


MODULE STATUS_0100 OUTPUT.

seT PF-STATUS 'GUI'.

  • SET TITLEBAR 'xxx'.

if cont is initial.

CREATE OBJECT cont

EXPORTING

CONTAINER_NAME = 'CONTAINER'.

CREATE OBJECT ALV

EXPORTING

I_PARENT = CONT.

CALL METHOD ALV->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

I_STRUCTURE_NAME = 'SPFLI'

CHANGING

IT_OUTTAB = itab_spfli

Now for your requirement,you can create two custom containers in the screen layout and two different alv grid instances.ie:

DATA: alv1 type ref to cl_gui_alv_GRID,

cont1 type ref to cl_gui_custom_container

alv2 type ref to cl_gui_alv_GRID,

cont2 type ref to cl_gui_custom_container.

To select data from first grid,you can use events on double_click and fetch information and then display it in the second grid.

<b>SOME MATERIAL REGARDING ALV:</b>

www.abap4.it/download/ALV.pdf <b>(very useful)</b>

http://www.sapdevelopment.co.uk/reporting/alvhome.htm

<b>-->download the PDF from following link.</b>

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm

<b>SAMPLE PROGRAMS IN ALV:</b>http://www.geocities.com/victorav15/sapr3/abap_ood.html#d_grid

<b>DEMO PROGRAMS IN ALV:</b>BCALV*

Regards,

Beejal

**Reward if this helps

Former Member
0 Kudos
134

Hello,

<b>Check this link:</b>

http://www.geocities.com/mpioud/Z_DEMO_2_ALV_LIST.html

This program is an example with 2 ALV Grid lists.The Sales Orders are displayed in the first list.When a line is selected, the items of the order are displayed in the second list.

Regards,

Beejal

**reward if this helps

0 Kudos
133

Hi,

Thanks For u r Reply.

But My Requirement is in the Same Screeen i need to Display two alv grids,

in top of the Screen Basic information. and below the Detail list.

How to approch this requirement.

Thanks,

Venkat.

Former Member
0 Kudos
133

Hi,

you have to use SPLITTER CONTROL for this,

class CL_GUI_SPLITTER_CONTAINER

chack the program RSDEMO_SPLITTER_CONTROL

Regards,

hope it helps

Former Member
0 Kudos
133

hi,

see the demo program BCALV_GRID_03.

this will help u.

regards,

Naresh.