2009 Dec 03 6:00 PM
Hi,
I am currently in the process of building a costing report for a number of materials.
For the output, the columns will be the months, while the rows will pertain to the specific materials (1 or 2 columns for the material text and info).
For example, the columns of the report will look something like:
Material January February March u2026.. December
In the selection-screen, I will have input fields, including posting period range (month) and fiscal year single value.
If the user enters year 2008 and period 10, I only want 1 column for October, with the other columns not present
If they enter year 2008 and period 10 to 11, then only columns October and November show be displayed.
Is this possible in abap ALV programming? If so, how? Are there FMu2019s and object-oriented routes that I can take & if so, what do I do? Please provide code samples if possible.
Please help.
Thanks,
John
Hi,
I am currently in the process of building a costing report for a number of materials.
For the output, the columns will be the months, while the rows will pertain to the specific materials (1 or 2 columns for the material text and info).
For example, the columns of the report will look something like:
Material January February March u2026.. December
In the selection-screen, I will have input fields, including posting period range (month) and fiscal year single value.
If the user enters year 2008 and period 10, I only want 1 column for October, with the other columns not present
If they enter year 2008 and period 10 to 11, then only columns October and November show be displayed.
Is this possible in abap ALV programming? If so, how? Are there FMu2019s and object-oriented routes that I can take & if so, what do I do? Please provide code samples if possible.
Please help.
Thanks,
John
2009 Dec 03 6:33 PM
I think you can accomplish this using dynamic internal tables...
one another alternative is to have rows of months and columns as data... ie
jan data1 data2....
feb
mar
......
2009 Dec 03 6:54 PM
You can achieve it using the dynamic internal table. Check this link which describes similar internal table creation dynamically.
http://help-abap.blogspot.com/2008/09/dynamic-internal-table-creation.html
Regards,
Naimesh Patel
2009 Dec 03 7:36 PM
Thanks - Just what I was looking for.
I was looking a bit into this and found that another option is to hide the fields before output.
I think hiding might work better, since the only columns that I want missing are the ones containing months that the user didn't specify in the selection criteria.
Still, thanks. Very useful to know that this option exists.
2009 Dec 03 11:15 PM
Halo John,
Its very much possible in ALV Grid. It all depends upon the logic you build the field Catalog.
Your Initial field catalog should have 12 fields ( ie 12 month names )
Depending upon the user input , you can put the no_out = abap_true.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |