Application Development 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: 

Merge Alv header

Former Member
0 Kudos

i have a requirement like this:

display an alv report with column header like this:

consider this as 1 field:

Sr No.| vat inv No |     party name | Tin No | Purchase Value| Amt|                  

         |                |                      |           | 4% |  5%|6%     |       |

i dont want to append this as alv cells.

the problem is with purchase value field.

is it possible to display column split single column header into 3 .

or merge 3 column header into 1. like above.

if nothing works then smartform is the last option.

but i am curious to know whether this can be achieved in ALV.

suggestions Plz.

9 REPLIES 9

Former Member
0 Kudos

Hi,

Not getting your point,,,sounds strange,,,,

You cannot split the header ,,,but for the same header you can assign the three values saparate by '|'.

create purchase value as char30 (.Ex)

concatenate lv1 | lv2 | lv3 into lv._where lv1 to lv3 are  different values you mentioned)

pass this lv to Internal table of alv display..normally

thanks,

lingaraj

0 Kudos

no there are different columns.

each column have separate column header. the problem is this that i want  these three columns have single super header just like in excel we do.

Former Member
0 Kudos

Hello Abhishek,

Its not possible with ALV, but you can do this with classical report.

Regards

Dhiraj Dangore

0 Kudos

i am ok with classical report.

plz tell how this can be achieved in case of classical reports.

0 Kudos

Hello Abhishek,

In classical Report, you have a TOP-OF-PAGE event.

In that event, you first declare header with its offset like  this,

TOP-OF-PAGE.

WRITE:/(37)'|',(39) 'Common Header',(75) '|'. " Common Header for last three columns


WRITE:/(1) 'serial no',(11)'|',(13)'vatno',(24)'|',(26)'partyname',(37)'|',(39)'tinno',(45)'|',(47)'PuchVal',58'|',(60)'Amt', (75) '|'.

Now fill the data, w.r.t above offset using looping internal table.

Regards,

Dhiraj Dangore

0 Kudos

Thanks , i got that.

but coming to that point again, i need that in alv . it may be hierarichal alv list.

but ALV.

0 Kudos

Hello Abhishek,

Its is not possible in ALV, the reason behind that we can't make fieldcatlog for that.

And sap doesn't have any functionality to create such fieldcatlog. I already face this problem.

I used double-click functionality for that column to call next alv containing merge column for that.

Regards,

Dhiraj Dangore

Former Member
0 Kudos

hi,

it is not possible.

Regards,

venkat.

Former Member
0 Kudos

HI,

Try use of 'Under' write statement.

Regards,

Ravi Singh