02-14-2009 10:19 AM
Hi every body,
I have a report, i want to open the report in PDF file inside the R3,
I know how to download to my PC, but i need to open it automatically by PDF.
BR,
Ali
02-15-2009 5:26 AM
02-14-2009 10:22 AM
Hi
you can use this FM to read PDF
POC_PDF_FORM_READ
FOPC_REPORT_SHOW_PDF
SSFCOMP_PDF_PREVIEW
go to se37 -> Just type pdf and hit F4 and you would find many FM regarding PDF
02-14-2009 11:16 AM
Hi,
Use this FM..Hope it helps.
CONVERT_ABAPSPOOLJOB_2_PDF
Regards
Kiran
02-14-2009 11:25 AM
I alrady use the FM
CONVERT_ABAPSPOOLJOB_2_PDF
but i need to open the pdf after converting ,
Any help
02-14-2009 1:15 PM
Use the fm above to write the file to the file system on the server or locally. Create a dialog page with an html viewer. Pass the path to the html viewer and open the page with the default browser.
Your browser can handle pdf files so no problem.
You could also look at a direct call to the browser passing in the path.
Enjoy :>)
02-14-2009 1:33 PM
Hi,
check this WIki
[Redierct SapScript output to PDF|https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/redierct+SapScriptoutputtoPDF]
Thanks
Raj
02-15-2009 5:24 AM
hi tooCann,
Can you explain more about your answer or give an example to get more idea.
BR,
Ali
02-16-2009 2:13 PM
Ali:
This one really got me going after looking at Rich's Hielman's post. Unfortunately, I am not on a 7.00 unicode system, rather 4.6C.
I started looking at this from the perspective of a smartform. My original idea was to generate the pdf file write it to the file system and then call it using an html viewer in a dialog page.
I subsequently found a better approach, at least for smartforms and sapcript using the fm 'HR_IT_DISPLAY_WITH_PDF'.
This fm takes an otf table from the smartform and does all the work for you. Enjoy
REPORT z_render_spool_as_pdf .
DATA: ls_control_param TYPE ssfctrlop.
DATA: ls_composer_param TYPE ssfcompop.
ls_control_param-device = space.
ls_control_param-getotf = 'X'.
ls_control_param-getotf = 'X'.
ls_control_param-no_dialog = 'X'.
DATA: l_document_output_info TYPE ssfcrespd,
l_job_output_info TYPE ssfcrescl,
l_job_output_options TYPE ssfcresop.
* Subsitute your smartform name below:
CALL FUNCTION '/1BCDWB/SF00000034'
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
control_parameters = ls_control_param
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
IMPORTING
document_output_info = l_document_output_info
job_output_info = l_job_output_info
job_output_options = l_job_output_options
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
.
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 'HR_IT_DISPLAY_WITH_PDF'
TABLES
otf_table = l_job_output_info-otfdata.
.
02-15-2009 5:26 AM