Quantcast
Channel: SCN: Message List - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 7775

Re: Fact sheet for Contact BP

$
0
0

Hi Rama,

 

Other than the .PDF looks fine , please find the logic below .

ATA:

        lv_xstring       TYPE xstring,

        lv_guid          TYPE guid_32,

        lv_title         TYPE string,

        lr_response      TYPE REF TO if_http_response.

 

 

  CREATE OBJECT lr_response TYPE cl_http_response

    EXPORTING

      add_c_msg = 1.

 

 

  " Set parameter

  lr_response->set_data(

    data   = iv_content ).

 

 

  lr_response->set_header_field(

    name  = if_http_header_fields=>content_type

    value = iv_content_type ).

 

 

  lr_response->set_header_field(

    name  = 'expires'

    value = '180' ).

 

 

  lr_response->set_status(

    code = 200

    reason = 'OK' ).

 

 

  lr_response->server_cache_expire_rel(

    expires_rel = 180 ).

 

 

  " Create unique URL via GUID

  CALL FUNCTION 'GUID_CREATE'

    IMPORTING

      ev_guid_32 = lv_guid.

  CONCATENATE iv_application_url '/' lv_guid INTO rv_url  no_text.

 

 

  " Upload to server cache

  cl_http_server=>server_cache_upload(

    url      = rv_url

    response = lr_response

  ).

 

Data of Imporitng Paratmers

 

 

iv_application_url = me->runtime->application_url

iv_content_type   =  'application/pdf'


Coding in the URL call should be like this in HTM page.

<% if controller->gv_url is not initial. %>

   <script language="JavaScript" type="text/javascript">

     function OpenArchive() {

       arc_win = window.open("<%= controller->gv_url %>");

       arc_win.focus();

       thtmlbUnregisterOnLoad(Delay);

       return false;

     }

     function Delay() {

       window.setTimeout("OpenArchive()", 200);

       return false;

     }

     thtmlbRegisterOnLoad(Delay);

   </script>

<% clear controller->gv_url. %>

<% endif. %>


Viewing all articles
Browse latest Browse all 7775

Trending Articles



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