2008 Apr 30 1:42 PM
I know how to export a single table directly to an excel file. What I need to know is how I can include three, unrelated, tables in the same excel file? I want to create this excel file directly, not use an ALV first.
Regards,
Aaron
2008 Apr 30 8:41 PM
Hi,
Use GUI_DOWNLOAD.
1) While downloading the tables, maintain same filename.
2) From the second GUI_DOWNLOAD function call use the "APPEND" option.
append = 'X'
Hope this solves your problem.
Regards,
Raj
Hi Aaron Shover,
You can fill one internal table with all three or four tables data in one internal table...
and pass this internal table in FMs
like
GUI_DOWNLOAD
SAP_CONVERT_TO_XLS_FORMAT
etc...
Hope it will solve your problem
<REMOVED BY MODERATOR>
Thanks & Regards
ilesh 24x7
Edited by: Alvaro Tejada Galindo on Apr 30, 2008 1:14 PM
2008 Apr 30 1:53 PM
Hi Aaron Shover,
You can fill one internal table with all three or four tables data in one internal table...
and pass this internal table in FMs
like
GUI_DOWNLOAD
SAP_CONVERT_TO_XLS_FORMAT
etc...
Hope it will solve your problem
<REMOVED BY MODERATOR>
Thanks & Regards
ilesh 24x7
Edited by: Alvaro Tejada Galindo on Apr 30, 2008 1:14 PM
2008 Apr 30 1:56 PM
How can I fill one table with all three if they all have different fields?
What I am envisioning is one table followed by several blank rows then another, etc...
Regards,
Aaron
2008 Apr 30 2:33 PM
Hi Aaron Shover,
You can not do like that...
As it will not gonna give u correct result...
u will hv to create separate columns for each table fileds...
u can not append the one table data and then another table data in the same internaltable... where itab1 and itab2 are having different structures...
if u do so then also the data may not be correct in final internal table and also in excel file in which u will download it....
better create one Z Structure in DDIC which contains all fields u required in final table..
Create internal table of that structure...
runtime populate the data in the internal tables as per the conditions u wanna insert it...
The fields which r blank ... keep it blank...
Concentrate on what fields u require...
It seems strange requirement as u want multiple table data in one excel file which r not linked (related) by any keys or any fields...
or else u can call the GUI_DOWNLOAD 4 times for each table and then u can manually copy one excel file data to another...
But i think there should be some relation between these fields...
eg table_1
mat_no prise
mat1 345
mat2 465
table_2
pernr salary
204 20000
345 46588
Now how u can have this data in one excel file... and wht will be the purpose of it.. as its nowhere related to each other
mat_no prise pernr salary
mat1 345 204 20000
mat2 465 345 46588
Hope it will solve ur prob....
<REMOVED BY MODERATOR>
Thanks & Regards
ilesh 24x7
Edited by: Alvaro Tejada Galindo on Apr 30, 2008 1:16 PM
2008 Apr 30 3:42 PM
I need to do this because I have created one report that does three seperate queries, based off one key. I want to export these three tables to an excel file but I don't want the user to have to use three files because they will end up storing them in the same file anyway (via copy and paste).
Regards,
Aaron
2008 Apr 30 8:41 PM
Hi,
Use GUI_DOWNLOAD.
1) While downloading the tables, maintain same filename.
2) From the second GUI_DOWNLOAD function call use the "APPEND" option.
append = 'X'
Hope this solves your problem.
Regards,
Raj
2008 Apr 30 8:43 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |