2008 Jun 09 1:32 AM
Hi Everybody,
I am printing Excel Sheet using the code below.
CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
SET PROPERTY OF H_EXCEL 'Visible' = 0.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
TEXT = TEXT-008
EXCEPTIONS
OTHERS = 1.
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
CALL METHOD OF H_MAPL 'OPEN' EXPORTING #1 = PATH.
CALL METHOD OF H_EXCEL 'ActiveSheet' = H_MAP.
CALL METHOD OF H_MAP 'PrintOut' .
FREE OBJECT H_EXCEL.
FREE : H_EXCEL,H_MAPL,H_MAP,H_ACT.
This directly print the excel on the printer.
But my requirement is to send it to the spool and print it form there.
Can someone tell me how to do that?Please help.
Thanks,
Sneha Singh
2008 Jun 09 6:52 AM
Hi,
Instead of using API method for printout use method 'SaveAs' and save the excel document in
local drive path and upload the file and send it spool using function module.
2008 Jun 09 5:49 AM
HI Sneha,
Why not create a smartform or simply use WRITE statement.
1. Smartform should be created & pass PRINT IMMEDIATELY = 'X'
2. Create WRITE Statements inside NEW-PAGE PRINT ON.. & NEW-PAGE PRINT OFF.
Best regards,
Prashant
2008 Jun 09 6:52 AM
Hi,
Instead of using API method for printout use method 'SaveAs' and save the excel document in
local drive path and upload the file and send it spool using function module.
2008 Jun 09 7:28 AM
Suresh,
Can you tell me how to do that?
Please help me.
Thanks,
Sneha Singh.
Edited by: Sneha Singh on Jun 17, 2008 10:33 PM