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: 

Report conversion into PDF

Former Member
0 Kudos

Hi friends,

Can any one provide me a complete document regarding converting a abap report into PDF file and to store the same in the local system.

Regards,

Infant

4 REPLIES 4

Former Member
0 Kudos

Try with standard report RSTXPDF4, convert SPOOL orders to PDF.

also..

Check these links:

http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm

http://www.sapgenie.com/abap/example_code.htm

Regards.

Former Member
0 Kudos

Hi,

Just try the following coding.

data itab type standard table of mara.

data : i_tline TYPE TABLE OF tline WITH HEADER LINE,

i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.

select * from mara into table itab.

i_otf[] = itab[].

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

FORMAT = 'PDF'

  • MAX_LINEWIDTH = 132

  • ARCHIVE_INDEX = ' '

  • IMPORTING

  • BIN_FILESIZE =

TABLES

otf = i_otf

lines = i_tline

  • EXCEPTIONS

  • ERR_MAX_LINEWIDTH = 1

  • ERR_FORMAT = 2

  • ERR_CONV_NOT_POSSIBLE = 3

  • OTHERS = 4

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Regards,

Mukesh Kumar

Former Member
0 Kudos

Hi,

You can use these fm to do that:

- For ABAP LIST: CONVERT_ABAPSPOOLJOB_2_PDF

- For Sapscript and smartforms: CONVERT_OTFSPOOLJOB_2_PDF

See the report RSTXPDFT4, here you can see how to use those fms.

...or see this link: here you can see how to convert a spool to pfd format and send as e-email:

http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm

Sample code available in these links

http://www.sapgenie.com/abap/code/abap51.htm

http://www.sapgenie.com/abap/pdf_creation.htm

Rgds,

Prakash

Former Member