Skip to Content
avatar image
Former Member

Printing external PDF document

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Mar 26, 2008 at 07:18 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    Aug 19, 2008 at 09:41 AM

    Hi Michael,

    did you manage to solve this problem? How did you do it?

    Regards,

    Robert.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 13, 2009 at 06:33 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 04, 2009 at 06:45 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 29, 2009 at 11:25 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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?