Hi,
I'm new to BSP's and seem to have a problem. When a form has to be displayed in a separate window the window comes up but with the error:
BSP Exception: Das Objekt 43701DE84054085702000000A3C401DA.pdf in der URL /sap(bD1lbiZjPTIxMCZkPW1pbiZ3PTk4MDM1ODAr)/bc/bsp/sap/zdi_spp_main/43701DE84054085702000000A3C401DA.pdf ist nicht gültig.
Here is the code also:
DATA: cached_response TYPE REF TO if_http_response.
CREATE OBJECT cached_response TYPE cl_http_response EXPORTING add_c_msg
= 1.
confirm->pdf_len = XSTRLEN( confirm->pdf_xstring ).
cached_response->set_data( data = confirm->pdf_xstring
length = confirm->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 l_display_url.
cl_http_server=>server_cache_upload( url = l_display_url
response = cached_response ).
Any help would be greatly appreciated.
Thanks
Bradley