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: 

Invoice printing in PDF

Former Member
0 Kudos

Hi All,

I want to print the Invoice in PDF, when i am saving the invoice. I have configured PDFdevice type in the spad for output device. Pls let me know what all settings and code changes i have to do for this.

Thanks,

Raju

9 REPLIES 9

Former Member
0 Kudos

Hi

Do u wnato to print or to create a pdf file?

The PDF printer'll create a pdf file of your print, so u need to define a "printer on file" in your pc

Max

0 Kudos

Hi Max,

I want to print the invoice in PDF and then create a file. Pls let me know how to do this.

Thanks,

Raju

0 Kudos

Hi

So u can create a pdf file and then print it: u should considere u need to create it before printing it.

If you have create a pdf print in SPAD, u should set it as printer of frontend, the u need to define a print on file on your pc, and then choose PDF printer as device ouput and assign the printer on file as printer.

After dowloading u should call a fm to execute windows program (in this case PRINT) in order to print it

Max

0 Kudos

Thanks Max for the quick response.

I have configured PDF1 device type for output type zabc in spad, and when setting the output for the billing document i am giving zabc as the logical destination in the communication method. Then i am getting the error 'lpr: error - unable to print file: client-error-not-found'. Pls let me know how to remove the error and print in PDF.

Thanks,

Raju

0 Kudos

hi,

On succeeding forms, do not get print settings from user profile because this will override the specified settings from the print dialog box.

Set settings to spool form contents as OTF and Get OTF data. Now Convert OTF to PDF using FM 'CONVERT_OTF'.

NAeda
Contributor
0 Kudos

hi raj,

Are your getting the output through output message or Custom program(Y or Z).?

two ways you can do this.

1) by creating the PDF printer, assign it in Message type.

Ask your basis consultant to create PDF device type and define one pdf printer.

2) by writing the code in Driver program.

Use function module CONVERT_OTF to convert OTF to PDF (set import parameter FORMAT to'PDF').

Regards

Aeda

NAeda
Contributor
0 Kudos

hi raj,

Are your getting the output through output message or Custom program(Y or Z).?

two ways you can do this.

1) by creating the PDF printer, assign it in Message type.

Ask your basis consultant to create PDF device type and define one pdf printer.

2) by writing the code in Driver program.

Use function module CONVERT_OTF to convert OTF to PDF (set import parameter FORMAT to'PDF').

Regards

Aeda

Former Member
0 Kudos

Hi,

I have copied the standard program RLB_INVOICE to Zprogram and when i am going for print, then i am getting the error 'Update is terminated' and a mail is sent to my inbox. If i remove the changes then it will print. If i go to ST22 to see the error it says ' Exception condition "CNTL_ERROR" raised'. Pls let me know how to remove the error.

I am converting spool to PDF file here.

Thanks,

Raju

Former Member
0 Kudos

Problem solved