Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Hello,

I've created a pdf form in SAP CRM 7.02 and this form is dispayed in WebUI by clicking on a button "Synthesis".

After a few seconds (30 s), the pdf is not displayed and there is an error conversion or something like that.

There is a lot of strange characters in Internet Explorer instead of a 3 buttons popup (save, open, cancel).

Here is my code which is good running in CRM 5 PCUI.

   lv_name = 'Portfolio'.
   CONCATENATE lv_name '.pdf' INTO lv_name.

  CONCATENATE 'attachment; filename=' lv_name INTO lv_header_content.

   lv_content_length = XSTRLEN( ls_output-pdf ).
   DATA: lv_data TYPE xstring.
   lv_data = me->runtime->server->response->get_data( ).
*  me->runtime->server->response->get_header_field( ).
   me->navigation->set_parameter( name = 'content_length' value = lv_content_length ).
   me->runtime->server->response->set_data( ls_output-pdf ).
   me->runtime->server->response->set_header_field(
               name = 'Content-Disposition'
               value = lv_header_content ).
   me->runtime->server->response->set_header_field(
               name = 'Content-Type'
               value = 'application/x-pdf' ).

   me->runtime->server->response->set_header_field(
               name = 'Content-Length'
               value = lv_content_length ).

   me->navigation->response_complete( ).

*********************************************************************************************************

*********************************************************************************************************

ls_output-pdf      =>     comes from

CALL FUNCTION lv_fmname
     EXPORTING
       /1bcdwb/docparams  = ls_docparams
       is_overview        = ls_overview
       it_profile_text    = lt_profile_text
       it_supply_text     = lt_supply_text
       it_deriv_text      = lt_deriv_text
     IMPORTING
       /1bcdwb/formoutput = ls_output
     EXCEPTIONS
       usage_error        = 1
       system_error       = 1
       internal_error     = 3
       OTHERS             = 4.


*********************************************************************************************************

Thank you for your help :smile:

2 Comments
Labels in this area