09-05-2007 7:38 PM
hello experts,
is it possible to download the data onto application server in .xls format..
if so... can anyone guide me how to do it plzzz, any sample code would be really appreciated.
its bit urgent
Thanks a lot for your anticipation
Nitesha
09-05-2007 8:04 PM
09-05-2007 8:10 PM
Try this code
data: itab type string_table,
WA TYPE STRING.
PARAMETERS: p_output(256) TYPE c DEFAULT '\applserverFINfin_ee.xls',
* POPULATE YOUR INTERNAL TABLE HERE
OPEN DATASET p_output FOR OUTPUT IN LEGACY TEXT MODE.
IF sy-subrc EQ 0.
loop at itab into wa.
TRANSFER wa TO p_output.
endloop.
endif.
09-06-2007 4:18 AM
Hello Nitesha,
Well, you can always write a text file onto the application server and rename it as a .xls file
But, it will not be excel formatted
If you want to get columns and rows in the file, then you can make a csv file which can be written to the application server with the 'open dataset' concept
the csv formatting has to be done manually
ie: insert commas between each value
You cannot write an excel file to the application server directly
One other workaround is to write the file to the presentation server as an excel file and then move it to the application server via the transaction CG3Z or the function 'C13Z_FRONT_END_TO_APPL'.