Quantcast
Channel: SCN : Discussion List - Business Server Pages (BSP)
Viewing all articles
Browse latest Browse all 237

Web dispatcher window.open to PDF issue within BSP page

$
0
0

Hi All,

 

Apologies as not 100% sure if this is the correct location for the post.

 

I'm trying to display a PDF document, generated on the server, and displayed in a new BSP page with a javascript window.open command.

 

To do this i'm using a smartform and converting the output to OTF which returns the xstring of the PDF.

Once successfully created I call cl_http_server=>server_cache_upload to place the PDF object in the servers cache as per below.

 

   concatenate im_runtime->runtime_url '/'

               im_runtime->application_namespace '/'

               im_runtime->application_name '/'

               lv_guid '.pdf' into lv_cache_url.

   ex_display_url = lv_cache_url.

 

   cl_http_server=>server_cache_upload( url      = lv_cache_url

                                        response = lr_cached_response

                                        scope    = ).                         "Distribute to all app servers

 

 

The ex_display_url is then returned into my page and display by way of javascript window.open function.

 

<%  if display_url is not initial.%>
          <display-url><%=cl_http_utility=>escape_xml_attr_value( ex_display_url )%></display-url>
<%endif.%>

 

 

This works fine when internal to our network but when we introduce a web dispatcher, configured with an alias, we are receiving 404 errors when the new page opens?

 

I guessing that the web dispatcher simply wont allow the connection because the URL doesn't contain the alias and therefore correct path to the object in the server cache.

 

Does anyone know whats going wrong here or how i would build the correct URL for the web dispatcher at runtime?

 

Web dispatcher URL

https://www.domainName.com/Alias(dD1lbiZjPTkwMA==)/customer

 

On trying to display customer's PDF document i get

http://www.domainName.com/sap/bc/bsp/sap/bsp_app/guid.pdf

and a 404 error with not found which looks to be the SICF node path


Viewing all articles
Browse latest Browse all 237

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>