Skip to Content

Print any type of file in abap on single click on print button

Mar 03 at 11:02 PM


avatar image

Hi Friends,

My requirement is that need to print any kind of file without having saving option dialog using abap program.

I am using a class CL_GUI_FRONTEND_SERVICES=>EXECUTE’ where all file type getting convert into PDF format only when give the print command then firstly it is asking about to store the file as PDF format only but I want same file when I give the print .

Do you have any idea how to print any file format without error .

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Sandra Rossi Mar 04 at 11:17 AM

A few hints:

- ABAP-based systems are only able to convert ABAP List and OTF (Sapscript forms, Smart Forms), and Adobe forms are converted to PDL (printer description language) by Adobe Document Services.

- There are softwares by third-party companies, to convert files into other formats, probably in PDF (for instance, search SAP certified solutions based on BC XDC interface)

- SAPPDFPRINT is a software, that you may download/install on a Windows print server, to print Adobe interactive forms (i.e. transaction SFP; it does not work for PDF files which are not based on interactive forms) on any kind of printer.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thanks for your rply but I think u did not get my point.

Actually I am featching a file from application server and based on selection of files it is being printed Files can be any type Excel ,txt ,doc, jpg etc...but any file getting convert PDF and asking about saving then it goes to print. Event if text file then also it is converted into PDF.

Is it possible that can be restrict saving dialog option .I am using execute method. Is there any other way to get the solution.




You're right. And I still don't understand. Is Excel, .doc, etc., add something important to your question? Or your question is related to PDF only? What is this save dialog coming from? Do you mean the "save" button in the HTML Viewer, or what? PS: adding a screenshot may be very helpful.

Łukasz Pęgiel Mar 05 at 06:52 PM

Create a form, Adobe or Smartform with page size and space for content on whole page and fill it with text file or check if you can print TXT files when you setup printer to receive raw content. With PDFs it works.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Actually Files are uploaded via standard tcode in sap .All uploaded files we want to print so for that I am using fm so_document_read_api1 to read the content in form of binary data , it's working for all type of file except txt file .

Unable to read content of txt file by using this FM.

Is there any FM to read txt file into binary data based on given file I'd.

Plz help



Suraj Singh Mar 05 at 12:13 PM

My requirement is very simple .I want to print txt file without download by using abap .

Cl gui front >execute method working for PDF doc excel file but it's not working for the txt file

Is there any FM or class to get print of txt file.

Please help me for the same.



10 |10000 characters needed characters left characters exceeded