Application Development and Automation 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: 
Read only

pdf document

Former Member
0 Likes
949

Dear Community,

there is there is an internal table whose content I would like to show in browser.

It is acutally a pdf document?

Can anybody suggest me.

Thanks in advance

erdem sas

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
906

Hi,

Refer to this link..

[CL_GUI_PDFVIEWER |]

Edited by: Avinash Kodarapu on Mar 4, 2009 3:02 PM

7 REPLIES 7
Read only

Former Member
0 Likes
907

Hi,

Refer to this link..

[CL_GUI_PDFVIEWER |]

Edited by: Avinash Kodarapu on Mar 4, 2009 3:02 PM

Read only

Former Member
0 Likes
906

Hi,

can you please clearly on your question,

u want to display report in pdf formate?

or

can you give a question more clearly?

Thanks and regards

Durga.K

Read only

Former Member
0 Likes
906

hi,

can please check this code

DATA: BEGIN OF i_mara OCCURS 0,
matnr LIKE mara-matnr.
DATA: END OF i_mara.


DATA: v_dest LIKE tsp01-rqdest,
v_handle LIKE sy-tabix,
v_spool_id LIKE tsp01-rqident,
v_rc TYPE c,
v_errmessage(100) TYPE c,
v_text(70) TYPE c.


START-OF-SELECTION.


SELECT matnr FROM mara INTO TABLE i_mara.


CALL FUNCTION 'RSPO_OPEN_SPOOLREQUEST'
EXPORTING
dest = 'LOCL'


LAYOUT = 
NAME = 
SUFFIX1 = 
SUFFIX2 = 
COPIES = 
PRIO = 
IMMEDIATE_PRINT = 
AUTO_DELETE = 
TITLELINE = 
RECEIVER = 
DIVISION = 
AUTHORITY = 
POSNAME = 
ACTTIME = 
LIFETIME = '8' 
APPEND = 
COVERPAGE = 
CODEPAGE = 
DOCTYPE = 
IMPORTING
handle = v_handle
spoolid = gd_spool_nr
rc = v_rc
errmessage = v_errmessage.

LOOP AT i_mara.
v_text = i_mara-matnr.
CALL FUNCTION 'RSPO_WRITE_SPOOLREQUEST'
EXPORTING
handle = v_handle
text = v_text


LENGTH = 
CODEPAGE = 
TRUNCATE = 
IMPORTING
rc = v_rc
errmessage = v_errmessage
EXCEPTIONS
handle_not_valid = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

ENDLOOP.


CALL FUNCTION 'RSPO_CLOSE_SPOOLREQUEST'
EXPORTING
handle = v_handle
IMPORTING
rc = v_rc
errmessage = v_errmessage
EXCEPTIONS
handle_not_valid = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.


CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
CHECK sy-subrc = 0.

Thanks and regrds

Durga.K

Read only

Former Member
0 Likes
906

Hi,

Are you asking any qusion or Information.

Kindly give a question more clearly.

Regards

Md.MahaboobKhan

Read only

Former Member
0 Likes
906

Hi,

Try the following FM:

CONVERT_ABAPSPOOLJOB_2_PDF - Converts ABAP spool output to PDF

Do search on it for full details.

Cheers.

Read only

Former Member
0 Likes
906

Hi:

Probably you want to connvert Internal table or Spool into PDF

From SPool to PDF : RSTXPDF4 is the report available.

From Internal table to PDF : there is function module.

Hopefully it would help u.

Regards

Shashi

Read only

Former Member
0 Likes
906

Hi:

Probably you want to connvert Internal table or Spool into PDF

From SPool to PDF : RSTXPDF4 is the report available.

From Internal table to PDF : there is function module.

Hopefully it would help u.

Regards

Shashi