Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

.PRN File format

Former Member
0 Likes
1,517

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,149

Hi,

Have you checked this

6 REPLIES 6
Read only

Former Member
0 Likes
1,150

Hi,

Have you checked this

Read only

Former Member
0 Likes
1,149

Hi,

Thanks for your response.

Yes i have checked that.But there is no solution provided.

Regards,

Kiran

Read only

Former Member
0 Likes
1,149

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

Read only

Former Member
0 Likes
1,149

Hi,

Thanks for your inputs.

I tried the above solution but its not working.

Regards,

Kiran

Read only

0 Likes
1,149

Any other inputs please.

Regards,

Kiran

Read only

0 Likes
1,149

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