Skip to Content

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_outputpdf ).
   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_outputpdf ).
   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_outputpdf      =>     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 🙂

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply