Problem in executing report for sending mail with form as attachment

Hi
i created a form in SFP and creted a report for sending it as an attachment via email.When it execute the report an error messgae is displyed saying: Unable to load form for language vector E.
Please suggest.

Hi,
Do you use CL_BCS class to send your forms ?
Did you pass the forms as binary file to the mail ?
I can give you sample code where all exception are process and you can see the exact error .
Best regards.

Similar Messages

  • Problem assigning an account for sending mail from external mail app

    Good morning , i have an IPhone 4s 16gb with IOS 7.0.6 and even in setting-mail and calendar i have setup the default account to use for sending mail outside mail app it use ICloud mail account.
    if i select Icloud account and then my gmail account sometimes works but after some days it start again to use the other account...i don't know if it is when i power off the IPhone...if i look into settings-mail and calendar account selected is gmail even the account used is the ICloud.
    i think is a IOS bug.
    please let me know.
    Best regards

    Jun T. wrote:
    But there is a (high) possibility that Gmail's server requires authentication (or certification) to connect to it.
    I wonder if they're simply silently dropping emails in certain cases. I forgot earlier that I have a Gmail account. If I send an email from the command line on my home computer, which is on Comcast, the mail log shows that I successfully connect to Gmail, the message is sent and accepted by Gmail, but the email never arrives in my inbox. I've tried several times with the same result.
    However, emails from a web server from work get through to Gmail without a problem. So I'd bet it's a case of them not delivering mail from Comcast IP addresses.
    For grins, I also tried sending to my Yahoo email account from my home computer and their server at least refuses the connection and I get an error message stating that it's because it's a residential IP address.
    In this case you need an SMTP client (=a software which directly sends the mail to the Gmail server) which supports authentication.
    I think this might also be possible with Postfix by editing the configuration files. I know I had to set up authentication to send emails to my work address directly from my home computers, but I haven't been able to get the same thing to work with Gmail yet. If I get a chance, I'll look into it again later tonight.
    charlie

  • How ca i create a stationery for sending mail with my letter head and logo etc.

    I want to use a stationery with my letter head and logo for sending mails. Please tell me how can I create my page.

    http://kb.mozillazine.org/Thunderbird_:_FAQs_:_Using_Templates

  • Sending mail with PDF file attachment ?

    Hi All,
    I have scenario File ---> Mail, monitoring FTP directory for PDF file and sending using mail attachment.
    At the moment i am using JAVA mapping to construct the mail package structure follow all the step in this blog : XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
    it is working if i am using text file but then how to encode the pdf content so i can send throught the mail adapter. ?
    Thank you and Best Regards
    Fernand

    Hi,
    Actually, i am using this java code below :
    try {
        //     create XML structure of mail package
        String output = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
               + "<ns:Mail xmlns:ns=\"http://sap.com/xi/XI/Mail/30\">"         
               + "<Subject>" + mailSubject     + "</Subject>"
               + "<From>" + mailSender     + "</From>"
               + "<To>" + mailReceiver     + "</To>"
               + "<Content_Type>multipart/mixed; boundary=\"" + boundary + "\"</Content_Type>"
               + "<Content>";
        out.write(output.getBytes());
        // create the declaration of the MIME parts
        //First part
        output = "--" + boundary + CRLF
               + "Content-Type: text/plain; charset=UTF-8" + CRLF
               //+ "Content-Transfer-Encoding: 8bit" + CRLF
               + "Content-Disposition: inline" + CRLF + CRLF
               + mailContent + CRLF
        //Second part
        + "--" + boundary + CRLF
        + "Content-Type: Application/pdf; name=" + attachmentName + CRLF  
        //+ "Content-Transfer-Encoding: base64" + CRLF
        + "Content-Disposition: attachment; filename=" + attachmentName + CRLF + CRLF;
        out.write(output.getBytes());
        //Source is taken as attachment
        copySource(in, out);
        out.write("</Content></ns:Mail>".getBytes());
      } catch (IOException e) {
        throw new StreamTransformationException(e.getMessage());
    protected static void copySource(InputStream in, OutputStream out)
         throws IOException {
        byte[] bbuf = new byte[in.available()];
        int bblen = in.read(bbuf);
        if (!(bblen < 0)) {
          //String sbuf = new String(bbuf);
          //String encoded = Base64.encode(sbuf);
          // replace all control characters with escape sequences
          //sbuf = sbuf.replaceAll("&", "&amp;");
          //sbuf = sbuf.replaceAll("\"", "&quot;");
          //sbuf = sbuf.replaceAll("'", "&apos;");
          //sbuf = sbuf.replaceAll("<", "&lt;");
          //sbuf = sbuf.replaceAll(">", "&gt;");
          out.write(bbuf);
    This code working fine with text file but not for pdf file. because i got error in mail adapter :
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.messaging.util.XMLScanException: java.lang.NullPointerException; nested exception caused by: com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 8f(:main:, row:11, col:4)(:main:, row=11, col=4) -> com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 8f(:main:, row:11, col:4)
    I guest the problem because the mail adapter doen't accept pdf content insite the mail package.
    please advise me
    Best Regards
    Fernand

  • Problem in excel format while sending mail with excel attachment.

    Hi Gurus ,
    I am sending a email with Excel attachment using FM SO_DOCUMENT_SEND_API1 or SO_NEW_DOCUMENT_ATT_SEND_API1.
    I am able to send a mail with excel attachment with a piece of code which I got from SDN itself.
    But the problem is when I am trying to open the attachment, <b>A pop up comes which says that it is not in recognizable format. Would you like to open it?
    and several other lines of caution.</b>
    When i choose to open it, i get the correct data in one excel sheet. Certain vertical lines of the excel sheet is missing. <b>But no data is missing. </b>
    I am attaching the code below. Can any one please tell me where is the problem in this code ?
    Thanx in advance
    types: begin of t_mara,
    matnr type mara-matnr,
    matkl type mara-matkl,
    mtart type mara-mtart,
    meins type mara-meins,
    end of t_mara.
    data: gt_mara type table of t_mara,
    wa_mara like line of gt_mara,
    it_packing_list type table of SOPCKLSTI1,
    wa_packing_list like line of it_packing_list,
    it_receivers type table of SOMLRECI1,
    wa_receivers like line of it_receivers,
    it_mailbody type table of SOLISTI1,
    wa_mailbody like line of it_mailbody,
    it_attachment type table of SOLISTI1,
    wa_attachment like line of it_attachment.
    data: la_doc type SODOCCHGI1.
    constants:
    con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
    con_cret type c value cl_abap_char_utilities=>CR_LF.
    * get material
    select matnr matkl mtart meins
    into table gt_mara
    from mara
    up to 25 rows.
    * Populate the subject/generic message attributes
    la_doc-obj_langu = sy-langu.
    la_doc-obj_descr = 'Material Details' . "Mail Header
    la_doc-sensitivty = 'F'.
    la_doc-doc_size = 1.
    * Add the recipients email address
    CLEAR wa_receivers.
    REFRESH it_receivers.
    wa_receivers-receiver = 'PCSDEVL'.
    wa_receivers-rec_type = 'U'.
    wa_receivers-com_type = 'INT'.
    wa_receivers-notif_del = 'X'.
    wa_receivers-notif_ndel = 'X'.
    APPEND wa_receivers to it_receivers.
    * Mail Body
    CLEAR wa_mailbody.
    REFRESH it_mailbody.
    wa_mailbody-line = 'Please find the attachment'.
    APPEND wa_mailbody to it_mailbody.
    * Mail attachmwnt
    CLEAR wa_attachment.
    REFRESH it_attachment.
    CONCATENATE 'MATNR' 'MATKL' 'MTART' 'MEINS'
    INTO wa_attachment SEPARATED BY con_tab.
    CONCATENATE con_cret wa_attachment INTO wa_attachment.
    APPEND wa_attachment to it_attachment.
    LOOP AT gt_mara INTO wa_mara.
    CONCATENATE wa_mara-matnr wa_mara-matkl
    wa_mara-mtart wa_mara-meins
    INTO wa_attachment SEPARATED BY con_tab.
    CONCATENATE con_cret wa_attachment INTO wa_attachment.
    APPEND wa_attachment to it_attachment.
    ENDLOOP.
    * Describe the body of the message
    CLEAR wa_packing_list.
    REFRESH it_packing_list.
    wa_packing_list-transf_bin = space.
    wa_packing_list-head_start = 1.
    wa_packing_list-head_num = 0.
    wa_packing_list-body_start = 1.
    wa_packing_list-body_num = 1.
    wa_packing_list-doc_type = 'RAW'.
    APPEND wa_packing_list to it_packing_list.
    * Create attachment notification
    wa_packing_list-transf_bin = 'X'.
    wa_packing_list-head_start = 1.
    wa_packing_list-head_num = 1.
    wa_packing_list-body_start = 1.
    DESCRIBE TABLE it_attachment LINES wa_packing_list-body_num.
    wa_packing_list-doc_type = 'XLS'. " To word attachment change this as 'DOC'
    wa_packing_list-obj_descr = ' '.
    concatenate wa_packing_list-doc_type 'file' into wa_packing_list-OBJ_DESCR
    separated by space.
    wa_packing_list-doc_size = wa_packing_list-body_num * 255.
    APPEND wa_packing_list to it_packing_list.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
    document_data = la_doc
    PUT_IN_OUTBOX = 'X'
    * SENDER_ADDRESS = SY-UNAME
    * SENDER_ADDRESS_TYPE = 'B'
    COMMIT_WORK = 'X'
    * IMPORTING
    * SENT_TO_ALL =
    * NEW_OBJECT_ID =
    * SENDER_ID =
    tables
    packing_list = it_packing_list
    * OBJECT_HEADER =
    CONTENTS_BIN = it_attachment
    CONTENTS_TXT = it_mailbody
    * CONTENTS_HEX =
    * OBJECT_PARA =
    * OBJECT_PARB =
    receivers = it_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.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.

    REPORT  Zex5 LINE-SIZE 255 LINE-COUNT 255 .
    class CL_ABAP_CHAR_UTILITIES definition load. "-->
    TABLES : vbap.
    SELECT-OPTIONS: s_vbeln FOR vbap-vbeln.
    DATA : BEGIN OF itab OCCURS 1,
           vbeln LIKE vbap-vbeln,
           posnr LIKE vbap-posnr,
           matnr LIKE vbap-matnr,
           END OF itab.
    parameters : p_email like somlreci1-receiver
    DATA: tlines type i.
    DATA: itmessage   LIKE solisti1 OCCURS 1 WITH HEADER LINE. "Ok
    DATA: itattach    LIKE solisti1 OCCURS 2 WITH HEADER LINE. "Ok
    DATA: itpacklist  LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
    DATA: itreclist   LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
    data: itattachment like solisti1 OCCURS 2 WITH HEADER LINE.
    start-of-selection.
      SELECT vbeln posnr matnr
             FROM vbap
             INTO TABLE itab
             WHERE vbeln IN s_vbeln.
    **Make the internal table data to be compatible in excel format .
      PERFORM BUILD_XLS_FORMAT.
    **Populate message of body text.
      clear itmessage.
      refresh itmessage.
      itmessage = 'Please find attached Excel file'.
      append itmessage.
      PERFORM send_mail_as_xls_attachment tables itmessage
                                                 itattach
             using p_email 'Excel Attachment' 'TXT'    " 'XLS'
              using p_email 'TEXT Attachment' 'TXT'    " 'XLS'
                            'TestFileName'
                            'SalesOrders' .
    *&      Form  BUILD_XLS_FORMAT
          text
    -->  p1        text
    <--  p2        text
    form BUILD_XLS_FORMAT.
    previosuly we were using for unicode ..now replaced
    **Declare constants for the spacing .
    *Constants : con1 type x value '0D',
               con2 type x value '09'.
      Constants : con1 type c
            value CL_ABAP_CHAR_UTILITIES=>CR_LF,
            con2 type c
            value CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    **For the Header descriptions.
      Concatenate 'SalesORdNo'
                  'Item'
                  'Materialno' into itattach separated by con2.
      Concatenate con1 itattach into itattach.
      Append itattach.
    **Now align the items in the itab as above .
      Loop at Itab.
        concatenate itab-vbeln
                    itab-posnr
                    itab-matnr into itattach separated by con2.
        concatenate con1 itattach into itattach .
        Append itattach.
      endloop.
    endform.                    " BUILD_XLS_FORMAT
    *&      Form  send_mail_as_xls_attachment
          text
         -->P_ITMESSAGE  text
         -->P_ITATTACH  text
         -->P_P_EMAIL  text
         -->P_0116   text
         -->P_0117   text
         -->P_0118   text
         -->P_0119   text
    form send_mail_as_xls_attachment tables   p_itmessage
                                              p_itattach
                                     using    p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription.
      Data : xdocdata like sodocchgi1,
             xcnt type i.
    *Fill the document data.
      xdocdata-doc_size = 1.
    *Populate the subject/generic message attributes.
      xdocdata-obj_name  = 'SAPRPT'.
      xdocdata-obj_langu = sy-langu.
      xdocdata-obj_descr = p_mtitle.
    *Fill the document data and fetch size of attachment.
      clear xdocdata.
      read table itattach index xcnt.
      xdocdata-doc_size = ( xcnt - 1 ) * 255 + strlen( itattach ).
    xdocdata-doc_size =  ( xcnt - 1 ) * 255.
      xdocdata-obj_name  = 'SAPRPT'.
      xdocdata-obj_langu = sy-langu.
      xdocdata-obj_descr = p_mtitle.
      clear itattachment. refresh itattachment.
         itattachment[] = p_itattach[].
    *Describe the body of the message.
      clear itpacklist. refresh itpacklist.
      itpacklist-transf_bin = 'X'.
      itpacklist-head_start = '1'.
      itpacklist-head_num = '0'.
      itpacklist-body_start = '1'.
      describe table itattachment lines itpacklist-body_num .
      itpacklist-doc_type = 'TXT'.
    itpacklist-doc_type = 'XLS'.
      append itpacklist.
    *Create attachment notification.
      itpacklist-transf_bin = 'X'.
      itpacklist-head_start = '1'.
      itpacklist-head_num = '1'.
      itpacklist-body_start = '1'.
      describe table itattachment lines itpacklist-body_num .
      itpacklist-doc_type = p_format.
      itpacklist-obj_name = p_filename.
      itpacklist-obj_descr = p_attdescription.
      itpacklist-doc_size = itpacklist-body_num * 255 .
      append itpacklist.
    *FIll the receivers list.
      Clear itreclist. refresh itreclist.
      itreclist-receiver = p_email.
      itreclist-rec_type = 'U'.
      itreclist-com_type = 'INT'.
      itreclist-notif_del = 'X'.
      itreclist-notif_ndel = 'X'.
    *itreclist-notif_read = 'X'.
      append itreclist.
    *CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
      document_data                    = xdocdata
      PUT_IN_OUTBOX                    = 'X'
      commit_work    = 'X'
      SENDER_ADDRESS                   = SY-UNAME
    tables
       packing_list                    = itpacklist
       CONTENTS_BIN                    = itattachment
       CONTENTS_TXT                    = itmessage
       receivers                       = itreclist
    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 SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = xdocdata
          PUT_IN_OUTBOX              = 'X'
        TABLES
          packing_list               = itpacklist
          CONTENTS_BIN               = itattachment
          CONTENTS_TXT               = itmessage
          receivers                  = itreclist
        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 SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endform.                    " send_mail_as_xls_attachment
    Just execute the above code and let me know.
    What is the sap version u r using .
    Vijay

  • Problem in sending mail with a xls attachment

    Hi,
    I have a problem in a program that I created.
    The program sends a email via internet to user with a excel attachment.
    In SOST its showing as a file with .xls attachment which opens in MS excel.
    But the actual mail which the user gets is a .dat file
    what can be the reason
    Edited by: ANURAG GOGOI on Oct 23, 2008 1:55 PM

    Anurag:
    You need to set the DOC_TYPE value to 'XLS' in the packing List header (structure SOPCKLSTI1).
    Note: The 'XLS' value isn't listed as a possible value in the domain value list for DOC_TYPE, but it will be allowed.
    Regards,
    D.

  • How to send mail with cc and attachment

    please provide code for sending a file with attchment in cc also

    HI Rajesh,
    There is a standard structure for Receiver Mail adopter which we can get from SAP market Place but it is not provided with CC if u want to use CC then you have to go with Dynamic Configuration.
    DynamicConfiguration configuration = (DynamicConfiguration) container.getTransformationParameters().getStreamTransformationConstants.DYNAMIC_CONFIGURATION);
    /*any other required fields*/
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail", "THeaderCC");
    configuration.put(key, "ccemail @ test.com");
    Regards
    Praveen Reddy
    Edited by: Maareddy Praveen Reddy on Aug 10, 2011 12:17 PM

  • Send Mail with PDF as attachment using Simple mail Option to multiple addre

    Hi all,
    I have a requirement to send the form as attachment to the multiple addresses maintained.
    I want to know the procedure to retrieve all those addresses.
    I am aware of the complete procedure of getting the OTF and and converting to PDF and the sending using API function module.
    Please help me in getting the addresses.
    Regards,
    Vivek

    Hi,
    I use the following code to get all of the email addresses attached to a vendor...
    * Find the partners email address (this should be a vendor)
      select single adrnr into lv_adrnr
        from lfa1 where lifnr = nast-parnr.
      select smtp_addr flgdefault
             adr6~date_from adr6~consnumber remark into table lt_email
        from adr6
         left outer join adrt
            on  adrt~addrnumber = adr6~addrnumber
            and adrt~persnumber = adr6~persnumber
            and adrt~comm_type  = 'INT'
            and adrt~date_from  = adr6~date_from
            and adrt~consnumber = adr6~consnumber
          where adr6~addrnumber  = lv_adrnr
            and adr6~date_from  <= sy-datum
          order by adr6~date_from adr6~consnumber.
    Darren

  • Problem in executing report using rwrun.sh with runtime/lexical parameters

    hi..
    My problem is as follows..
    I'm using SuSE8.0, with Oracle DS installed..
    I made a rep file to execute a report from command line using rwrun.sh.
    For the first time I got problems with single quotes and later I solved it by using \ as escape sequence and I can generate the report.
    I have 2 lexical parameters.
    1) atable --> for table names
    2) whereford --> for WHERE condition
    When I make the following command I execute it successfully and get the report .
    /opt/oracle/OraHome1/bin/rwrun.sh /opt/jakarta/webapps/ROOT/std-reports/DiagnoseProtokolle.rep userid=test/test@approxim batch=yes desname=/opt/jakarta/webapps/ROOT/kovi_361_Report.PDF destype=file desformat=PDF atable=\',SD_DIAGNOSESYSTEME\' whereford=\'\ \(\(\ SD_DIAGNOSESYSTEME.bezeichnung\ =\'AIRBAG\'\ \)\)\ AND\ \(\(\ SD_DIAGNOSESYSTEME.bezeichnung\ =\'ABS\'\ \)\)\ AND\' tracefile=/opt/jakarta/webapps/ROOT/trace/trace.log tracemode=TRACE_REPLACE
    ** In one line..
    If I don't use \ for escaping braces it doesn't work and also for spaces and single quotes.
    I use braces as I get sometimes mixed conditions..
    But when I make a condition like for eg: emp.emp_id = dept.emp_emp_id it is not executing..
    i mean primary key is referd to foreign key of another table.
    so in the same way the error prone command looks like this
    /opt/oracle/OraHome1/bin/rwrun.sh /opt/jakarta/webapps/ROOT/std-reports/DiagnoseProtokolle.rep userid=test/test@approxim batch=yes desname=/opt/jakarta/webapps/ROOT/kovi_361_Report.PDF destype=file desformat=PDF atable=\',MESSWERTE,SD_DIAGNOSESYSTEME\' whereford=\'\ \(\(\ MESSWERTE.mess_id\ =\ SD_DIAGNOSESYSTEME.mess_mess_id\ AND\ SD_DIAGNOSESYSTEME.bezeichnung\ =\'AIRBAG\'\ \)\)\ AND\ \(\(\ SD_DIAGNOSESYSTEME.bezeichnung\ =\'ABS\'\ \)\)\ AND\' tracefile=/opt/jakarta/webapps/ROOT/trace/trace.log tracemode=TRACE_REPLACE
    when I had a look at the trace.log file I see that particular condition is transformed in to
    MESSWERTE.mess_id = 'SD_DIAGNOSESYSTEME.mess_mess_id'
    but this is completely awkward.
    Then I made a batch file and tested it on windows and i put the whole condition in double quotes and it worked always fine..
    It seems the problem is with the shell ..or ??
    In my rwrun.sh th elast line looks like this..
    $ORACLE_HOME/bin/rwrun $*
    I also tried to chaneg this to
    $ORACLE_HOME/bin/rwrun "$@" and also $ORACLE_HOME/bin/rwrun "$*"
    but no progress..
    If some one could help me it would be gratefull for me..
    Thanx in advance..
    regards
    Kovi

    Here's the relevant portion from the Bash manual:
    Enclosing characters in double quotes preserves the literal value of all characters within the quotes, with the exception of $, `, and \. The characters $ and ` retain their special meaning within double quotes. The backslash retains its special meaning only when followed by one of the following characters: $, `, ", \, or <newline>. A double quote may be quoted within double quotes by preceding it with a backslash.
    So basically stop escaping the single-quotes with a backslash, and instead enclose the entire argument value in double-quotes. Add the single-quotes only if you want them literally, don't escape the parentheses, etc. Let's know if it works for you.
    -Manish

  • Problem in send mail with .txt file attached

    According to the diferent checks, I found the next problems:
    1.- Between each caracters there is an space, example:(E Q U I P M E N T) and could be (EQUIPMENT), the last one is the correct form.
    2.- For example, two registers in my internal table appear in one line of my .txt file, but i want that each register of my internal table appear in differents lines of my .txt file.
    3.- The length of each register of my internal table (objbin) is 255 characters, but i really want that the length of each register of my internal table be 1023 characters.
    Thank you

    This is my perform:
    FORM z_envia_correo .
      DATA: docu_data LIKE SODOCCHGI1,
            tablines TYPE i,
            destinatarios  like somlreci1  occurs 1 with header line.
      DATA: BEGIN OF packlist OCCURS 0.
              INCLUDE STRUCTURE SOPCKLSTI1.
      DATA: END OF packlist.
      DATA: BEGIN OF objbin OCCURS 0.
              INCLUDE STRUCTURE SOLISTI1.
      DATA: END OF objbin.
      DATA: BEGIN OF object_header OCCURS 0.
              INCLUDE STRUCTURE SOLISTI1.
      DATA: END OF object_header.
      DATA: BEGIN OF contents OCCURS 0.
              INCLUDE STRUCTURE SOLISTI1.
      DATA: END OF contents.
    *-->ihv270907
      DATA: l_string TYPE string,
            l_fecha(10) TYPE c,
            l_dia(2) TYPE c,
            l_mes(2) TYPE c,
            l_ano(4) TYPE c,
            l_hora(8) TYPE c,
            l_h(2) TYPE c,
            l_min(2) TYPE c,
            l_seg(2) TYPE c.
    *<--ihv270907
    Variable del destinatario para enviar el mail
      DATA: l_usrnam TYPE string.
    *Caracter salto de linea
      FIELD-SYMBOLS <hex_container> TYPE c.
      CONSTANTS: zz_tab TYPE x VALUE '0D' LENGTH 4. "valor del salto de linea en hexadecimal
      ASSIGN zz_tab TO <hex_container> CASTING.
    cargo el texto de cabecera del mail
      CLEAR docu_data.
      docu_data-obj_name = 'ZFLOTA'.
      CONCATENATE 'ZFLOTA' sy-datum INTO docu_data-obj_descr SEPARATED BY space.
      docu_data-proc_type = 'T'.
      docu_data-proc_name = 'ZFLOTA'.
    cargo el texto del cuerpo del mail
      CLEAR contents.
    *-->ihv270907
      l_string = TEXT-I04.
      REPLACE '&' IN l_string WITH sy-uname.
      l_ano = sy-datum+0(4).
      l_mes = sy-datum+4(2).
      l_dia = sy-datum+6(2).
      CONCATENATE l_dia l_mes l_ano INTO l_fecha SEPARATED BY '/'.
      REPLACE '&' IN l_string WITH l_fecha.
      l_h = sy-uzeit+0(2).
      l_min = sy-uzeit+2(2).
      l_seg = sy-uzeit+4(2).
      CONCATENATE l_h l_min l_seg INTO l_hora SEPARATED BY ':'.
      REPLACE '&' IN l_string WITH l_hora.
      contents = l_string.
    *<--ihv270907
      APPEND contents.
      DESCRIBE TABLE contents LINES tablines.
      READ TABLE contents INDEX tablines.
      docu_data-doc_size = ( tablines - 1 ) * 255 + STRLEN( contents ).
    cargo el contenido del attachmet
      LOOP AT g_gt_outtab_mail.
        g_gt_outtab_mail-line+254(1) = <hex_container>.
        MOVE g_gt_outtab_mail-line TO objbin-line.
        APPEND objbin.
      ENDLOOP.
    genero el nombre del archivo a ser attachado
      CLEAR object_header.
      object_header-line = 'ZFLOTA.txt'.
      APPEND object_header.
    armo las caracteristicas del mail
      CLEAR packlist.
      packlist-head_start = 1.
      packlist-head_num = 0.
      packlist-body_start = 1.
      packlist-body_num = tablines.
      packlist-transf_bin = space.
      packlist-doc_type = 'RAW'.
      APPEND packlist.
    armo las caracteristicas del attachment
      DESCRIBE TABLE objbin LINES tablines.
      packlist-transf_bin = 'X'.
      packlist-head_start = 1.
      packlist-head_num = 0.
      packlist-body_start = 1.
      packlist-body_num = tablines.
      packlist-doc_type = 'TXT'.
      packlist-obj_name = 'ZFLOTA.txt'.
      packlist-obj_descr = 'ZFLOTA.txt'.
      packlist-doc_size = tablines * 250.
      APPEND packlist.
    Destinatarios
      l_usrnam = sy-uname.
      MOVE: l_usrnam TO destinatarios-receiver.
      destinatarios-rec_type = 'B'.   "U externo; B -> SAP
      destinatarios-sap_body = 'X'.
      APPEND DESTINATARIOS.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA                    = docu_data
          PUT_IN_OUTBOX                    = 'X'
          COMMIT_WORK                      = 'X'
        TABLES
          PACKING_LIST                     = packlist
          OBJECT_HEADER                    = object_header
          CONTENTS_BIN                     = objbin
          CONTENTS_TXT                     = contents
          RECEIVERS                        = destinatarios
    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 SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " z_envia_correo
    Thank you.

  • Trouble with Sending Mails with forms 6i on a Citrix Environment

    I have a problem, cause i tryed to use the guide`s that i found in the forum, but using this code:
    PACKAGE mail_pkg IS
    /* paquete sacado de internet: UTL_SMTP package */
    session OLE2.OBJ_TYPE; /* OLE object handle */
    args OLE2.LIST_TYPE; /* handle to OLE argument list */
    procedure logon( Profile IN varchar2 default NULL );
    procedure logoff;
    procedure send( Recp IN varchar2,
    Subject IN varchar2,
    Text IN varchar2,
    Attch IN varchar2
    END;
    PACKAGE BODY mail_pkg IS
    session_outbox OLE2.OBJ_TYPE;
    session_outbox_messages OLE2.OBJ_TYPE;
    message1 OLE2.OBJ_TYPE;
    msg_recp OLE2.OBJ_TYPE;
    recipient OLE2.OBJ_TYPE;
    msg_attch OLE2.OBJ_TYPE;
    attachment OLE2.OBJ_TYPE;
    procedure logon( Profile IN varchar2 default NULL )is
    Begin
    session := ole2.create_obj('mapi.session');
    /* create the session object */
    args := ole2.create_arglist;
    ole2.add_arg(args,Profile);/* Specify a valid profile name */
    ole2.invoke(session,'Logon',args);
    /* to avoid the logon dialog box */
    ole2.destroy_arglist(args);
    End;
    procedure logoff is
    Begin
    ole2.invoke(session,'Logoff');
    /* Logoff the session and deallocate the */
    /* resources for all the OLE objects */
    ole2.release_obj(session);
    ole2.release_obj(session_outbox);
    ole2.release_obj(session_outbox_messages);
    ole2.release_obj(message1);
    ole2.release_obj(msg_recp);
    ole2.release_obj(recipient);
    ole2.release_obj(msg_attch);
    ole2.release_obj(attachment);
    End;
    procedure send( Recp IN varchar2,
    Subject IN varchar2,
    Text IN varchar2,
    Attch IN varchar2
    )is
    Begin
    /* Add a new object message1 to the outbox */
    session_outbox := ole2.get_obj_property(session,'outbox');
    session_outbox_messages := ole2.get_obj_property(session_outbox,'messages');
    message1 := ole2.invoke_obj(session_outbox_messages,'Add');
    ole2.set_property(message1,'subject',Subject);
    ole2.set_property(message1,'text',Text);
    /* Add a recipient object to the message1.Recipients collection */
    msg_recp := ole2.get_obj_property(message1,'Recipients');
    recipient := ole2.invoke_obj(msg_recp,'add') ;
    ole2.set_property(recipient,'name',Recp);
    ole2.set_property(recipient,'type',1);
    ole2.invoke(recipient,'resolve');
    /* Add an attachment object to the message1.Attachments collection */
    msg_attch := ole2.get_obj_property(message1,'Attachments');
    attachment := ole2.invoke_obj(msg_attch,'add') ;
    ole2.set_property(attachment,'name',Attch);
    ole2.set_property(attachment,'position',0);
    ole2.set_property(attachment,'type',1); /* 1 => MAPI File Data */
    ole2.set_property(attachment,'source',Attch);
    /* Read the attachment from the file */
    args := ole2.create_arglist;
    ole2.add_arg(args,Attch);
    ole2.invoke(attachment,'ReadFromFile',args);
    ole2.destroy_arglist(args);
    args := ole2.create_arglist;
    ole2.add_arg(args,1); /* 1 => save copy */
    ole2.add_arg(args,0); /* 0 => no dialog */
    /* Send the message without any dialog box, saving a copy in the Outbox */
    ole2.invoke(message1,'Send',args);
    ole2.destroy_arglist(args);
    --message('Correo Electrónico Enviado Correctamente');
    End;
    END;
    I have an error when I try to send a mail, i create a pdf file, and just after appears this message:
    FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-305500
    I use a Citrix environment, but if I use local applicattion, in my machine, without citrix, It send the e-mail correctly.
    Any help??
    Please...

    Duane,
    don't knowwhy you chose to extend VButton, but the following code works for me. Note that I extend the VBean class. Also I am using Jinitiator 1.3.1.9 (this is what I had available for testing). My first test chowed that there was a problem with the way you specify teh URL string, which is why I harcoded the URL string when building the URL.
    Another issue when running it is that you need to sign the file because it needs socket permission (at least this was the error shown on a remote client).
    Here's the code
    package mypackage3;
    import oracle.forms.ui.*;
    import oracle.forms.properties.ID;
    import java.net.URL;
    import java.applet.*;
    import javax.swing.JTextField;
    import oracle.forms.handler.IHandler;
    public class Class1 extends VBean {
    public final static ID PLAY = ID.registerProperty("PLAY");
    private IHandler mHandler = null;
    public Class1()
    super();
    public void init(IHandler handler)
    mHandler = handler;
    super.init(handler);
    public boolean setProperty(ID property, Object value) {
    if (property == PLAY)
    try
    System.out.println("before soundplay");
    URL sou = new URL("http://fnimphiu-lap.de.oracle.com/forms60java/Drums.wav");
    System.out.println("1");
    //Applet testapp = new Applet();
    Applet testapp = mHandler.getApplet();
    System.out.println("2");
    AudioClip clip = testapp.getAudioClip(sou);
    System.out.println("3");
    clip.play();
    System.out.println("after soundplay");
    return true;
    catch(Exception ex)
    ex.printStackTrace();
    return super.setProperty(property, value);
    Fran

  • Sending Mail with Form Attachment in PDF

    Dear ABAP Guru
    How to automate sending output of SALES ORDER in PDF to Sold-To-Party email address.
    Right now, We are able to output sales order one by one manually and need to automate it to orders (entered that day)
    send PDF to CUSTOMER email address.
    SK

    Hi,
    Refer to the following link:
    http://sapdev.co.uk/reporting/rep_spooltopdf.htm
    Hope this helps.
    <REMOVED BY MODERATOR>
    Regards,
    Sipra
    Edited by: Alvaro Tejada Galindo on Apr 14, 2008 5:41 PM

  • Problem in Sending mail with attachment (Excel sheet)

    Hi
    Iam using this FM   SO_NEW_DOCUMENT_ATT_SEND_API1  for sending mail with an attachment (excel sheet).
    the application is running fine , mail is going to other system .   but the excel sheet attachment contain only few rows  not all.
    and the body of the mail is not displaying . 
    Can any one help me. Thanks in advance.

    Hi,
    you can use cl_bcs classes for the same. I am using below code for same thng
      CONSTANTS:c_tab  TYPE c VALUE cl_bcs_convert=>gc_tab.
      CONSTANTS:c_crlf TYPE c VALUE cl_bcs_convert=>gc_crlf.
      DATA o_send_request   TYPE REF TO cl_bcs.
      DATA o_document       TYPE REF TO cl_document_bcs.
      DATA o_recipient      TYPE REF TO if_recipient_bcs.
      DATA o_bcs_exception  TYPE REF TO cx_bcs.
      TRY.
        o_document = cl_document_bcs=>create_document(
          i_type    = 'RAW'
          i_text    = is_mail_text
          i_subject = text-005 ).
      ENDTRY.
    *create file header
    CONCATENATE
                    text-h00 c_tab text-h01 c_tab text-h02 c_tab text-h03 c_tab text-h04 c_tab
                    text-h52 c_tab text-h05 c_tab text-h06 c_tab text-h07 c_tab text-h08 c_tab text-h09 c_tab
                   c_crlf INTO w_data_string.
    Loop at itab which contains data to be send as attachment
    concatenate field1 field2 field3 c_crlf into your_string separated by  c_tab
    conatenate final string your_string into final_string.
    endloop.
    *Convert data into suitable excel format
      TRY.
          CALL METHOD cl_bcs_convert=>string_to_solix
            EXPORTING
              iv_string   = w_data_string
              iv_codepage = '4103'
              iv_add_bom  = 'X'
            IMPORTING
              et_solix    = w_binary_content.
        CATCH cx_bcs INTO o_bcs_exception.
          IF o_bcs_exception IS NOT INITIAL.
            w_exec_txt = o_bcs_exception->get_text( ).
            MESSAGE w_exec_txt TYPE 'S'.
          ENDIF.
      ENDTRY.
        add the spread sheet as attachment to document object
      CONCATENATE text-006 sy-datum INTO w_attach_name SEPARATED BY space.
      o_document->add_attachment(
        i_attachment_type    = 'xls'
        i_attachment_subject = w_attach_name
        i_att_content_hex    = w_binary_content ).
    *create persistent send request
      o_send_request = cl_bcs=>create_persistent( ).
        add document object to send request
      o_send_request->set_document( o_document ).
        create recipient object for external mail id
      w_mlrec = iw_recipent.
      TRY.
          o_recipient = cl_distributionlist_bcs=>getu_persistent(
              i_dliname = w_mlrec
              i_private = space ).
        CATCH cx_bcs INTO o_bcs_exception.
          IF o_bcs_exception IS NOT INITIAL.
            w_exec_txt = o_bcs_exception->get_text( ).
            MESSAGE w_exec_txt TYPE 'S'.
          ENDIF.
      ENDTRY.
        add recipient object to send request
      o_send_request->add_recipient( o_recipient ).
        ---------- send document ---------------------------------------
      w_sent_to_all = o_send_request->send( i_with_error_screen = 'X' ).
      IF w_sent_to_all EQ abap_true.
        COMMIT WORK.
      ENDIF.

  • Sending Mail with an Attachment

    Hi
    I'm trying to send mail with a PDF attached. I've been set up on exchange server 2007... Sending mail without an attachment works fine.
    Was wondering if anyone knows if this is a known issue or if I'm simply doing something wrong. The attachment has sent fine using Outlook web access... So it's not a problem with our connection.
    Cheers
    Lucy

    Ditto to the comments on configuring EWS to deal with larger attachments. The instructions to do this are, unfortunately, very confusing as some configuration items are in MB and some are in KB and some are in bytes!
    I worked with our sys admins to get this running, I knew things were better when I could send large attachments with Entourage Web Services Edition. I am still having occasional problems with large attachments not being sendable with Mail.app. I am hoping that 10.6.1 might tweak something to fix this?
    The link we used for information is here:
    http://ministry-it.blogspot.com/2009/08/entourage-ews-attachment-limits.html
    While you are at it, you may want to have them check attachment limits for Outlook Web Access (OWA) if you find yourself using that and get bitten by the same 5 MB limit issue. Note that OWA and EWS have separate settings and are changed in different ways!
    http://technet.microsoft.com/en-us/library/aa996835.aspx
    Good luck
    -- Alex

  • Sending mails with attachments using oracle 8i

    Hi,
    Could anybody please send a sample code for sending mails
    with attachments using oracle 8i.
    Thanks in advance

    For oracle8i there is an example package from OTN:
    http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html
    You have to re-write the package a bit to work it with BLOBs instead of RAW attachments, but that should be no problem
    Hop this helps,
    Michiel

Maybe you are looking for

  • Asp code in Dreamweaver

    How do I make this code work in Dreamweaver? I need help badly. <% ' Declare variables Dim strURL ' The URL of this page Dim cnnSearch ' ADO connection Dim rstSearch ' ADO recordset Dim strSQL ' The SQL Query we build on the fly Dim strSearch ' The t

  • Modern applications getting cut off.

    In most of the modern applications such as mail store music, In settings and accounts it only opens halfway. Also the search bar in store is half or more cut off. Has anyone else had this issue or know a fix?

  • Recommended way to read configuration

    Hie We have a system to fetch data from legacy system and push to bc4j. System is designed in a way that client can choose which classes to use for various phases involved in fetching. For example say system has a processData, validateData phae. So,

  • Checkout process error using 2 payment methods

    Hello, I would like to use COD and Paypal as my two methods of payment. However, I keep receiving the same error message during the checkout process. ERROR: Could not retrieve order [ERROR: 1]. Please go back and correct this. I have checked BC's Pay

  • Nokia Lumia 800 Backup power

    Hi! Do Nokia have any official Backup power or Portable power device with could be used in Lumia 800. If not, what 3rd party device (or what kind of device) they would recommend to use with 800. -Juho