‎2009 Jul 21 9:34 AM
Dear All,
I would like to know whether its possible to provide data in .PRN format from SAP. If the answer is yes, then kindly provide the related function modules / demo programs which will be of great help to me.
Thanks & Regards,
Kiran
Edited by: Kiran NN on Jul 21, 2009 10:36 AM
‎2009 Jul 21 9:46 AM
‎2009 Jul 21 9:46 AM
‎2009 Jul 21 9:48 AM
Hi,
Thanks for your response.
Yes i have checked that.But there is no solution provided.
Regards,
Kiran
‎2009 Jul 21 10:04 AM
HI,
Try as shown below:
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME = 'c:\XYZ.prn'
FILETYPE = 'ASC'
TABLES
DATA_TAB = DISP_TAB3.
after executing your program you can check your file in DOS.
GOTO START--> RUN --> Type CMD
cd\
type XYZ.PRN
I think it will work.
Regds,
Anil
‎2009 Jul 21 11:28 AM
Hi,
Thanks for your inputs.
I tried the above solution but its not working.
Regards,
Kiran
‎2009 Jul 22 10:35 AM
‎2009 Jul 22 1:38 PM
So far i am not able to find any solution for directly downloading internal table contents to .PRN file. I think this can be done using 'OLE', reason being in excel application, we can print the worksheet to file, which results in creation of .PRN file. Can some one please provide me the relevant OLE code for printing an excel file. The only code which i can think as of now is
CALL METHOD OF e_activesheet 'PrintOut'
EXPORTING
#1 = 1
#2 = 'True'
#3 = 'True'.
which i tried applying from the following Macro recording (created while issuing a 'Print to file' operation)
ActiveWindow.SelectedSheets.PrintOut Copies:=1, PrintToFile:=True, Collate _
:=True
But this doesn't seem to be working eventhough the sy-subrc value is 0.
Regards,
Kiran