on 03-26-2008 4:50 PM
Hi all,
my customer receives a PDF document and save this document in the SAP system.
Now tehy want to print this document with a batch job without opening the file on a workstation or convert this file internal into PCL, PS or another format.
How can I print a PDF in SAP doc without opening the file?
Thx 4 help!
Regards
Michael
Hi Michael,
I think, it´s very difficult, to print a PDF in SAP directly ( via spool ).
You could use another solution: A command line Tool, which prints a PDF file to a printer.
Prerequisite: You have to install any printer on this server and you need a little workaround!
You have to figure out a complete solution. Here a following a few snippets!
For example take jPDFPrintCLI ( http://www.qoppa.com/pdfprintcli/index.html ).
Install the tool on the SAP-server or another server the SAP-server can reach over the network.
Build a batch-file ( "printpdf.bat" ) with 1 row:
"c:programmejPDFPrintCLIjPDFPrintCLI.exe" -printer "
sf_service1CPA_SF_P4" "C: empPDF druckensap-pdf.pdf"
Create ABAP code, which saves the PDF file as "C: empPDF druckensap-pdf.pdf", executes the batch file and after this delete the PDF file or do not ( you can overwrite it next time ).
Starting an external command ( the batch file 😞
======================================
Define the command via transaction SM69 ( testing with SM49 )
Execution in ABAP:
data: extcmd like sxpgcolist-name value 'ZTP',
command like sxpgcolist-parameters,
status like btcxp3-exitstat,
protocol like btcxpm occurs 0 with header line.
call function 'SXPG_COMMAND_EXECUTE'
exporting
commandname = extcmd
additional_parameters = command
importing
status = status
tables
exec_protocol = protocol.
loop at protocol.
write: / protocol-message.
endloop.
Best regards and success!
Thomas Scheuermann
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have also a similar scenario.
An external system (outside SAP) is producing PDF documents which are loaded into Opentext Archive. From the archive I can fetch the PDF document into the SAP system with simple ABAP program, but how can I print from SAP?
Could we somehow use the ADS service for also printing externally-generated PDF documents from SAP?
Hi Suresh,
There is not FM "Job_read" can you please update how we can print for SAP server to printer direct.
Or is possible to print background from local pc drive.
Thanks,
hari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
Please update me how to print PDF if it is in local drive, i bring the file from local drive but how to print, when i bring only way to convert to binary file. from binary how to print pdf.
Thanks,
Hari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
did you manage to solve this problem? How did you do it?
Regards,
Robert.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michale
Nice Requirement . You can do one program relating print job scheduling . when ever user add a doc in local drive . pick that file and specify print parameters in " batch job scheduling where u want print" use function modules "Job_open " Job_read"... if u run this program it will check ur given time lapsing and if new comes it will print automaticall.
if u have doubtsreply me . if its ueful reward me .
Thanks
suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Create a report to fetch document and scheduling printing . its possible.
utilize function modules to fetch and schedule printing . it will checks time magnitude and if any new document in pool it will print .
just like adobe forms ...............
think and doit .
if u have doubts reply me .
thanks
Suresh
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.