cancel
Showing results for 
Search instead for 
Did you mean: 

How to display Adobe form build in SFP in BSP?

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi, Nitesh,

could you pls give me some sample code for that?

thanks

jun

Former Member
0 Kudos

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( ).

Answers (0)