Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

scalable report

Former Member
0 Likes
387

How do you output a report whose size is scalable based on a user’s 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

1 ACCEPTED SOLUTION
Read only

guillaume-hrc
Active Contributor
0 Likes
364

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

3 REPLIES 3
Read only

guillaume-hrc
Active Contributor
0 Likes
365

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

Read only

0 Likes
364

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?

Read only

0 Likes
364

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>