‎2006 Oct 21 5:18 AM
How do you output a report whose size is scalable based on a users inputs. For example, if a user enters period 1 to period 12, the report displays 12 periods. If the user enters period 10 to period 12, the report displays 3 periods. The user can enter the periods cross the fiscal years. For instance: FY2005 period 11 to FY2006 period 3.
Vendors Company codes FY/per1 FY/per2 FY/per3 Total
‎2006 Oct 21 10:09 AM
Hi Syed,
There are many possibilities.
Are you using ALV ouput or just a standard ABAP list with WRITE statements.
For ALV output, you may create a table dynamically and popuplate the field catalog accordingly.
For the WRITE statements, you might use a mere DO... ENDDO statement for such a requirement.
<b>Could you be a bit more specific so that we can tune the solution a little bit more?</b>
Best regards,
Guillaume
‎2006 Oct 21 10:09 AM
Hi Syed,
There are many possibilities.
Are you using ALV ouput or just a standard ABAP list with WRITE statements.
For ALV output, you may create a table dynamically and popuplate the field catalog accordingly.
For the WRITE statements, you might use a mere DO... ENDDO statement for such a requirement.
<b>Could you be a bit more specific so that we can tune the solution a little bit more?</b>
Best regards,
Guillaume
‎2006 Oct 26 9:37 PM
Hi Guillaume,
Sorry for my ignorance but I want to use ALV but dont know how. Secondly if I how do I create a table dynamically?
‎2006 Oct 26 9:54 PM
Hi,
There are 2 flavors for ALV : either using Function Modules or using ABAP OO.
The ABAP OO is maybe the most refined as far as "personalization" is concerned but the first one is a good choice for beginners.
For functions, have a look at sample examples BALVGRID* and BALBLIST*
For creating a table dynamically you have the class CL_ALV_TABLE_CREATE and its method CREATE_DYNAMIC_TABLE
Also have a look at :
/people/ravikumar.allampallam/blog/2005/05/31/expand-the-list-of-columns-in-a-report-dynamically
And last (but not least), have a look at the code provided by Rich in this topic :
and by Jayanthi in this one
Best regards,
Guillaume
<i>PS: If your problem is solved, please close the thread and award points for useful answers.</i>