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

Complex ALV

Former Member
0 Likes
1,176

Hello,

I have an ALV grid with totals & subtotals. I would like to insert an additional line below the subtotals line, with extra information from another table. Is this possible? Is there a way to do this without using the old WRITE statement?

7 REPLIES 7
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
913

Hi

Use End-of-Page event of ALVs.

That can help u.

Regards,

Sreeram

Read only

Former Member
0 Likes
913

Yes you can do this,

And there is no need of write statement in ALV .. .it will not get your statement that you have written in write..

Write statement is only for simple report programming.

For ALV you have to build a fieldcatalog and then use LIST or GRID display to disply the final table ...

Yes You can write additional information in 'TEXT' field of the fieldcatalog.

Regards,

Jayant

Read only

Former Member
0 Likes
913

Hi Popescu,

U can only pass one table in fun

"REUSE_ALV_GRID_DISPLAY"

so put that extra information in this internal table .

use end-of-page event of ALV.

Use Fm "REUSE_ALV_EVENTS_GET"

Reward points if helpful.

Regards,

Hemant

Read only

0 Likes
913

An example would be very usefull.

I don't know if i explained very well what I want.

Let's say that my ALV looks like this:

Field 1 a b c

Field 1 a b c

Field 1 a b c

Subtotal for Field 1 sum(a) sum(b) sum(c)

*************************************

Here I need extra line

*************************************

Field 2 a b c

Field 2 a b c

...

Using end of page I don't think it would be usefull. Is it ?

Read only

0 Likes
913

Hi,

Why dont you..

At New field.

Append a blank line.

EndAt.

in your data tab..add a 4 lenght field

color(4)...

for all the blank lines

pass 'CXYZ'.

where X is the color..

in that way you can get a blank line which is colorful after the records..

santhosh

Read only

0 Likes
913

hi Santosh,

thank you for your answer can you be more spcific

like where we need to add the below code for the blank line in ALV after sub totals

the color(4)...

for all the blank lines

pass 'CXYZ'.

Read only

Former Member
0 Likes
913

have never tried this but give a try...

chk the events AFTER_LINE_OUTPUT and BEFORE_LINE_OUTPUT in it_events