on 08-17-2009 8:42 PM
How do I retrieve a spool request in ECC 6.0 that is already of type PDF, and display it in a BSP?
I see some similar unanswered questions on the forum, but am hoping someone will know how to do this.
Have you checked this Blog
/people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp
I find this is much helpful
I think this needs to move Business server pagaes forum
a®
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Function FPCOMP_CREATE_PDF_FROM_SPOOL worked as a®s said it would
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Saleem
I apologize. We're in the middle of year-end processing and upgrades right now. I do not have time to research how I found this value. We are using '1' for partnum. I may recall that I thought it should be '0', but it did not work. '1' (one) worked for me. It should relate to table TSP01.
Janice
Janice Ishee wrote :
We recently converted to ECC 6.0. In previous versions of SAP, Tax Reporter created spool files which were not pdf's. By getting the spool id rTSP01-RQIDENT, we could retrieve the spool file and convert to pdf using function CONVERT_OTFSPOOLJOB_2_PDF. Then I would display this pdf in an ITS application.
Now that we're in ECC 6.0, the Tax Reporter spool files are in table TSP01 as type pdf already. I want to re-write my old ITS application as a Business Server Page. When I've displayed a Smartform as a pdf in other Business Server Pages, I used some logic from a Thomas Jung blog or book whereby I would take the internal table job_output_info that comes back from the Smartform, call function CONVERT_OTF to get an XSTRING, and then the following logic:
* Convert the SmartForm into an Acrobat-renderable (PDF) format
* convert otf to pdf
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = l_pdf_len
bin_file = l_pdf_xstring
TABLES
otf = all_job_output_info
lines = lt_lines
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc EQ 0.
CREATE OBJECT cached_response
TYPE
cl_http_response
EXPORTING
add_c_msg = 1.
l_pdf_len = XSTRLEN( l_pdf_xstring ).
cached_response->set_data( data = l_pdf_xstring
length = l_pdf_len ).
cached_response->set_header_field(
name = if_http_header_fields=>content_type
value = 'application/pdf' ).
cached_response->set_status( code = 200 reason = 'OK' ).
cached_response->server_cache_expire_rel( expires_rel = 180 ).
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_32 = guid.
CONCATENATE runtime->application_url '/' guid '.pdf'
INTO me->query->display_url.
cl_http_server=>server_cache_upload(
url = me->query->display_url
scope = ihttp_inv_global
response = cached_response ).
ENDIF.
me->call_view( view ).
So my question is, how do I now get the pdf-type spool file and display it in a BSP?
Edited by: Julius Bussche on Aug 17, 2009 10:31 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.