Skip to Content
0
Former Member
May 14, 2007 at 02:24 AM

dynamic columns

40 Views

Hi SDN's

I have a internal table with the following fields

-


BUKRS |ZUONR |WRBTR |SGTXT

-


1 -|A1190 -|100 -|310 static

1 -|A1190 -|200 -|310 static

1 -|A1192 -|150 -|311 static

1 -|A2330 -|100 -|310 static

1 -|A2330 -|150 -|310 static

1 -|A2330 -|500 -|321 static

1 -|A3450 -|100 -|310 static

1 -|A3450 -|200 -|311 static

1 -|A3450 -|300 -|321 static

-


I need an output like this... considering the first 3 characters of SGTXT i need dynamic columns for each unique SGTXT and sum up all the amounts related to the ZUONR

-


BUKRS |ZUONR |310 WRBTR |311 WRBTR |321 WRBTR |so on......

-


1 -| A1190 -|300 -|150 -|----


-|so on .....

1 -| A2330 -|250 -|----


-|500 -|so on .....

1 -| A3450 -|100 -|200 -|300 -|so on .....

-


I am not sure of the number of SGTXT's.. so i need them dynamical columns based on the number SGTXT's in the internal table

Regards

Pratyusha