Skip to Content
0
Former Member
Jan 19, 2011 at 10:11 AM

Moving columns in an internal table

45 Views

Hi Gurus,

I have this ALV program which displays the cost element and its corresponding groups (up to 10th level only).

My problem is on how to display the report where the first column is the cost element and the succeeding columns the cost element groups starting from the top level.

Below is example of a hierarchy of a given cost element ( 50030000 ).

EMPSTOTAL <---Top level

ESSPENDING

ES5003

ES5003P

50030000 <---Cost Element

Now, since the selection of data is from the cost element up to to the top level group.

The internal table would look like this:

Cost Element Group 1 Group 2 Group 3 Group 4 Group 5 Group 6 .......

50030000 ES5003P ES5003 ESSPENDING EMPSTOTAL (blank) (blank)......

But this output is wrong, what I really want is like this:

Cost Element Group 1 Group 2 Group 3 Group 4 Group 5 Group 6 .......

50030000 EMPSTOTAL ESSPENDING ES5003 ES5003P (blank) (blank)......

As you can see, what is placed next to the cost element is the Top level Group and the last is the group directly linked to the cost element.

Can you please teach me on how to do just that?

Thank you so much for your help.

Regards,

Onyx