09-29-2007 12:03 AM
HI Guys,
In my logic i have to create new columns depending on the logic which i am executing.
My requirement is .I have to display o/p like this
Material || Year || Period || Mix ratio || Vendor ||Mix Ratio || Vendor || Mix Ratio Vendor || Mix ratio || Vendor || Mix ratio.............................from table's CKMLMV003 and CKMLMV001.Her i have to display the o/p in the above format and i have to display Vendor and Mix Ratio for 5 columns irrespective of data .If i have more than 5 columns for any record then i have to create a New columns dynamically for Vendor and Mix ratio.If anybody want my code i can Submit But plz tell with example how to do?
<b>The O/P must be finally shown in ALV Grid</b>
Thanks,
Gopi
09-29-2007 1:41 AM
10-01-2007 8:31 PM
Hi Rich,
I was not able to undertsand that one clearly.Can u explain by giving an example or shall i send my code to u.My req is i have to create the Columns Dynamically . My problem is i don't know how to use Dynamic Internal Table in my logic.
Can u please show mer with example having some logic and finally i have tio display in the grid.
Thanks,
Gopi.
09-29-2007 1:54 AM
Is there an upper limit to the number of such columns?
Easiest way is to define table with (say) 10 sets to start with and just hide / remove unused oned from the ALV field catalog so that they dont show.
Costs a bit in memory usage perhaps, but should not be an issue unless you report is an unusable size.
Andrew
10-01-2007 9:25 PM
10-02-2007 1:27 AM
I think Andrew has the simple answer to your problem i.e. just define an internal with as many columns as you could possibly need, and then hide any in the ALV report which ended up with no data i.e. just set the "fieldcat-no_out" flag to "X" to suppress them from the initial ALV output.
Jonathan