on 01-15-2007 2:02 PM
Hi ,
i have built an adobe form (not interactive one) using sfp, and it works fine in SAP GUI, by calling the FM behind.
now i want to display it on our sap portal, could you please tell me what's the easiest way to do that? how about in BSP?
Thanks and best regards.
Jun
Hi,
You can get PDF document in binary format using those form function module. Convert this binary data to xstring and upload it to server side cache and get temporary Url. Now this url you can use in Iframes in BSP. It will download that document and will display in Iframe boundary.
with Regards,
Nitesh Shelar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nitesh,
Do you have some sample code for this?
I assume you need to do some conversion on the binary that is returned from the function or at least be able to determine the size of the binary. I have been able to do neither, because it returns the binary data in a text structure, and STRLEN is ineffective on this data.
Thanks,
Martin
Hi
I hope you ppl are able convert the pdf document into xstring. This sample code here will help you tranfer any pdf document, and will display in web browser.
Sample from BSP application sf_webform_04
which display smartfrom into pdf format
*----
Fill HTTP request
*----
response->set_header_field( name = 'content-type'
value = 'application/pdf' ).
response->delete_header_field( name = 'pragma' ).
response->delete_header_field( name = 'expires' ).
response->delete_header_field( name = 'cache-control' ).
some Browsers have caching problems when loading PDF format
response->set_header_field(
name = 'cache-control'
value = 'max-age=0' ).
start PDF viewer either in the Browser or as a separate window
if pdf_in_browser is initial.
response->set_header_field(
name = 'content-disposition'
value = 'attachment; filename=webforms.pdf' ).
endif.
finally display PDF format in Browser
l_pdf_len = xstrlen( l_pdf_xstring ). <= pass ur binary data here
response->set_data( data = l_pdf_xstring
length = l_pdf_len ).
navigation->response_complete( ).
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.