Email attachment with didnt used EXPORTING TO MEMORY

Hi Expert,
For my development I cant using below abap code because I getting short dump when trying to execute the SAP Standard Program "RM06WCD1". When trying other program that is working fine.
SUBMIT (report_name)
         USING SELECTION-SET p_var
         EXPORTING LIST TO MEMORY AND RETURN.
So I trying to use it with FM "Job Open" and FM "Job Close" and it was working fine with the following submit statement.
  SUBMIT (report_name)
   USING SELECTION-SET p_var
         VIA JOB l_name NUMBER l_number  AND RETURN.
and I using this fm "RSPO_RETURN_ABAP_SPOOLJOB" to get the data from the spool.
But I stuck in develop in emailing with the htm attachment part. I have no idea on how to split my line item because the content will be different based on the report that calling.
Have any expert here got any idea on the way to solve for this issue?
Thanks.

Hi,
I don't understand what your issue is exactly. RSPO_RETURN_ABAP_SPOOLJOB returns the lines of a  spool of type "ABAP list" in an internal table. Each line of the internal table corresponds to one line, so what do you mean by "split"?
Or does RM06WCD1 generate a spool of type "SAPscript/Smart form"? In that case, you shouldn't use RSPO_RETURN_ABAP_SPOOLJOB, but use CONVERT_OTFSPOOLJOB_2_PDF to send it as mail. Moreover, a standard function allows to send directly outputs as a mail.
BR
Sandra

Similar Messages

  • Get file name of an email attachment with sql query

    Hi all,
    How can I get the file name of an email attachment with a sql or pl/sql query?
    Thanks in advance.
    Edited by: JonasZzZz on Sep 14, 2009 10:52 AM

    Hi, anynone? please..

  • Email attachment with .txt file (first line blank in the file)

    Hi all ,
    Iam trying attach .txt file to email , the file that iam accessing from server  . But first line blank (extra) even though i dont have blank line in original file .Can any help me out to resolve this issue?
    <u>Example</u> original file
    12345     aa    pq
    <u>Email attachment file</u>
                                        -> This line
    12345     aa    pq
    This is my code:
    REPORT  ZTEST_FILE  .
    DATA:BEGIN OF t_upload occurs 0,
           matnr LIKE zwplcsmev-matnr,
           zwgehrrg LIKE zwplcsmev-zwgehrrg,
           zwgehrct LIKE zwplcsmev-zwgehrct,
           zwgbev LIKE   zwplcsmev-zwgbev,
           zwpldt LIKE zwplcsmev-zwpldt,
           zwacdt LIKE zwplcsmev-zwacdt,
         END OF t_upload.
    *DATA:  maildata type sodocchgi1.
    *DATA:  mailtxt type table of solisti1 with header line.
    *DATA:  mailrec type table of somlrec90 with header line.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:REC(80) TYPE C.
    DATA g_mask(20) TYPE c VALUE ',., ..'.
    DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:P_ERROR(3).
    DATA:P_REFO(3).
    DATA:   gd_error TYPE sy-subrc,
            gd_reciever TYPE sy-subrc.
    DATA:   t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
            t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            w_cnt TYPE i,
            w_sent_all(1) TYPE c,
            w_doc_data LIKE sodocchgi1.
    selection-screen begin of block b1 with frame title text-001.
    parameters:p_file type localfile.
    parameter:p_email type ad_smtpadr.
    selection-screen end of block b1.
    --At Selection-Screen- -
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'TB_LIMIT_WS_FILENAME_GET'
          EXPORTING
            def_filename     = p_file
            mask             = g_mask
         mode             = 'S'
            title            = 'INPUT FILE'
          IMPORTING
            filename         = p_file
          EXCEPTIONS
            selection_cancel = 1
            selection_error  = 2
            OTHERS           = 3.
      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.
      PERFORM process_file.
      if p_error = 'X' AND P_REFO <> 'X'.
      PERFORM populate_message_body.
      ENDIF.
      IF P_REFO = 'X' AND P_ERROR <> 'X'.
      it_message = 'Please find Attached file'.
      APPEND it_message.
      PERFORM send_attachment tables it_message
                                 it_attach
                          using  p_email
                         'Crest to Plc Data'
                                          'TXT'
                                          p_file
                                 changing gd_error
                                          gd_reciever.
      ENDIF.
      Instructs mail send program for SAPCONNECT to send email(rsconn01)
    PERFORM initiate_mail_execute_program.
    END-OF-SELECTION.
    *&      Form  process_file
          text
    FORM process_file.
    *CONSTANTS: con_cret TYPE x VALUE '0D',  "OK for non Unicode
                con_tab TYPE x VALUE '09'.   "OK for non Unicode
      DATA :l_path TYPE  string.
      l_path = p_file.
    CONSTANTS:  con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB
      con_cret type c value cl_abap_char_utilities=>newline.
    OPEN DATASET P_FILE  FOR INPUT IN TEXT MODE encoding default.
    if sy-subrc = 0.
    do.
    read dataset p_file into IT_ATTACH.
    IF SY-SUBRC  NE 0 .
    EXIT.
    ELSE.
    T_UPLOAD = IT_ATTACH.
    CONCATENATE con_cret it_attach  INTO it_attach .
    append it_attach.
    clear it_attach.
    P_REFO = 'X'.
    APPEND T_UPLOAD .
    clear t_upload.
    ENDIF.
    ENDDO.
    else.
    p_error = 'X'.
    ENDIF.
    ENDFORM.                    "process_file
    *&      Form  populate_message_body
          text
    FORM populate_message_body.
    w_doc_data-obj_name = 'TEST'.
      w_doc_data-obj_descr = 'Crest to Plc Data'.
      w_doc_data-obj_langu = sy-langu.
      it_message = 'File Not Found'.
      APPEND it_message.
    t_receivers-receiver = p_email.
      t_receivers-rec_type = 'U'.
      append t_receivers.
      call function 'SO_NEW_DOCUMENT_SEND_API1'
           exporting
                document_data              = w_doc_data
                document_type              = 'RAW'
                put_in_outbox              = 'X'
           tables
                object_header              = it_message
                object_content             = it_message
                receivers                  = t_receivers
           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.
      commit work.
        SUBMIT rsconn01 USING SELECTION-SET 'SAP&CONNECTINT' AND RETURN.
      else.
        MESSAGE s027(vv) WITH 'E-mail not sent'.
      endif.
    ENDFORM.                    "populate_message_body
    *&      Form  send_attachment
          text
    FORM send_attachment tables pit_message
                                pit_attach
                         using  p_email
                                p_mtitle
                                p_format
                                p_filename
                                p_attdescription
                                p_sender_address
                                p_sender_addres_type
                       changing p_error
                                p_reciever.
      DATA:   ld_error    TYPE sy-subrc,
              ld_reciever TYPE sy-subrc,
              ld_mtitle LIKE sodocchgi1-obj_descr,
              ld_email LIKE  somlreci1-receiver,
              ld_format TYPE  so_obj_tp ,
              ld_attdescription TYPE  so_obj_nam ,
              ld_attfilename TYPE  so_obj_des ,
              ld_sender_address LIKE  soextreci1-receiver,
              ld_sender_address_type LIKE  soextreci1-adr_typ,
              ld_receiver LIKE  sy-subrc.
      ld_email  = p_email.
      ld_mtitle = p_mtitle.
      ld_format = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
      w_doc_data-doc_size = 1.
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = pit_attach[].
      clear t_attachment.
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data              = w_doc_data
          put_in_outbox              = 'X'
          sender_address             = ld_sender_address
          sender_address_type        = ld_sender_address_type
          commit_work                = 'X'
        IMPORTING
          sent_to_all                = w_sent_all
        TABLES
          packing_list               = t_packing_list
          contents_bin               = t_attachment
          contents_txt               = it_message
          receivers                  = t_receivers
        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.
        commit work.
        SUBMIT rsconn01 USING SELECTION-SET 'SAP&CONNECTINT' AND RETURN.
      else.
        MESSAGE s027(vv) WITH 'E-mail not sent'.
      endif.
    Populate error return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.                    "send_attachment

    Just copy the code below and execute . I just checked and found the exact values on attachment with no blank lines. This is more simple than the one u have written , just include ur data upload logic . For ITAB values to be attached i have written a simple logic to retrive from EKPO. Just copy this code and execute. u will understand then.
    I understand that ur initial requirement was to attach the file directly and not to upload and attach. If u still want to go for the old requirement then check out the code(2nd program of the two that i have sent) that i have sent u on ur previous post.
    REPORT  ZEMAIL_ATTACH                   .
    TABLES: ekko.
    PARAMETERS: p_email   TYPE somlreci1-receiver
                                      DEFAULT '[email protected]'.
    TYPES: BEGIN OF t_ekpo,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
          wa_ekpo TYPE t_ekpo.
    TYPES: BEGIN OF t_charekpo,
      ebeln(10) TYPE c,
      ebelp(5)  TYPE c,
      aedat(8)  TYPE c,
      matnr(18) TYPE c,
    END OF t_charekpo.
    DATA: wa_charekpo TYPE t_charekpo.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
            t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            w_cnt TYPE i,
            w_sent_all(1) TYPE c,
            w_doc_data LIKE sodocchgi1,
            gd_error    TYPE sy-subrc,
            gd_reciever TYPE sy-subrc.
    *START_OF_SELECTION
    START-OF-SELECTION.
      Retrieve sample data from table ekpo
      PERFORM data_retrieval.
      Populate table with detaisl to be entered into .xls file
      PERFORM build_TXT_data_table.
    *END-OF-SELECTION
    END-OF-SELECTION.
    Populate message body text
      perform populate_email_message_body.
    Send file by email as .TXT speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_message
                                          it_attach
                                    using p_email
                                          'Example .TXT documnet attachment'
                                          'TXT'
                                          'filename'
                                 changing gd_error
                                          gd_reciever.
      Instructs mail send program for SAPCONNECT to send email(rsconn01)
      PERFORM initiate_mail_execute_program.
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp aedat matnr
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekpo.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  BUILD_TXT_DATA_TABLE
          Build data table for .txt document
    FORM build_txt_data_table.
      CONSTANTS: con_cret TYPE x VALUE '0D',  "OK for non Unicode
                 con_tab TYPE x VALUE '09'.   "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
       con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
       con_cret type c value cl_abap_char_utilities=>CR_LF.
      CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
             INTO it_attach  SEPARATED BY SPACE . "con_tab.
    CONCATENATE con_cret it_attach  INTO it_attach." Use this if req.
      APPEND  it_attach.
      LOOP AT it_ekpo INTO wa_charekpo.
        CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
                    wa_charekpo-aedat wa_charekpo-matnr
               INTO it_attach SEPARATED BY SPACE ."con_tab.
       CONCATENATE con_cret it_attach  INTO it_attach." Use this if req.
        APPEND  it_attach.
      ENDLOOP.
    ENDFORM.                    " BUILD_txt_DATA_TABLE
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables pit_message
                                              pit_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = pit_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           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.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                    WITH output = 'X'
                    AND RETURN.
    ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
           Populate message body text
    form populate_email_message_body.
      REFRESH it_message.
      it_message = 'Please find attached a list test ekpo records'.
      APPEND it_message.
    endform.                    " POPULATE_EMAIL_MESSAGE_BODY
    execute this code and i hope that will help u.
    regards,
    Barath.

  • Email attachment with a BLOB

    Hi
    Can somebody help or give me the step how to sent an emai with a BLOB?
    l

      I found that you can encrypt a message, but could not figure out how to assign a password.  I guess that is why.  Is there an Adobe product that can allow you to encrypt an email attachment and assign a password?
    Charlene C. Jackson
    Executive Assistant to Lawrence D. Garr, Esq.
    Garr Tax Law, PLLC
    1875 Eye Street, NW
    Suite 500
    Washington, DC  20006
    202-650-0335 – office
    202-478-5018 – fax
    [email protected]<mailto:[email protected]>
    Confidentiality Statement
    This email message and any attached files are confidential and are intended solely for the use of the addressee(s) named above. This communication may contain material protected by attorney-client, work product, or other privileges. If you are not the intended recipient or person responsible for delivering this confidential communication to the intended recipient, you have received this communication in error, and any review, use, dissemination, forwarding, printing, copying, or other distribution of this email message and any attached files is strictly prohibited. Garr Tax Law, PLLC reserves the right to monitor any communication that is created, received, or sent on its network. If you have received this confidential communication in error, please notify the sender immediately by reply email message and permanently delete the original message.

  • How to email attachment on ipad using gmail

    I can't figure out how to include an attachment with an email through gmail?
    Thanks

    I have a simple solution.
    From your browser, NOT an app. So in Safari, Chrome, Mozilla, Explorer.
    Go to drive.google.com and login, if you aren't already (be sure to use desktop format and not mobile)
    Choose the document you want to send and open it (this should direct you to docs)
    When you have your document open please click file in the upper left and scroll down to email as attachment
    There is a dropdown menu for "Attach As" where you may choose your file format
    Below that follow like any other email: To, Subject, Message
    Hit send, now you've attached and sent your file

  • Programmaticaly attachement with outlook using java

    Hi All,
    I used this code                   Runtime.getRuntime().exec(
                   new String[] {"rundll32", "url.dll,FileProtocolHandler",
                   "mailto:" + "&subject=" + "testmail" + "&attachment="+"\"" + "C:\\test.txt" + "\""}, null
    Once execute, it will open outlook express along with subject, but without attachment.
    I want to send the attachment programmatically using java..
    If anybody come across this issues, share your ideas...
    Edited by: SARAV_RS on Dec 28, 2008 11:09 PM

    First thing, it's not only for Outlook or windows. I need to check which email application is being using
    like outlook,Thunderbird,.
    The file is attached programmatic to the corresponding mail application. Those files are
    getting from server side (databases).
    In jsp,
    <a href="mailto:?subject=Pictures from PhotoAlbum&cc= &body=This is the body text&attachment="c:\test.txt'">Email</a><br>{code}
    mailto function works only in client side as of my knowledge. We can't use attachment.
    Give me any suggestions.
    Edited by: SARAV_RS on Dec 29, 2008 3:21 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to email a pdf file (attachment with password) using ABAP?

    Hi Colleagues,
    I
    n abap, how do you email a pdf file that contains password?
    (pdf with password, not the whole email).
    A custom program is created. Inside this program, it
    retrieves the spool number and converts it to a pdf file
    (using function module '....abapspool...'). No parameter to put password.
    I was able to do the above. The problem is how to put password on
    the pdf file.
    Once the user receives the email (say from hotmail or outlook) with pdf attachment, clicks on the pdf, it will as ask for an attachment.
    sap version 4.7.
    Questions:
    - how to code in ABAP to include the pdf with password in an email
    received from hotmail or outlook?
    - any function modules or classes that can do the pdf password?
    - do we need to install another technology or add-on application or
    ???? to do it? If yes, do we code in abap?
    - any other ideas?
    Thanks in advance.
    Raymund

    Hi Colleagues,
    I
    n abap, how do you email a pdf file that contains password?
    (pdf with password, not the whole email).
    A custom program is created. Inside this program, it
    retrieves the spool number and converts it to a pdf file
    (using function module '....abapspool...'). No parameter to put password.
    I was able to do the above. The problem is how to put password on
    the pdf file.
    Once the user receives the email (say from hotmail or outlook) with pdf attachment, clicks on the pdf, it will as ask for an attachment.
    sap version 4.7.
    Questions:
    - how to code in ABAP to include the pdf with password in an email
    received from hotmail or outlook?
    - any function modules or classes that can do the pdf password?
    - do we need to install another technology or add-on application or
    ???? to do it? If yes, do we code in abap?
    - any other ideas?
    Thanks in advance.
    Raymund

  • Trapping invalid email address with batch use of SO_NEW_DOCUMENT_SEND_API1

    Hi there,
    Am using SO_NEW_DOCUMENT_SEND_API1 in batch to issue emails containing multiple  blind copied recipients. I load recipient email addresses into RECLIST (see below line)
    "DATA: RECLIST       LIKE SOMLRECI1  OCCURS 0 WITH HEADER LINE.
    I have two problems. My first problem is if any one email address in a batch of 10 recipients is formated incorrectly, none of 10 recipients receive emails. My second problem is "incorrect" email addresses. While these do not prevent the remaining 9 emails being  delivered I would also like to capture these. How might I capture these 2 conditions at or immediately after function module execution for batch reporting ?
    Thank you for your time and help, Harold

    Hi All,
             I have not used that parameter ( Contents_bin ).Its in disable mode only.see my code below and please tell me how to avoid it.
    DESCRIBE TABLE i_body LINES g_att_lines.
    READ TABLE i_body INTO lw_body INDEX g_att_lines.
    gd_doc_data-doc_size = ( g_att_lines - 1 ) * 255 + STRLEN( lw_body ).
    lw_packing_list-transf_bin = space.
    lw_packing_list-head_start = 1.
    lw_packing_list-head_num   = 0.
    lw_packing_list-body_start = 1.
    lw_packing_list-body_num   = g_att_lines.
    lw_packing_list-doc_type   = 'RAW'.
    lw_packing_list-doc_size   = 255 *  g_att_lines.
    APPEND lw_packing_list TO i_packing_list .
    CLEAR lw_packing_list.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        document_data                    = gd_doc_data
        put_in_outbox                    = 'X'
        commit_work                      = 'X'
    IMPORTING
      SENT_TO_ALL                      =
      NEW_OBJECT_ID                    =
      TABLES
        packing_list                     = i_packing_list
        object_header                    = i_context
        contents_txt                     = i_body
        receivers                        = i_receivers
    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          .
    Regards,
    Rakesh.

  • Email Attachment with display template

    Hi All,
        I would like to send an E-mail  with attachments like Table and the iChart.
    I have the Sql query with selected columns and the display template.
    I would like to attach the display template(iChart) and the Selected Table fields. Is it possible to do this.
    my BLT Actions are 1. PDF Document
                               2.SQL Query with selected columns
                               3. PDF Table
                               4.Email
    where can i insert the ichart in the above series?.
    Thanks
    Muvva

    Use a Chart action block with your query and display templates to generate an encoded image.  Create a PDF Document.  Use the PDF Image action block to attach the chart encoded image to your PDF.  Create your email with a PDF attachment.  And send your email.
    Good luck,
    Mike

  • Creating email attachment with 255 char per record

    Hi,
    We want to generate an email with excel attachment through ABAP program. To do the same, we are trying to use FM 'SO_DOCUMENT_SEND_API1'.
    It looks like it only allows 255 characters per record however we want include upto 700 chracters per record. Does anyone know a way out to overcome this problem?
    Note - We do not want to wrap the text to next line.
    Thank you

    Hi:
    I would advice to make the copy of this function module SO_DOCUMENT_SEND_API1 and change the  packing_list-doc_size = '700'..
    Hopefully it would be helpful to solve the problem.
    Regards
    Shashi

  • HT5663 why I can not open an icloud email attachment with iworks application in icloud directly?

    Hi,
    I like this iwork solution in icloud, but the integrity might be developed more. If I got an email to my icloud inbox, I can not open it with iworks application but it will be downloaded instead. It would be very useful to be able to open an attachment onsite, using one of the iworks app.
    thanks
    janos

    Let Apple know...
    http://www.apple.com/feedback/

  • Sending Email Attachment from UNIX using UUENCODE Command

    Hi,
    We are using "uuencode" command to send the mail with attachment to particular user but we are getting the mail without attachment, it's printing ASCII characters in mail body.
    The command is:
    uuencode $XXAR_TOP/out/${v_request_id}.csv.gz ${v_request_id}.csv.gz) |
    mailx -s "Invoice Information Extract" $v_email_recipient
    My requirement is to send the PDF file as an attachment.
    Any setups or configuration required in UNIX box to get an attachment.
    Advance Thanks
    Subbu

    I need to send the PDF or zip file as an attachment through mail,
    I tried with uuencode, it's not giving any error message but the mail recipient has only a mail with unreadable text because the pdf/zip file is directly in the mail (not as attachment).
    How to send the file as an attachment from unix?
    Advance Thanks
    Subbu

  • Can't access onscreen keyboard while sending email attachment with pages

    Hi everyone! I desperately need your help.
    When first downloaded the pages app on my Ipad, I was able to use the toolbar (on pages) and directly attach documents and send them as an email.  Now, whenever I do it, I cannot tap to add an email address, subject, or message and the onscreen keyboard will not show up!  The only thing I can tap is to cancel.  Everything else works on Pages.  I can tap on an area and the keyboard shows up.  Plese help!!!
    Thank you!!!

    Seems the Router must've gotten something set/reset wrong, not sure... maybe... Port Forwarding, or Firewall settings, or...

  • Email attachements with video won't play

    I am slowly figuring out the palm pre i have my email account through msn, and i can not watch any attachments that have video cause i get a message saying that cant find a application that supports it and can not find a app that will play them, can anyone suggest something if one exists. thanks
    Post relates to: Pre p100eww (Bell)

    I am not overly computer literate, but after the title of whatever was sent it just says mpg

  • Email with text attachment with line width 1250

    Dear all,
                 I want to send the email with text attachment whose line width in text file is 1250. Kindly let me know how to send email attachment with more than 255 line width.
    Regards,
    Manoj
    Moderator Message: Frequently Asked Question. Please search for available information before posting.
    Edited by: kishan P on Apr 29, 2011 2:48 PM

    Hi,
    What ever text you are sending in the email, create a standard text for it using tcode SO10. In the program use the FM READ_TEXT to get the data into internal table which will be of length 132 char. If you want line widht of 255 chars convert using FM SX_TABLE_LINE_WIDTH_CHANGE as below,
    CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
        EXPORTING
          line_width_dst              = '255'
        TABLES
          content_in                  =  it_data
          content_out                 = it_mess_att
        EXCEPTIONS
          err_line_width_src_too_long = 1
          err_line_width_dst_too_long = 2
          err_conv_failed             = 3
          OTHERS                      = 4.
    Use FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send email.
    Hope this will help you.
    regards,
    Tulasi.

Maybe you are looking for