cancel
Showing results for 
Search instead for 
Did you mean: 

Generating PDF for Any document No in SAP

Former Member
0 Kudos

Hi All,

My requirement is to create a general Zprogram, which requires to pass "DOCUMENT No , Company Code, Fiscal Year"

and generates PDF file corresponding to that document inn SAP.

Though their is an standard program which requires to pass "SPOOL No" and generates the PDF. But How to link Doucment no with the spool, I amnot bale to figure out.SO please do the Suggest.

Thanks in Advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I'm not completely sure what you mean - can you ask your question in a different way?

If you're trying to generate a pdf, you could try to find a [pdf api|http://docraptor.com] like the one I linked to.

Former Member
0 Kudos

Dear Mike,

Thanks for reply, But my query is like that i have to write a z program in which if user enter any 'FI document no' along with 'fiscal year' it will generate the PDf of that documnet and get it download to PC.

Though their as a standard program RSTXPDFT4 which requires spool no to generate the PDF and get it download, but i want to link document rather then the sppol no as sppol once cannot remember.

So please suggest.

Best Regards

Pankaj

edgar_almonte
Participant
0 Kudos

Not sure what exactly you want because you say you want a pdf print of the data of any FI document number , but for that you need know what data you want in that pdf or if you really want is a pdf version of already existing report ?

Edited by: Edgar Almonte on Apr 25, 2011 6:25 PM

Answers (4)

Answers (4)

edgar_almonte
Participant
0 Kudos

i think you need tell us what tcode are generating that spool you want print in pdf.

Former Member
0 Kudos

Hi All,

Thanks for your concerns,

I want to print the spool of payment advice and check.(T -Code is FBZ5).

Regards

Former Member
0 Kudos

Thanks All,

But My query is notyet solved.

May be as suggested their is no way to link spool with document no.

is it possibel to store any spool along with doc no as tag in a ztable . and then finally as and when required refrence that ztable find the spool and pass to standard program RSTXPDFt4.

But am not sure about the that spool are temporary or permanenetly exist in the system..

Any suggestion, highly appreciated.

Best Regards,

Former Member
0 Kudos

Hi Pankraj,

Please refer the link Below.

It has the steps how to get the spool number and the table name that storing the Spool number

http://wiki.sdn.sap.com/wiki/display/ABAP/PDFDownlaodByCreatingSpool+Request

It may help you.

Thanks and regards,

Prakash K

brad_bohn
Active Contributor
0 Kudos

Don't use a Z-table. Spools are temporary and the numbers are re-used. Although you can set spools for permanent retention, doing so will only cause you storage issues and/or to run out of spool numbers (in earlier versions).

You still haven't explained exactly what you're doing or why you can't use a direct approach with FI Correspondence though.

Former Member
0 Kudos

Basically in FI , spool is generated for payment advice and check.

Now generally the payment advice is printed and sign off and then given to vendors.

But sometime it also requires to send payment adive by mail because of miss place of advice from vendor end.

Now user can eaily search out the payment documnet no corresponding to that paymnet.

Now gain they need to generate a new spool, print it out ans scan and finally send it via mail.

So the requiremnt is to generate a z program in which if a uaser passes a Document No, Fiscal Yera and company code. and the required PDF got generated.

Hope now exactly got my requiments.

Regards

Former Member
0 Kudos

Hi Pankaj,

If you want to generate a PDF document means designed the layout in smart form.

Use that function module in your Driver Program.

To convert that that Smartform OTF file use Function Module 'CONVERT_OTF'.

Thanks & Regards,

Prakash K

brad_bohn
Active Contributor
0 Kudos

How to link Doucment no with the spool

There is no standard link. If you need to generate a PDF for a document, then you need to follow the FI Correspondence config procedure for the types that are document specific. If you don't intend to generate the PDF at the time of printing for some reason, i.e., you're not following a typical correspondence scenario, then you'll need to tag the spool with the document number at the time the OTF is generated, maybe in the Suffix2 field. I don't see that as being a very good solution though...