Skip to Content
0
Apr 08, 2005 at 05:21 PM

email PDF smart form Support Desk

100 Views

Hi SDN,

I'm working on support desk - solution manager, and i need to send the solution of the support message by email to the final user.

There is an standard action (SLF1 -SMSD_SERVICE_ORDER_DNO_OUTPUT) that sends the solution in pdf format by email, but we couldn't set the receivers online.

So, I'm using an "z" action that executes an smart form, and i would like to send the smart form in pdf format by the internet.

I'd like to use fm SO_DYNP_OBJECT_SEND, because the user must fill the receivers on-line

So far i have de OTF, and i know that i can make a conversion to pdf format, but i've the following problem

- the pdf in attach is empty, it may be because of the format, or may be i'm not using correctly this function.

Thanks in advance,

Maria João Rocha

      call function 'CONVERT_OTF'
        exporting
           format                = 'PDF'
        importing
          bin_filesize          = w_pdf_size
        tables
          otf                   = es_job_output_info-otfdata[]
          lines                 = t_pdf[]
        exceptions
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          err_bad_otf           = 4
          others                = 5.

* header
      wa_head-objnam = 'EMAIL'.
      wa_head-objdes = ls_output_options-tdtitle.
      wa_head-objnam = ls_output_options-tdtitle.
      wa_head-objla = sy-langu.
      wa_head-objsns = 'O'.
      wa_head-file_ext = 'TXT'.
      append wa_head to t_head.

      wa_packing_list-transf_bin = 'X'.
      wa_packing_list-head_start = 1.
      wa_packing_list-head_num = 0.
      wa_packing_list-body_start = 1.
      wa_packing_list-objtp = 'RAW'.
*      wa_packing_list-objtp = 'EXT'.
      wa_packing_list-objdes = ls_output_options-tdtitle.
      wa_packing_list-objla = sy-langu.
      wa_packing_list-objlen = w_pdf_size.
      wa_packing_list-file_ext = 'PDF'.
      append wa_packing_list to t_packing_list.



*---------- enviar o mail

      call function 'SO_DYNP_OBJECT_SEND'
        exporting
*            object_hd_change           = ls_output_options-tdtitle
          object_type                = 'RAW'
*            originator_type            = 'B'
*            originator                 = sy-uname
 outbox_flag      = 'S'

        tables
*            objcont                    = t_text
*            receivers                  = t_receivers
          packing_list               = t_packing_list
          att_cont                   = t_cont
          att_head                   = t_head
        exceptions
          active_user_not_exist      = 1
          communication_failure      = 2
          component_not_available    = 3
          folder_not_exist           = 4
          folder_no_authorization    = 5
          forwarder_not_exist        = 6
          note_not_exist             = 7
          object_not_exist           = 8
          object_not_sent            = 9
          object_no_authorization    = 10
          object_type_not_exist      = 11
          operation_no_authorization = 12
          owner_not_exist            = 13
          parameter_error            = 14
          substitute_not_active      = 15
          substitute_not_defined     = 16
          system_failure             = 17
          too_much_receivers         = 18
          user_not_exist             = 19
          x_error                    = 20
          others                     = 21.


    endif.