PDF - Mail

Hi friends,
I have generated a sales executive performance report in ABAP and i have generated a PDF file in my local directory for each sales executive. Now, i need to send a mail with an attachment of this pdf file to teh respective sales executive.
I have few doubts.
1. From where can i get the mail-id's of sales executive.Or in other words, is there any option ( in the customer master where in v attach the sales executive for that customer ) to enter the mail id?
2. How will i send a mail ?
TIA,
Sinthu

Hi sinthu,
How will i send a mail ?
1. There is some trick involved
in the binary files.
2. I have made a program (and it works fantastic)
ONLY 6 LINES FOR EMAILING
BELIEVE ME
ITS A FANTASTIC PROGRAM.
IT WILL WORK LIKE OUTLOOK EXPRESS !
3. The user is provided with
a) file name
b) email address to send mail
and it sends ANY FILE (.xls,.pdf .xyz..)
Instantaneously !
4. Make two things first :
1. Include with the name : ZAMI_INCLFOR_MAIL
2. Report with the name : ZAM_TEMP147 (any name will do)
3. Activate both and execute (2)
4. After providing filename, email adress
5. Code for Include :
10.08.2005 Amit M - Created
Include For Mail (First Req F16)
Modification Log
Data
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
FORM
FORM ml_customize USING objname objdesc.
Clear Variables
CLEAR docdata.
REFRESH objpack.
CLEAR objpack.
REFRESH objhead.
REFRESH objtxt.
CLEAR objtxt.
REFRESH objbin.
CLEAR objbin.
REFRESH objhex.
CLEAR objhex.
REFRESH reclist.
CLEAR reclist.
REFRESH listobject.
CLEAR listobject.
CLEAR tab_lines.
CLEAR doc_size.
CLEAR att_type.
Set Variables
docdata-obj_name = objname.
docdata-obj_descr = objdesc.
ENDFORM. "ml_customize
FORM
FORM ml_addrecp USING preceiver prec_type.
CLEAR reclist.
reclist-receiver = preceiver.
reclist-rec_type = prec_type.
APPEND reclist.
ENDFORM. "ml_customize
FORM
FORM ml_addtxt USING ptxt.
CLEAR objtxt.
objtxt = ptxt.
APPEND objtxt.
ENDFORM. "ml_customize
FORM
FORM ml_prepare USING bypassmemory whatatt_type whatname.
IF bypassmemory = ''.
Fetch List From Memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'LIST_FROM_MEMORY'.
ENDIF.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
COMPRESSED_SIZE =
TABLES
in = listobject
out = objbin
EXCEPTIONS
OTHERS = 1
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'TABLE_COMPRESS'.
ENDIF.
ENDIF.
Header Data
Already Done Thru FM
Main Text
Already Done Thru FM
Packing Info For Text Data
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
Packing Info Attachment
att_type = whatatt_type..
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = whatname.
APPEND objpack.
Receiver List
Already done thru fm
ENDFORM. "ml_prepare
FORM
FORM ml_dosend.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
CONTENTS_HEX = objhex
OBJECT_PARA =
object_parb =
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
ENDFORM. "ml_customize
FORM
FORM ml_spooltopdf USING whatspoolid.
DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
Call Function
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = whatspoolid
TABLES
pdf = pdf
EXCEPTIONS
err_no_otf_spooljob = 1
OTHERS = 12.
Convert
PERFORM doconv TABLES pdf objbin.
ENDFORM. "ml_spooltopdf
FORM
FORM doconv TABLES
mypdf STRUCTURE tline
outbin STRUCTURE solisti1.
Data
DATA : pos TYPE i.
DATA : len TYPE i.
Loop And Put Data
LOOP AT mypdf.
pos = 255 - len.
IF pos > 134. "length of pdf_table
pos = 134.
ENDIF.
outbin+len = mypdf(pos).
len = len + pos.
IF len = 255. "length of out (contents_bin)
APPEND outbin.
CLEAR: outbin, len.
IF pos < 134.
outbin = mypdf+pos.
len = 134 - pos.
ENDIF.
ENDIF.
ENDLOOP.
IF len > 0.
APPEND outbin.
ENDIF.
ENDFORM. "doconv
CODE FOR PROGRAM
5.
REPORT zam_temp147 .
INCLUDE zami_inclfor_mail.
DATA
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
data : path like PCFILE-PATH.
data : extension(5) type c.
data : name(100) type c.
SELECTION SCREEN
PARAMETERS : receiver TYPE somlreci1-receiver lower case.
PARAMETERS : p_file LIKE rlgrap-filename
OBLIGATORY.
AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CLEAR p_file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = p_file.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM ml_customize USING 'Tst' 'Testing'.
PERFORM ml_addrecp USING receiver 'U'.
PERFORM upl.
PERFORM doconv TABLES itab objbin.
PERFORM ml_prepare USING 'X' extension name.
PERFORM ml_dosend.
SUBMIT rsconn01
WITH mode EQ 'INT'
AND RETURN.
FORM
FORM upl.
file_name = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_name
filetype = 'BIN'
TABLES
data_tab = itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
path = file_name.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
CHECK_DOS_FORMAT =
IMPORTING
DRIVE =
EXTENSION = extension
NAME = name
NAME_WITH_EXT =
PATH =
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5
ENDFORM. "upl
regards,
amit m.

Similar Messages

  • CANT OPEN PDF MAIL FILES

    JUST SIGNED UP
    CANNOT OPEN PDF  MAIL FILES

    Signed up for what?
    What is your operating system?  Email client?  Reader version?
    What exactly means "cannot"?

  • BExBroadcasting - manipulate pdf mail-attachment filename

    we are broadcasting BW-reports via BExBroadcaster and generated PDFand sending mail-attachements to some BW-users.
    is there any chance to change or manipulate the filename of these generated PDF mail-attachements ?
    e.g.  shorter filename with lower-case Characters (less than 32 char)

    we are broadcasting BW-reports via BExBroadcaster and generated PDFand sending mail-attachements to some BW-users.
    is there any chance to change or manipulate the filename of these generated PDF mail-attachements ?
    e.g.  shorter filename with lower-case Characters (less than 32 char)

  • Selecting Default PDF Mail App When Printing

    I have a MBP running Leopard.
    I use Entourage for my email. I have Entourage selected as my default in Apple Mail.
    Scenario: When I go File -> Print, -> PDF, -> Mail PDF, the PDF is rendered but it comes up in a new email message in Apple Mail. How do I change this so that a new mail message in Entourage comes up? I have gotten all my other apps to launch Entourage when I choose to email something.
    Thanks in advance.

    Try putting an alias of Entourage into your home directory's "Library/PDF Services" folder. That should add a new item to the PDF button-menu in the print dialog.
    I hope this helps.

  • Aperture printed book in pdf (mail) won't load in iPad2

    Any one has an idea how to convert a book printed from Aperture to a pdf (mail) format so it will load in iPad
    The file resulting from my book of 100 pages was 541MB an it can be seen with Adobe Reader but when loaded to iPad goinf through  the recommended method of dropping it in iTuene and sync it with the iPad.
    Just loads the cover and 100 blank pages. If I open it it freezes the iPas and crash the app.
    Is there an application that can make smaller files from exiisting odf files?

    Edlatour-
    I just realized there was a step left out.  When you get to the Print window, first check "Selected Images in Sidebar" under Pages. Otherwise I think you just get another copy like the original.
    The revised process:
    Open the PDF in Preview.  Under View, be sure Thumbnails is checked, so you can see all pages next to the one you are reading.  Click on the first page thumbnail.  Under Edit, Select All.  Under File, select Print.  In the Print window, check "Selected Images in Sidebar" under Pages.  Then select PDF-Save as PDF, and give it a new name.
    This is a handy way to make a PDF out of several individual files.  Open one in Preview and check View-Thumbnails.  Then one-by-one, drag each file into the Thumbnail sidebar.  Drag them into the order you want.  Under Edit, Select All, et cetera.  It is possible to mix file types as long as each is compatible with Preview.
    Fred

  • Print, pdf, mail from form

    Hello,
    I want to print, create pdf file on desktop and send external mail of invoice from SAP form (all in one program).
    I have following question:
    1) can we do all from one program?
    2) Will it download pdf file on presentation server (c:\filename.pdf) even thought output will be called in a document while saving in backgroung?
    3) If we send mail can we have multiple recipents?
    4) Any sample code or reference?
    Thank you.
    AP

    Hi,
      This is the program to download form into pdf file.
    1.Directly with RSTXPDFT4.
    or
    TABLES : vbrk.
    TYPE-POOLS : slis.
                               GLOBAL TYPES
                       naming convention: "TY_name"
                              GLOBAL CONSTANTS
                       naming convention: "c_name"
                        GLOBAL ELEMENTARY VARIABLES
                        naming convention: "w_name"
                              GLOBAL STRUCTURES
                        naming convention: "st_name"
                           GLOBAL INTERNAL TABLES
                         naming convention: "i_name"
    DATA:i_bdcdata    TYPE TABLE OF bdcdata    ,
         i_fieldcat   TYPE slis_t_fieldcat_alv ,
         i_vbrk       TYPE TABLE OF ty_vbrk    ,
         i_sort       TYPE slis_t_sortinfo_alv ,              "for sorting the fields
         i_rows       TYPE lvc_t_row            .
                          PARAMETERS & SELECT-OPTIONS
                     aming convention: "p_name" & "s_name"
    SELECTION-SCREEN  BEGIN OF BLOCK b1." WITH FRAME TITLE text-010.
    SELECT-OPTIONS : s_vkorg FOR  vbrk-vkorg OBLIGATORY,
                     s_fkart FOR vbrk-fkart  OBLIGATORY,
                     s_kunag FOR vbrk-kunag            ,
                     s_vbeln FOR vbrk-vbeln            ,
                     s_fkdat FOR vbrk-fkdat  OBLIGATORY.
    SELECTION-SCREEN  END OF BLOCK b1.
    SELECTION-SCREEN  BEGIN OF BLOCK b2.
    PARAMETERS: p_file1 TYPE string DEFAULT 'C:\'.
    SELECTION-SCREEN  END OF BLOCK b2.
    DEFINE m_fieldcat.
      add 1 to st_fieldcat-col_pos.
      st_fieldcat-fieldname   = &1.
      st_fieldcat-ref_tabname = 'VBRK'.
      st_fieldcat-seltext_s   = &2.
      st_fieldcat-seltext_m   = &3.
      st_fieldcat-seltext_l   = &4.
      append st_fieldcat to i_fieldcat.
    END-OF-DEFINITION.
                               START-OF-SELECTION
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
      CALL METHOD cl_gui_frontend_services=>directory_browse
        CHANGING
          selected_folder      = p_file1
        EXCEPTIONS
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 3
          OTHERS               = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    START-OF-SELECTION.
      EXPORT w_file FROM  p_file1 TO MEMORY ID 'ZMEM1'(005).
      PERFORM f1000_get_data.
      PERFORM f2000_display_data.
    *&      Form  F1000_get_data
          This routine is used for Get the data from VBRK based on
          Selection Screen
    FORM f1000_get_data.
      SELECT vkorg
             fkart
             kunag
             vbeln
             fkdat
        INTO TABLE i_vbrk
        FROM vbrk
       WHERE vkorg IN s_vkorg
         AND fkart IN s_fkart
         AND kunag IN s_kunag
         AND vbeln IN s_vbeln
         AND fkdat IN s_fkdat.
      IF sy-subrc NE 0.
        MESSAGE i014(zmsg) WITH 'No data is available for your Input'(003).
      ENDIF.
    ENDFORM.                    "get_data
    *&      Form  F2000_display_data
         This routine is used for building field catalogs and display
         ALV Data
    FORM f2000_display_data.
      PERFORM f6000_field_cat.
      PERFORM f7000_sort.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_callback_pf_status_set = 'F3000_PF_STATUS_SET'
          i_callback_user_command  = 'F4000_USER_COMMAND'
          is_layout                = st_layout
          it_fieldcat              = i_fieldcat
          it_sort                  = i_sort
        TABLES
          t_outtab                 = i_vbrk.
    ENDFORM.                    "display_data
    *&      Form  F6000_field_cat
         This routine is used for building field catalogs and display
         ALV Data
    FORM  f6000_field_cat.
      m_fieldcat 'VKORG' '' '' ''.
      m_fieldcat 'FKART' 'Billing Document Type'(007) 'Billing Document Type'(007) 'Billing Document Type'(007).
      m_fieldcat 'KUNAG' 'Customer No'(008) 'Customer No'(008) 'Customer No'(008).
      m_fieldcat 'VBELN' 'Invoice No'(009) 'Invoice No'(009) 'Invoice No'(009).
      m_fieldcat 'FKDAT' '' '' ''.
      st_layout-cell_merge = 'X'.
      st_layout-colwidth_optimize = 'X'.
      st_layout-box_fieldname = 'VKORG'.
    ENDFORM.                    "F7000_field_cat
    *&      Form  F7000_sort
    FORM f7000_sort .
      CLEAR st_sort.
      st_sort-fieldname = 'VBELN'.
      st_sort-up = 'X'.
      st_sort-group = 'UL'.
      APPEND st_sort TO i_sort.
    ENDFORM.                                                    "f6000_sort
          FORM F3000_PF_STATUS_SET                                      *
          This routine is for creating User button on output
    FORM f3000_pf_status_set  USING ut_extab TYPE slis_t_extab. "#EC CALLED
      SET PF-STATUS 'ZPF_STATUS' OF PROGRAM 'ZVRXX_SF_PDF_DOWNLOAD'
          EXCLUDING ut_extab.
    ENDFORM.                               " PF_STATUS_SET
          FORM F4000_USER_COMMAND                                       *
          This routine is for When user on clicks on custom button in
          OUTPUT and Download to PDF format
    FORM f4000_user_command USING ucomm TYPE sy-ucomm
                                  sel TYPE slis_selfield.
      TYPES: BEGIN OF ty_alv,
              lights(1)  TYPE c, "Exception, Holding the value of the lights
              number(14) TYPE c,  "billing document no
              text(150)  TYPE c,  "text
             END OF ty_alv.
      DATA: gs_alv       TYPE ty_alv,
            gt_alv       TYPE TABLE OF ty_alv,
            gr_alv       TYPE REF TO cl_salv_table,
            gr_columns   TYPE REF TO cl_salv_columns_table,
            gr_column    TYPE REF TO cl_salv_column,
            lw_ref       TYPE REF  TO cx_salv_not_found,
            lw_ref1      TYPE REF TO cx_salv_msg,
            lw_ref2      TYPE REF TO cx_salv_data_error,
            lw_text      TYPE string,
            lw_pdf(3)    TYPE c,
            lw_pdf1(3)    TYPE c.
      DATA: ref_grid TYPE REF TO cl_gui_alv_grid.
      DATA :lw_row_index       TYPE lvc_index    ,
            lw_subrc           TYPE sy-subrc      .
      CONSTANTS : c_0          TYPE c VALUE '0'.
    *then insert the following code in your USER_COMMAND routine...
      IF ref_grid IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            e_grid = ref_grid.
      ENDIF.
      IF NOT ref_grid IS INITIAL.
        CALL METHOD ref_grid->check_changed_data.
      ENDIF.
      CASE ucomm.
        WHEN 'PDF'.
          lw_pdf = 'PDF'.
          EXPORT lw_pdf1 FROM lw_pdf TO MEMORY ID 'ZMEM4'(004).
          CALL METHOD ref_grid->get_selected_rows
            IMPORTING
              et_index_rows = i_rows.
          LOOP AT i_rows
             INTO st_selected_line.
            lw_row_index = st_selected_line-index.
            CLEAR st_selected_line.
            READ TABLE i_vbrk
                  INTO st_vbrk
                 INDEX lw_row_index.
            IF sy-subrc EQ 0.
              CLEAR:w_vbeln.
              MOVE st_vbrk-vbeln TO w_vbeln.
              EXPORT lw_vbeln1 FROM w_vbeln TO MEMORY ID 'ZMEM'(004).
              lw_subrc = 1.
    *--Begin of changes for DRFK904991
    *--We need an identifier to tell the print program that PDF is being
    downloaded through this program and the word "COPY" should not be
    printed hence we are exporting this flag to memory which will be
    read later on in the smartform
              DATA l_pdf TYPE c.
              l_pdf = 'X'.
              EXPORT l_pdf TO MEMORY ID 'ZPDF'.
              PERFORM f5000_print_vbeln USING w_vbeln.
              FREE MEMORY ID 'ZPDF'.
    *--End of changes for DRFK904991
              IMPORT lw_subrc1 TO lw_subrc FROM MEMORY ID 'ZMEM2'(006).
              CLEAR : w_objky.
              SELECT objky
                FROM nast
                UP TO 1 ROWS
                INTO w_objky
               WHERE kappl EQ c_v3
                 AND objky EQ w_vbeln
                 AND ( kschl EQ c_zrd0 OR kschl EQ c_zrdx ).
                and nacha eq '8'. "--02/15/2008
              ENDSELECT.
    *insertion by kudalarr on 05-02-2008
    *displaying the status of download.
              IF w_objky NE space
                       AND lw_subrc EQ c_0.
                st_check-value = 'PDF is  Generated Successfully'(001).
                gs_alv-lights = '3'.    "Color green
                gs_alv-number = w_objky.
                gs_alv-text = st_check-value.
                APPEND gs_alv TO gt_alv.
              ELSE.
                st_check-value = 'PDF is not Generated'(002).
                gs_alv-lights = '1'.    "Color red
                gs_alv-number = w_vbeln.
                gs_alv-text = st_check-value.
                APPEND gs_alv TO gt_alv.
              ENDIF.
            ENDIF.
            lw_subrc = 1.
            EXPORT lw_subrc1 FROM lw_subrc TO MEMORY ID 'ZMEM2'.
          ENDLOOP.
      ENDCASE.
    *GETTING ALL THE COLUMNS AND ASSISGNING THE COLUMN NAMES TO THE RESPECTIVE.
      TRY.
          CALL METHOD cl_salv_table=>factory
            IMPORTING
              r_salv_table = gr_alv
            CHANGING
              t_table      = gt_alv.
        CATCH cx_salv_msg INTO lw_ref1.
          lw_text = lw_ref1->get_text( ).
          IF NOT lw_text IS INITIAL.
          ENDIF.
      ENDTRY.
      gr_columns = gr_alv->get_columns( ).
      TRY.
          CALL METHOD gr_columns->get_column
            EXPORTING
              columnname = 'NUMBER'
            RECEIVING
              value      = gr_column.
        CATCH cx_salv_not_found INTO lw_ref .
          lw_text = lw_ref->get_text( ).
          IF NOT lw_text IS INITIAL.
          ENDIF.
      ENDTRY.
      TRY.
          CALL METHOD gr_column->set_long_text
            EXPORTING
              value = 'Invoice number'(010).
          CALL METHOD gr_columns->get_column
            EXPORTING
              columnname = 'TEXT'
            RECEIVING
              value      = gr_column.
          CALL METHOD gr_column->set_long_text
            EXPORTING
              value = 'Status'(011).
        CATCH cx_salv_not_found ."INTO LW_REF.
          lw_text = lw_ref->get_text( ).
          IF NOT lw_text IS INITIAL.
          ENDIF.
      ENDTRY.
    *DISPALYING THE STATUS OF PDF GENERATION.
      TRY.
          gr_columns->set_exception_column( value = 'LIGHTS' ).
          CALL METHOD gr_alv->display.
        CATCH cx_salv_data_error INTO lw_ref2.
          lw_text = lw_ref2->get_text( ).
          IF NOT lw_text IS INITIAL.
          ENDIF.
      ENDTRY.
      IF NOT sel IS INITIAL.
      ENDIF.
    *end of insertion by kudalarr on 05-02-2008
    ENDFORM.                    "sub_user_command
                                                                "F6000_sort
    *&      Form  F5000_print_vbeln
          text
    -->  p1        text
    <--  p2        text
    FORM f5000_print_vbeln USING l_vbeln TYPE vbeln.
      CONSTANTS:   c_ctumode(1) TYPE  c VALUE 'N', "set the parametrs for call transaction.
                   c_cupdate(1) TYPE  c VALUE 'A'. "set the parametrs for call transaction
      DATA:lw_kschl      TYPE sna_kschl.
      DATA : lw_field      TYPE dd03l-fieldname,
             lw_counter(2) TYPE n .
      REFRESH: i_bdcdata.
      CLEAR:   lw_kschl,
               lw_counter,
               lw_field.
      SELECT kschl
             FROM nast
             INTO lw_kschl
             UP TO 1 ROWS
            WHERE kappl EQ c_v3
            AND  kschl EQ c_rd00
            AND objky EQ l_vbeln.
           and nacha eq '8'. "--02/15/2008
      ENDSELECT.
      IF sy-subrc EQ 0.
        lw_counter = lw_counter + 1.
      ENDIF.
      CLEAR:lw_kschl.
      SELECT kschl
             FROM nast
             INTO lw_kschl
             UP TO 1 ROWS
                   WHERE kappl EQ c_v3
            AND ( kschl EQ c_zrd0 OR kschl EQ c_zrdx )
            AND objky EQ l_vbeln.
           and nacha eq '8'. "--02/15/2008
      ENDSELECT.
      IF  sy-subrc = 0.
        lw_counter = lw_counter + 1.
      ELSE.
        MESSAGE i015(zmsg) WITH 'No output Type Available  for the selected Invoice'(013) l_vbeln.
      ENDIF.
      PERFORM bdc_dynpro      USING 'SAPMV60A' '0101'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'VBRK-VBELN'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=DRCK'.
      PERFORM bdc_field       USING 'VBRK-VBELN'
                                    l_vbeln.
      PERFORM bdc_dynpro      USING 'SAPLVMSG' '0200'.
      CONCATENATE 'NAST-KSCHL(' lw_counter ')' INTO lw_field.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                     lw_field.
      CLEAR:lw_field.
      CONCATENATE 'ROW_MARK(' lw_counter ')' INTO lw_field.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=PRNT'.
      PERFORM bdc_field       USING lw_field
                                    'X'.
      CALL TRANSACTION 'VF03' USING i_bdcdata MODE c_ctumode
                                            UPDATE c_cupdate.
      IF sy-subrc EQ 0.
        MESSAGE s999(zyus) WITH 'Invoice Report'(012).
      ENDIF.
    ENDFORM.                    " SUB_PRINT_VBELN
           Start new screen                                              *
    FORM bdc_dynpro USING program dynpro .
      CLEAR st_bdcdata.
      st_bdcdata-program  = program.
      st_bdcdata-dynpro   = dynpro.
      st_bdcdata-dynbegin = 'X'.
      APPEND st_bdcdata TO i_bdcdata.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM bdc_field USING fnam fval.
      CLEAR st_bdcdata.
      st_bdcdata-fnam = fnam.
      st_bdcdata-fval = fval.
      APPEND st_bdcdata TO i_bdcdata.
    ENDFORM.     
    Regards(replay with points),
    Shiva.
    Edited by: shiva kumar on Mar 20, 2008 5:33 AM

  • Can't open word doc attachments in pdf mail portfolio

    I created a pdf portfolio by converting outlook mail messages in Adobe Acrobat 9 Pro. I can open the attachments but my coworkers are unable to open email attachments that are word documents (they can open pdfs).  When they go to Preferences --> Trust Manager, the first option about pdf attachments is grayed out and cannot be selected. 
    Can anyone please help tell me how to make the word documents accesible to other users.
    Thank you

    Hi,
    I have Acrobat 9.5 on my machine and I am not able to see any problem in opening non PDF file attachments.
    Please give the exact version of Acrobat you are using ( to see the version go to  Help -> About Adobe Acrobat).
    Update your Acrobat to latest version i.e 9.5.
    As you have mentioned that in Preferences-> Trust Manager-> Allow opening of non PDF file attachment with external applications is grayted out,
    is it a custom installation of Acrobat ?? because in normal installation this option is not grayed out.
    Thanks.

  • PDF mail attachments are shown as question mark instead of preview or icon.

    When I receive a mail with PDF attachment, I can see paper clip on the header of mail. This is fine. However, Apple Mail does not show as preview or icon. I can see only a box with border and a question mark sign "?" in the middle. If I click the "?" symbol, preview opens the PDF attachment properly.
    It is fine for other mail attachment such as .DOC or .JPG. Either I can see preview or as icon.
    Is there anybody who knows the solution of this problem?
    P.S. I use OS X Yosemite 10.10.1 but problem was existing also with Mavericks.

    No, I don't think so. Same attachment is shown properly on the my colleague's Mac who is another recipient for same e-mail. There is something wrong about my Mac.

  • Polish characters are overwriting in PDF mail

    Hi All,
    I am mailing a PDF document which is genereated through a SAP script in which some polish characters are being used . The problem is when i am cretating PDF through spool  , polish characters are printing fine but when i am creating PDF through FM 'CONVERT_COMM_TYPE_DATA' some polish charactes are overwring with each other .
    Please let me know if you have any inputs on this issue.
    Regards,
    Anand.

    Sometimes the printer thru which the spool is created will also make the characters print overlapped.
    check the characterset on the printerdevice you use for creating the pdf that should support the polish characters.

  • Email options for PDF mail merges

    Have gone through the whole process of creating a mail merge in mircrosoft word and am now using the "Merge to Adobe PDF tool" to convert as well as automaticall send Adobe PDF files be Email.
    In the message section of the window, I really need to personalise the body of the email with something like
    Hi Ms (last name),
    Choosing a field from my database.
    However I can't seem to figure out how to get around it.
    Expert advice would be greatly appreciated.
    Cheers in advance
    JD

    My guess was right...
    Delivered-To: [email protected]
    Received: by 10.65.xxx.2 with SMTP id n2cs292736qbp;
    Sun, 1 Jul 2007 17:17:35 -0700 (PDT)
    Received: by 10.64.153.4 with SMTP id a4mr8166863qbe.1183335455918;
    Sun, 01 Jul 2007 17:17:35 -0700 (PDT)
    Return-Path: <[email protected]>
    Received: from smtp03.bis.na.blackberry.com (smtp03.bis.na.blackberry.com [216.9.248.50])
    by mx.google.com with ESMTP id d2si2770738qbc.2007.07.01.17.17.35;
    Sun, 01 Jul 2007 17:17:35 -0700 (PDT)
    Received-SPF: neutral (google.com: 216.9.248.50 is neither permitted nor denied by domain of [email protected])
    X-rim-org-msg-ref-id:2055908612
    Message-ID:<2055908612-1183335455-cardhudecombobulatorblackberry.rim.net-9402[email protected]>
    Sensitivity: Normal
    Importance: Normal
    To: "Robert" <[email protected]>
    Subject: Apple mail *****
    From: [email protected]
    Date: Mon, 2 Jul 2007 00:17:38 +0000
    Content-Type: text/plain
    MIME-Version: 1.0
    PowerBook G4 Mac OS X (10.4.7)

  • Mail Merge to PDF Mailer

    When I mail merge from MS Word to Adobe PDF and select "Automatically send pdf files by email", the process works great. HOWEVER, the recipient receives a .dat file, not a pdf. Can anyone help with this issue?

    Here is the key..
    You need to disable the fancy outlook RTF format to avoid the winmail.dat / no attachment issue. The only way to do that for 3rd party plugins (acrobat) is to add a registry key.
    For Outlook 2010 (older versions, just change 14 to 10-12)
    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Preferences 
    On the Edit menu, point to New, and then click DWORD Value.
    Type DisableTNEF, and then press Enter.
    Right-click DisableTNEF, and then click Modify.
    In the Value data box, type 1, and then click OK.
    Exit Registry Editor.
    Restart the computer.
    as per http://support.microsoft.com/kb/958012
    Crazy problem.. I looked a bit foolish having to send my society's emails 3 times, but now things are golden.

  • Creating a PDF-Mail-Attachment via Abap Mapping possible ?

    Hi folks,
    I am trying to build a szenario like: Getting an Idoc -> sending it to abap mapping -> map a pdf from smartforms in abap -> map the from/to for the mail payload -> come back from abap mapping -> send it with the mail adapter .
    But now I am stuck at the point "coming back from abap mapping", because the pdf -data seems to become unreadable because of conversion. I am using Ixml and trying to attach the create pdf (looks hex-right at that point) by method create_simple_element as content-tag of the mail. But after rendering and coming back out of mapping, it seams that that data is not converted from xstring back in the right way. Can someone give a hint ? Is that way by IXML not possible for data including binary-data ? Have I to go another way?
    Thanks in advance
    Detlef

    > as content-tag of the mail.
    Sometimes I have to read the request several times to find the issue:
    No you cannot put a binary as part of an XML element.
    You can only send a plain binary as payload, so the whole mail would be nothing besides the PDF.
    In PI 7.1 you can create also an additional attachment out of mapping, but I do not know if this works for ABAP mapping also.
    The whole "I want to send an email with attachment out of PI" topic is not supported from PI development in any way.
    So you have to write a lot of code (especially Java code) to achieve this.
    > Regarding your opinion. Its based on customer requirements to have central focal point in dezentral landscape.
    The PI expert has to advise the customer for the scenarios. That is part of the job.

  • Sometimes PDF mails are going without an attachment.

    Hi,
    I have 3 output types and the 3 custom programs.
    When the background job scheduled, the standard RSNAST00 will call the custom programs,
    1)      The logic which added in the custom programs is once adobe form gets generated for output types, I have converted the adobe form into PDF attachment and send the E-mail to distribution list when the Transmission medium is u20185u2019.
    2)      In the program Function Module u2018SCMS_XSTRING_TO_BINARYu2019 used to convert adobe form into PDF file and class CL_BCS used to send it as a mail attachment.
    3) for the  other custom program,  once script gets generated for the output type I have converted the SCRIPT into PDF attachment and send the E-mail to distribution list when the Transmission medium is u20185u2019 .
    4) In the program function Module u2018CONVERT_OTFu2019 used to convert script to OTF file & CLASS METHOD xstring_to_solix Converts OTF to PDF and class CL_BCS used to send it as mail attachment to the mail id.
    Issue: Sometimes mails are going without an attachment. When we retrigger the output type mails are sent with attachment successfully. This is happening monthly once or twice,even that time also when one output type send the attachment mail then remaining two not send the attachment and vice versa.
    Any clues on this issue.
    Thanks
    Kiran

    I am on the way debugging into it .. to see the escape thing .. looks to me we double escape it ..
    usually, you should NOT have to set anything more, this misbehaviour of incostent read is fixed by 10.1.3 - the escaping, I'll have to check ..
    .clemens

  • Sapscript-PDF-Mail error: Insufficient data for an image

    Hi, I've made a function module that takes a Purcharse Orden from spool, converts to PDF file and then send the form via mail. Everything work fine but the corporative logo in the form can't be seen... When I try to open the attachment, Acrobat Reader launchs a popup with the message "Insufficient data for an image" and then ONLY the logo is not displayed.
    Here's the MF code. I'll give points to useful answers. Thank you.
    FUNCTION Z_WF_SENDMAIL_PO_PDF.
    *"*"Interfase local
    *"  IMPORTING
    *"     VALUE(PO_ORDER) LIKE  EKKO-EBELN
    *"     VALUE(DELETE_SPOOL) LIKE  SYST-FTYPE OPTIONAL
    *"     VALUE(FILENAME) LIKE  P05T_RESPONSE-FILENAME OPTIONAL
    *"     VALUE(RECEPTOR) LIKE  SWHACTOR STRUCTURE  SWHACTOR
    *"  EXCEPTIONS
    *"      SENDING_FAILURE
    *"      CONVERSION_ERROR
    *"      NO_SPOOL
    *"      UPLOAD_ERROR
      DATA: T_TSP01 TYPE TSP01 OCCURS 0 WITH HEADER LINE,
            PDF TYPE TLINE OCCURS 0 WITH HEADER LINE.
      DATA: NUMBYTES TYPE I,
            PDFSPOOLID TYPE TSP01-RQIDENT,
            JOBNAME TYPE TBTCJOB-JOBNAME,
            JOBCOUNT TYPE TBTCJOB-JOBCOUNT,
            SPOOLS TYPE I.
      DATA: gd_cnt TYPE i,
            gd_sent_all(1) TYPE c,
            gd_doc_data LIKE sodocchgi1,
            gd_error TYPE sy-subrc.
      DATA: it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
      DATA: lt_objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE,
            lt_objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
            lt_objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
            lt_objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
            lt_reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE,
            l_document_data TYPE sodocchgi1.
      DATA: l_att_lines TYPE i,
            gd_buffer type string.
      DATA: BEGIN OF lt_mails occurs 0,
              bname like usr21-bname,
              smtp_addr like adr6-smtp_addr,
            END OF lt_mails.
      REFRESH : pdf, it_packing_list.
      CLEAR : pdf, it_packing_list.
      SELECT RQIDENT
      INTO T_TSP01-RQIDENT
      FROM TSP01
      WHERE RQOWNER EQ receptor-objid
        AND RQCLIENT EQ SY-MANDT.
        APPEND T_TSP01.
      ENDSELECT.
      IF SY-SUBRC NE 0.
        RAISE NO_SPOOL.
      ELSE.
        SORT T_TSP01 DESCENDING.
        READ TABLE T_TSP01 INDEX 1.
        CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
          EXPORTING
            SRC_SPOOLID              = T_TSP01-RQIDENT
            NO_DIALOG                = ''
          IMPORTING
            PDF_BYTECOUNT            = NUMBYTES
    *        PDF_SPOOLID              = PDFSPOOLID
    *        BTC_JOBNAME              = JOBNAME
    *        BTC_JOBCOUNT             = JOBCOUNT
          TABLES
            PDF                      = PDF
          EXCEPTIONS
            ERR_NO_OTF_SPOOLJOB      = 1
            ERR_NO_SPOOLJOB          = 2
            ERR_NO_PERMISSION        = 3
            ERR_CONV_NOT_POSSIBLE    = 4
            ERR_BAD_DSTDEVICE        = 5
            USER_CANCELLED           = 6
            ERR_SPOOLERROR           = 7
            ERR_TEMSEERROR           = 8
            ERR_BTCJOB_OPEN_FAILED   = 9
            ERR_BTCJOB_SUBMIT_FAILED = 10
            ERR_BTCJOB_CLOSE_FAILED  = 11
            OTHERS                   = 12.
        IF SY-SUBRC NE 0.
          RAISE CONVERSION_ERROR.
        ELSE.
          IF NOT FILENAME IS INITIAL.
            open dataset filename for output in binary mode.
            if sy-subrc ne 0 .
              RAISE UPLOAD_ERROR.
            endif.
            loop at pdf.
              transfer pdf to filename.
              if sy-subrc ne 0 .
                RAISE UPLOAD_ERROR.
              endif.
            ENDLOOP.
          ENDIF.
          IF NOT DELETE_SPOOL IS INITIAL.
            DELETE FROM TSP01 WHERE RQIDENT EQ T_TSP01-RQIDENT.
          ENDIF.
          CHECK NOT ( receptor IS INITIAL ).
          CLEAR: lt_reclist, lt_reclist[],
                 lt_objhead, lt_objhead[],
                 lt_objtxt, lt_objtxt[],
                 lt_objbin, lt_objbin[],
                 lt_objpack, lt_objpack[].
          CLEAR l_document_data.
    * Chequea si fue bajada la orden de spool
          CHECK NOT ( pdf[] IS INITIAL ).
    * Transferir los strings de 132 caracters a strings de 255 caracteres.
          loop at pdf.
            translate pdf using ' ~'.
            concatenate gd_buffer pdf into gd_buffer.
          endloop.
          translate gd_buffer using '~ '.
          do.
            lt_objbin = gd_buffer.
            append lt_objbin.
            shift gd_buffer left by 255 places.
            if gd_buffer is initial.
              exit.
            endif.
          enddo.
    * Cuerpo del mail
          CONCATENATE 'Se adjunta Pedido de Compra' PO_ORDER INTO lt_objtxt SEPARATED BY SPACE.
          APPEND lt_objtxt.
          DESCRIBE TABLE lt_objtxt LINES l_att_lines.
          READ TABLE lt_objtxt INDEX l_att_lines.
    * Titulo del mail
          l_document_data-obj_descr = 'Envio de Pedido de Compra'.
          l_document_data-obj_name = 'Pedido'.
          l_document_data-sensitivty = 'F'.
          l_document_data-expiry_dat = sy-datum + 10.
          l_document_data-doc_size = ( l_att_lines - 1 ) * 255 + strlen( lt_objtxt ).
          l_document_data-obj_langu = sy-langu.
          lt_objhead = 'ORDERS'.
          APPEND lt_objhead.
    * Configuración del cuerpo del mail
          CLEAR lt_objpack.
          REFRESH lt_objpack.
          lt_objpack-transf_bin = space.
          lt_objpack-head_start = 1.
          lt_objpack-head_num = 0.
          lt_objpack-body_start = 1.
    *      lt_objpack-body_num = 1.
          lt_objpack-body_num = l_att_lines.
          lt_objpack-doc_type = 'RAW'.
    *      lt_objpack-doc_size = STRLEN( lt_objtxt ).
          APPEND lt_objpack.
    * Configuración del archivo adjunto del mail
          DESCRIBE TABLE lt_objbin LINES l_att_lines.
          READ TABLE lt_objbin INDEX l_att_lines.
          clear lt_objpack.
          lt_objpack-transf_bin = 'X'.
          lt_objpack-head_start = 1.
          lt_objpack-head_num = 1.
          lt_objpack-body_start = 1.
          lt_objpack-body_num = l_att_lines.
          lt_objpack-doc_type = 'PDF'.
          lt_objpack-obj_name = 'Pedido'.
          lt_objpack-obj_descr = 'Pedido de Compra'.
    *      lt_objpack-doc_size = ( 255 * ( l_att_lines - 1 ) ) + STRLEN( lt_objbin-line ).
          lt_objpack-doc_size = 255 * l_att_lines.
          append lt_objpack.
    * Lista de receptores
          SELECT u~bname a~smtp_addr
            FROM usr21 as u
            INNER JOIN adr6 as a
            ON u~persnumber = a~persnumber
            INTO TABLE lt_mails
            WHERE bname = receptor-objid.
          LOOP AT lt_mails.
            clear lt_reclist.
            refresh lt_reclist.
            lt_reclist-receiver = lt_mails-smtp_addr.
            lt_reclist-rec_type = 'U'.
            lt_reclist-com_type = 'INT'.
            APPEND lt_reclist.
          ENDLOOP.
    * Envio del mail
          CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
            EXPORTING
              document_data              = l_document_data
              put_in_outbox              = 'X'
              commit_work                = 'X'
            TABLES
              packing_list               = lt_objpack
              object_header              = lt_objhead
              contents_bin               = lt_objbin
              contents_txt               = lt_objtxt
              receivers                  = lt_reclist
            EXCEPTIONS
              too_many_receivers         = 1
              document_not_sent          = 2
              document_type_not_exist    = 3
              operation_no_authorization = 4
              parameter_error            = 5
              x_error                    = 6
              enqueue_error              = 7
              OTHERS                     = 8.
          IF SY-SUBRC NE 0.
            RAISE SENDING_FAILURE.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFUNCTION.

    I guess this could be one of the reasons, check you have authorizations on image.
    Regards,
    SaiRam

  • Sript pdf mail

    How to convert SAP script to pdf format and send mail?  What do we need to do in print program and configuration we need to achive?
    Thanks

    hi ,
    REPORT Z_SCRIPT .
    DATA: itcpo LIKE itcpo,
    tab_lines LIKE sy-tabix.
    Variables for EMAIL functionality
    DATA: maildata LIKE sodocchgi1.
    DATA: mailpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
    DATA: mailhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
    DATA: mailbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    DATA: mailtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    DATA: mailrec LIKE somlrec90 OCCURS 0 WITH HEADER LINE.
    DATA: solisti1 LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    PERFORM send_form_via_email.
    FORM SEND_FORM_VIA_EMAIL *
    FORM send_form_via_email.
    CLEAR: maildata, mailtxt, mailbin, mailpack, mailhead, mailrec.
    REFRESH: mailtxt, mailbin, mailpack, mailhead, mailrec.
    Creation of the document to be sent File Name
    maildata-obj_name = 'TEST'.
    Mail Subject
    maildata-obj_descr = 'Subject'.
    Mail Contents
    mailtxt-line = 'Here is your file'.
    APPEND mailtxt.
    Prepare Packing List
    PERFORM prepare_packing_list.
    Set recipient - email address here!!!
    mailrec-receiver = '[email protected]'.
    mailrec-rec_type = 'U'.
    APPEND mailrec.
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = maildata
    put_in_outbox = ' '
    TABLES
    packing_list = mailpack
    object_header = mailhead
    contents_bin = mailbin
    contents_txt = mailtxt
    receivers = mailrec
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    operation_no_authorization = 4
    OTHERS = 99.
    ENDFORM.
    Form PREPARE_PACKING_LIST
    FORM prepare_packing_list.
    CLEAR: mailpack, mailbin, mailhead.
    REFRESH: mailpack, mailbin, mailhead.
    DESCRIBE TABLE mailtxt LINES tab_lines.
    READ TABLE mailtxt INDEX tab_lines.
    maildata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( mailtxt ).
    Creation of the entry for the compressed document
    CLEAR mailpack-transf_bin.
    mailpack-head_start = 1.
    mailpack-head_num = 0.
    mailpack-body_start = 1.
    mailpack-body_num = tab_lines.
    mailpack-doc_type = 'RAW'.
    APPEND mailpack.
    Creation of the document attachment
    This form gets the OTF code from the SAPscript form.
    If you already have your OTF code, I believe that you may
    be able to skip this form. just do the following code, looping thru
    your SOLISTI1 and updating MAILBIN.
    PERFORM get_otf_code.
    LOOP AT solisti1.
    MOVE-CORRESPONDING solisti1 TO mailbin.
    APPEND mailbin.
    ENDLOOP.
    DESCRIBE TABLE mailbin LINES tab_lines.
    mailhead = 'TEST.OTF'.
    APPEND mailhead.
    Creation of the entry for the compressed attachment
    mailpack-transf_bin = 'X'.
    mailpack-head_start = 1.
    mailpack-head_num = 1.
    mailpack-body_start = 1.
    mailpack-body_num = tab_lines.
    mailpack-doc_type = 'OTF'.
    mailpack-obj_name = 'TEST'.
    mailpack-obj_descr = 'Subject'.
    mailpack-doc_size = tab_lines * 255.
    APPEND mailpack.
    ENDFORM.
    Form GET_OTF_CODE
    FORM get_otf_code.
    DATA: BEGIN OF otf OCCURS 0.
    INCLUDE STRUCTURE itcoo .
    DATA: END OF otf.
    DATA: itcpo LIKE itcpo.
    DATA: itcpp LIKE itcpp.
    CLEAR itcpo.
    itcpo-tdgetotf = 'X'.
    Start writing OTF code
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    form = 'Z08V3_COLLI'
    language = sy-langu
    options = itcpo
    dialog = ' '
    EXCEPTIONS
    OTHERS = 1.
    CALL FUNCTION 'START_FORM'
    EXCEPTIONS
    error_message = 01
    OTHERS = 02.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    window = 'MAIN'
    EXCEPTIONS
    error_message = 01
    OTHERS = 02.
    Close up Form and get OTF code
    CALL FUNCTION 'END_FORM'
    EXCEPTIONS
    error_message = 01
    OTHERS = 02.
    MOVE-CORRESPONDING itcpo TO itcpp.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    result = itcpp
    TABLES
    otfdata = otf
    EXCEPTIONS
    OTHERS = 1.
    Move OTF code to structure SOLI form email
    CLEAR solisti1. REFRESH solisti1.
    LOOP AT otf.
    solisti1-line = otf.
    APPEND solisti1.
    ENDLOOP.
    ENDFORM.
    Visit this link for SAMple code of SAPSCRIPT to PDF.:
    http://www.sapgenie.com/abap/pdf_creation.htm
    and check the following weblog for code samples.
    /people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp
    chk this one
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    some function modules useful would be
    CONVERT_OTF
    SO_NEW_DOCUMENT_ATT_SEND_API1 to send mails with attachments
    plzz refer to this link..it will solve ur problem
    Re: Sending a PDF document as an attachment
    sending the mail with PDF attachment
    regards,
    venkat.

Maybe you are looking for

  • If I want to reset my MacBook, would I have to buy all the updates again?

    I want to reset my whole MacBook Pro. 1. If I put my applications to a external hard drive will I be able to use them one I reset them? 2. Will I have to rebuy anything I bought on iTunes/Mac

  • Gifted app to android need refund

    Gifted an app to a friend that (I didn't know) had an Android so they never got the app, but i was still charged $10.21. How do I get a refund or recredited to my account?

  • I'm getting this error and to know how to stop it.

    I am getting this message sporadically but frequently. How do I stop this. I have administrator access and my disk space is plentiful. "The messages could not be filtered to folder 'Trash' because writing to folder failed. Verify that you have enough

  • JS help

    We are using this js script to help with validation. We need to add to this script the ability to replace or remove $ function validaterateS (rate) { if (rate.replace(/,/, "") < 24000){ alert("Annual Salary cannot be less than $24,000"); document.for

  • Image gallery download?

    Hi ., i'm building a flash website  and i have a xml as3 gallery and i want to know if there;s a way for the user to download the pictures? is there any code for that?  will i have to add more code to my gallery ? or it can be done ? thnks