‎2006 Nov 23 9:45 PM
Hi together,
perhaps anybody have an idea: I need to print out pdf documents within SAP. The PDF files are attached to the order document and are stored in the archive.
I know that it give professional solutions to print different document formats. But I think it must give a function module (or different function modules) which can read the PDF from SAP archive and print it on a PostScript Printer.
Any idea? Thank for your help.
Regards Thomas
‎2006 Nov 23 11:14 PM
Hi Thomas,
Are you mentioning about archived documents for process order (Transaction COEBR)?
Thanks
Ramakrishna
‎2006 Nov 24 8:45 AM
Hi Ramakrishna,
I'm not in process orders - I'm working with sales orders. Have you any idea how to print out the attached PDF-Files?
Thanks and regards
Thomas
‎2006 Nov 24 8:58 AM
Hi
Try to see <a href="http://help.sap.com/saphelp_nw04/helpdata/en/25/6fa8fd27837846990a7a6813b06f80/content.htm">here</a>, perhaps it can be helpful.
Max
‎2006 Nov 24 8:59 AM
Hi Thomas,
i make an download as PDF and start Acrobat wit /P /H.
Here a code example:
Download the file as C:\TEST.PDF.
DATA: PROGRAM(128) TYPE C.
Path of PDF
CALL FUNCTION 'SO_PROGNAME_GET_WITH_PATH'
EXPORTING
DOCTYPE = 'PDF'
IMPORTING
PATHNAME = PROGRAM
EXCEPTIONS
PATH_NOT_FOUND = 1
PROGRAM_NOT_FOUND = 2
NO_BATCH = 3
X_ERROR = 4
OTHERS = 5.
*
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
<b> COMMANDLINE = '/p /h C:\TEST.PDF'</b> PROGRAM = PROGRAM
EXCEPTIONS
FRONTEND_ERROR = 1
NO_BATCH = 2
PROG_NOT_FOUND = 3
ILLEGAL_OPTION = 4
GUI_REFUSE_EXECUTE = 5
OTHERS = 6.
Hope it helps.
Regards, Dieter
‎2006 Nov 27 10:32 AM
@max: this doesn't work for us because we are not on WAS 6.40
@dieter: we just try it. I think the problem will that it works in background-process (print output with output control). Does it work in background in your application?
Regards Thomas
‎2006 Nov 27 12:00 PM
Hi Thomas,
yes, we use it in background for purchase Order,
but not in an background-Job because
the workstations must be ON.
regards, Dieter
‎2007 Jan 26 10:01 AM
Hi together,
I solved the problem by myself. After searching on different places I have to recognize that SAP isn't able to print a PDF-File which is attached i.e. on a purchase order.
So we convert the PDF-File with ghostscript to PS (PostScript) and than import it to SAP and create a DIS. All this happen in background - the user have nothing to do.
With the function modules RZL_READ_FILE and RSPO_OUTPUT_POSTSCRIPT we send the stream to the postscript printer. Only one small modification in the function module RSPO_OUTPUT_POSTSCRIPT was necessary to print the job in the background.
Regards Thomas
‎2007 Nov 13 2:59 PM
Hi Thomas,
can you give me a clue for printing the pdf document with the function modules RZL_READ_FILE and RSPO_OUTPUT_POSTSCRIPT
Thanks
Axel