Application Development 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: 

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

0 Kudos

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 .

6 REPLIES 6

Sandra_Rossi
Active Contributor

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.

0 Kudos

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.

Thanks

Suraj

0 Kudos

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.

0 Kudos

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.

Thanks

Suraj

ŁukaszPęgiel
Contributor

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.

0 Kudos

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

Thanks

Suraj