09-18-2007 10:45 AM
Hi,
I have to work on this scenario which involves a selection screen where user can enter multiple values for a department. For each department I have to display the different set of data based on the business logic. The same data also needs to be downloaded in different sheets of the same Excel file meaning different tab for each department.
The number of departments will be determined at the run time, therefore the tabs will also be determined during run time.
I think we need to create different internal tables dynamically.
Can anyone Please help me on this?
Best regards,
Amit
09-18-2007 10:49 AM
09-18-2007 10:55 AM
Hi Amit,
What you'll have to do is to loop at the select-option and for each entry dynamically create an internal table.
For creation of a dynamic internal table, try this.
There is a class called cl_alv_table_create.
This has a static method called create_dynamic_table.
This method requires a field catalog as an input and based on this it will return an internal table.
However, you have to use fields symbols in this.
Reward points if helpful
Regards,
Ravi
09-18-2007 11:15 AM
hi,
link :
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/dynamic%2binternal%2btable
check out this blog :
/people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap
thanks
jaideep