Skip to Content
0
Former Member
Oct 15, 2009 at 09:17 AM

ALV Sum N columns how to?

66 Views

Hi all,

I'm doing a report on ABAP for a timesheet of the current month. The output i want is similar to this:

Year      Month     Type         Item       #days  tue-1      wed-2    thu-3 ...
2009     September  Project    Project1      3        1        1          1
2009     September  Project    Projec2       5        1        1          0
2009     September  Task       Task1         1        0        1          0

The field #days is a sum of all the days columns for september next right to the #days column.

I can have an SQL wich can extract all the data to fill year,month,type,item and #days. But then, i need to flat these #days in the correct days column. I think i can do it with 2 sqls, but then i need to join these data to display it right.

Finally, present that data in an ALV.

I have a structure defined in ABAP dictionary with all the static fields. The columns representing the days (sat-1,sun-2,...) are not in the structure.

I've tried to define a new structure wich include the old one and define the remaining columns, but i can't show the fields defined in this extra structure, only the static fields defined in ABAP dictionary.

This is probably simple, but i'm just starting in ABAP, and this seems odd and confusing right now.

What's your advice to solve this problem?