Skip to Content
avatar image
Former Member

Mail in PDF format

Hi All,

Can any body help me on diffrent techniques of how to send mail in PDF format in scripts.

Thanks & Regards,

Hari Krishna.K

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jan 07, 2008 at 04:43 PM

    hi,

    to download a SAP-SCRIPT in pdf format

    1 - you need to have the otf data from the sap-script

    for having back this table you have to pass the value 'X' to tdgetotf of itcpo structure

    >itcpo-tdgetotf = 'X'.

    >CALL FUNCTION 'OPEN_FORM'

    > EXPORTING

    > ...

    > options = itcpo

    > ...

    >EXCEPTIONS

    >OTHERS = 12.

    the function CLOSE_FORM now gives back in otf_data tables parameter a table that contain in OTF format the sapscript

    >DATA: otf_data TYPE itcoo OCCURS 100 WITH HEADER LINE.

    >CALL FUNCTION 'CLOSE_FORM'

    > TABLES

    > otfdata = otf_data

    > EXCEPTIONS

    > unopened = 1

    > bad_pageformat_for_print = 2

    > send_error = 3

    > spool_error = 4

    > codepage = 5

    > OTHERS = 6.

    now you can call the function CONVERT_OTF_2_PDF for converting the data and then download it with GUI_DOWNLOAD

    >DATA: lt_pdf LIKE tline OCCURS 0 WITH HEADER LINE,

    > l_len TYPE i,

    > lt_docs TYPE docs OCCURS 0 WITH HEADER LINE.

    >

    >CALL FUNCTION 'CONVERT_OTF_2_PDF'

    > EXPORTING

    > use_otf_mc_cmd = 'X'

    > IMPORTING

    > bin_filesize = l_len

    > TABLES

    > otf = otf_data

    > doctab_archive = lt_docs

    > lines = lt_pdf.

    now lt_pdf if your script in pdf format.

    to send this to an e-mail you have to call 'SO_NEW_DOCUMENT_ATT_SEND_API1' function.

    bye

    Edited by: nicolai marco on Jan 7, 2008 5:44 PM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 09, 2008 at 04:25 AM

    Hi,

    BY USING FIRST THREAD YOU CAN SEND MAIL IN PDF FORMAT OF FORM .SURELY IT WILL WORK.

    Add comment
    10|10000 characters needed characters exceeded