Generated Adobe form as PDF (to send it by mail for instance)

Generated Adobe form as PDF (to send it by mail for instance)

✔ Change some parameteres in the form ouput parameters :


  lst_outparms-device   = 'MAIL'.   " Format for mail sending
  lst_outparms-nodialog = 'X'.      " Do not display PDF
  lst_outparms-getpdf   = 'X'.      " and get PDF source.

 
✔ Retrieve the PDF code in form ouput structure of your form function :


  /1bcdwb/formoutput = ls_formoutput

 
✔ Convert PDF code in xstring to binary :


" DATA lt_att_content_hex  TYPE solix_tab. " Table type for mail attachment.

  CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
      buffer     = ls_formoutput-pdf
*     APPEND_TO_TABLE = ' '
*   IMPORTING
*     OUTPUT_LENGTH =
    TABLES
      binary_tab = lt_att_content_hex.

 
✔ Use the table lt_att_content_hex to send the PDF by mail, check post : Send mail using BCS class

About the author

fjourneau administrator

Hi, I'm Florian Journeau, SAP ABAP R3 Freelance, based in Toulouse, France. You want to know more about me, have a look on my CV : cv.fjourneau.net.

Leave a Reply