Anyone knows how to send a attach with more than 255 characters in 4.6c ?

Hi everyone,
i´m tring to send a email with attach , my problem is that i have a itab with 2500 characters per line,
and the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1'  have the structure SOLISTI1 thats supports only 255 char. i tried to converto to PDF and XLS ,but when i open the attach only appers the first 255 char in each line only. any ideia for that issue?
Thanks,
Shimada
Edited by: Fernando Shimada on May 5, 2009 8:28 PM

here is part of my code that i tried:
first: i write the lines of my itab and after did that
  CALL FUNCTION 'SAVE_LIST'
       EXPORTING
            list_index = '0'
       TABLES
            listobject = list_object.
  CALL FUNCTION 'LIST_TO_ASCI'
       TABLES
            listasci           = list_asci
            listobject         = list_object
       EXCEPTIONS
            empty_list         = 1
            list_index_invalid = 2
            OTHERS             = 3.
  APPEND LINES OF t_saida TO t_objbin.
  DESCRIBE TABLE t_objbin LINES v_lines_ane.
second: do a alv report and tried to convert to pdf ,but the pdf have the same problem
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
            i_callback_program = sy-cprog
            it_fieldcat        = t_fieldcat[]
            is_layout          = w_layout
            is_print           = wa_pr
       TABLES
            t_outtab           = t_alv
       EXCEPTIONS
            program_error      = 1
            OTHERS             = 2.
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  w_sp =  sy-msgv1.
  CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
       EXPORTING
            src_spoolid              = w_sp
            no_dialog                = ' '
            dst_device               = 'LOCL'
      IMPORTING
           pdf_bytecount            =
            TABLES
            pdf                      = t_pdf
       EXCEPTIONS
            err_no_abap_spooljob     = 1
            err_no_spooljob          = 2
            err_no_permission        = 3
            err_conv_not_possible    = 4
            err_bad_destdevice       = 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.
  CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
  LOOP AT t_pdf.
    TRANSLATE t_pdf USING '~'.
    CONCATENATE gd_buffer t_pdf INTO gd_buffer.
  ENDLOOP.
  TRANSLATE gd_buffer USING '~'.
  DO.
    t_objbin = gd_buffer.
    APPEND  t_objbin.
    SHIFT gd_buffer LEFT BY 255 PLACES.
    IF gd_buffer IS INITIAL.
      EXIT.
    ENDIF.
  ENDDO.
Create Message Body Title and Description
  t_objtxt-line = 'teste'.
  APPEND t_objtxt.
  DESCRIBE TABLE t_objtxt LINES v_lines_txt.
  READ TABLE t_objtxt INDEX v_lines_txt.
  wa_doc_chng-obj_name = 'smartform'.
  wa_doc_chng-expiry_dat = sy-datum + 2.
  wa_doc_chng-obj_descr = 'smartform'.
  wa_doc_chng-sensitivty = 'F'.
  wa_doc_chng-doc_size = v_lines_txt * 255.
Main Text
  CLEAR t_objpack-transf_bin.
  t_objpack-head_start = 1.
  t_objpack-head_num   = 0.
  t_objpack-body_start = 1.
  t_objpack-body_num   = v_lines_txt.
  t_objpack-doc_type = 'RAW'.
  APPEND t_objpack.
Anexos
  t_objpack-transf_bin = 'X'.
  t_objpack-head_start = 1.
  t_objpack-head_num = 0.
  t_objpack-body_start = 1.
  DESCRIBE TABLE t_objbin LINES v_lines_bin.
  READ TABLE t_objbin INDEX v_lines_bin.
  t_objpack-doc_size  = v_lines_bin * 255 .
  t_objpack-body_num  = v_lines_bin.
  t_objpack-doc_type  = 'PDF'.
  t_objpack-obj_name  = 'smart'.
  t_objpack-obj_descr = 'test'.
  APPEND t_objpack.
  CLEAR t_reclist.
  t_reclist-receiver = Email.
  t_reclist-rec_type = 'U'.
  APPEND t_reclist.
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
       EXPORTING
            document_data              = wa_doc_chng
            put_in_outbox              = 'X'
            commit_work                = 'X'
       TABLES
            packing_list               = t_objpack
            object_header              = t_objhead
            contents_bin               = t_objbin
            contents_txt               = t_objtxt
            receivers                  = t_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.
    WRITE:/ 'Error When Sending the File', sy-subrc.
  ELSE.
    WRITE:/ 'Mail sent'.
  ENDIF.

Similar Messages

  • Send excel attachment with more than 255 characters in the internal table

    Hi,
    I need to send an attachment in the form of spreadsheet.
    But the internal table that is being used for sending attachment in mails can have only 255 characters in one row.
    Whereas my spreadsheet requires a greater width than 255 characters .

    Hi,
    I need to send an attachment in the form of spreadsheet.
    But the internal table that is being used for sending attachment in mails can have only 255 characters in one row.
    Whereas my spreadsheet requires a greater width than 255 characters .

  • Attachment with more than 255 columns

    Hi together,
    i want to send a mail in background with an attachment with more than 255 columns through the function module SO_DOCUMENT_SEND_API1 . The required content-structure of this function module have 255 columns......
    I try it also with the function module SO_DOCUMENT_REPOSITORY_MANAGER with the method 'SEND'
    but i can't suppress the popup of this function module.
    Have anybody an solution for me ?
    br
    Markus
    Edited by: Markus Garyant on Aug 21, 2008 3:39 PM

    Attachement table has a strucutre SOLISTI1 which can contain only 255 characters BUT you can use the CL_ABAP_CHAR_UTILITIES=>CR_LF for the new line  and CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB for the column separater.
    You need to concatenate this Separters in the attachment table.
    Check out this example:
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    Regards,
    Naimesh Patel

  • Sending an email with more than 75  characters

    Please can you tell me, how i can send an email with more than 75 characters from a workflow. We need to send a link which has more than 130 characters.

    Hi Benjamin,
    You have a couple of options:
    Put your link into a container element and put that into your text instead of hardcoding it.
    Instead of the sendmail step, create a task based on SELFITEM.SENDTASKDESCRIPTION. This is exacly the same as the mail step minus the 'different' step editor in the builder. There you can create the text using the sapscript editor and join lines up.
    Have a look around OSS, there are some notes on this issue.
    Cheers
    Mike

  • How to send text file as an email attachment havin more than 255 characters

    My requirement is to generate a text file and to send this text file as E-mail attachment. I am using FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send the E-mail. but here the limitation is the number of characters per line must not be more than 255 characters whereas in my case it is exceeding 1000 characters per line. could anyone please suggest me what should i do now ? Each field in the text file has to be tab delimited.

    Simplest might well be to use javamail API instead of the two tags that Sites provides, e.g. see email - Sending mail attachment using Java - Stack Overflow for a full example.
    Phil

  • Excel 2007 to Sql server table. Column with more than 255 characters.

    Hi there,
    I am facing a problem while converting data from Excel 2007 to SQL server 2005 table. I am using BIDS 2005.I have an excel file where one particular column has more than 255 characters. I use OLEDB connection for excel file as there is no driver for Excel
    2007 in BIDS2005. I am using Microsoft Office 12.0 Access Database Engine OLE DB Provider for Excel file.
    Next, I changed advanced properties for the column to DT_NTEXT. But when I am getting errors on execution. They are:
    [OLE DB Source [1949]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E21.
    [OLE DB Source [1949]] Error: Failed to retrieve long data for column "action".
    [OLE DB Source [1949]] Error: There was an error with output column "action" (2046) on output "OLE DB Source Output" (1959). The column status returned was: "DBSTATUS_UNAVAILABLE".
    [OLE DB Source [1949]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "output column "action" (2046)" failed because error code 0xC0209071 occurred, and the error row disposition on "output column "action"
    (2046)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.
    Please advise on how can I deal with columns having more than 255 characters in Excel file.
    Thanks!

    Here is what your connection string should look like for excel source
    Provider
    =Microsoft.Jet.OLEDB.4.0;Data
    Source=c:\temp\test.xls;Extended
    Properties="EXCEL 8.0;HDR=YES";
    http://sqlworkday.blogspot.com/

  • SQL Loader fails to process string columns with more than 255 characters

    Hi all,
    I am using LKM file to sqlldr(oracle) to load data from flat file to oracle. I am aware of the fact that if you don't specify length of the input character data, sqlldr uses default of 255 characters. But, in my source datastore I have specified the column length to be 1000, but sqlldr still fails to process records with more that 255 characters.
    Any idea how to change this behavior of sqlldr?
    Appreciate your response.
    Akshata

    You can change the step "Generate CTL File"
    and replace the section:
              } else {
              // The source column is a STRING => no options to add
                   format = "";
              };with
              } else {
              // The source column is a STRING => add char(length) for length greater than 255
                   taille = new Integer(colPrecision).intValue();
                   if (taille > 254)
                   format = "CHAR("+colPrecision+")";
                   else
                   format ="";
              };

  • How to declare a custom field more than 255 characters?

    Dear Freinds,
                  I have custom table where one character field name i want more than 255 characters .....the size of the field  i require is  800 .Could any one one let me know how i can increase the size to 800 or is there any way we can declare to size 800 ....as
    normally i know is we can declare only 255 character in size, but i heard there is another way around we can declare . Could any one please help me out.
    regards
    madhuri

    Hi Ruby,
                i have tried changing at dataelement level only..byusingthe standrd ie char 2000  , and i have tried other way by creating a custom domain and for the data type  i have used char and given size as 2000. Wheniam activating it is aying i can use the size range from 0 to 255 characters only......i have tried by declaring as string the data element ...it has taken as zero size as in the string we can use as many characters i can , but when iam trying to  table generator ...it saying i canot declare my field as String .
    please help what i can do to solve this issue.
    thanks
    regards
    madhuri

  • Inserting data with more than 255 characters in to MSACCESS through JDBC

    Hi All,
    I have developed a product using servlets,JDBC,HTML.The backend is MS access database.
    I have to provide an option for the user to key in more than 255 characters of data in the textarea & then store it in the access database.But i read that access ODBC driver has a limit of 255 characters.Is this correct.
    I tried changing the Datatype of the field from text to Memo field in MS ACCESS.But when i insert the data using setString method of the PreparedStatement ,it's giving the following SQL exception:SQLException caught:[Microsoft][ODBC Microsoft Access Driver]String data, right truncated (null)
    How do i let an user key in more than 255 characters.Can somebody help me on this please ASAP as this is a very crucial issue which i need to solve by tomorrow.
    Thanks in Advance
    GCR

    hi rashmi,
    HOw bout using CLOB facility to store such large strings?? try it.
    Cheers,
    -Jer

  • ALV Cell with more than 255 characters.

    Hello Guru's,
    I need to display a longtext in ALV with other details. I am using READ_TEXT to get the Longtext and appending it to Internal table field, which i have defined as a string. I have debugged the code and it is containing around 450 characters. But, when i am trying to display using "REUSE_ALV_GRID_DISPLAY" it is only displaying 255 characters.
    Please suggest a solution.
    Thanks,
    Sudhir.

    Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length.
    In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output.
    The report output can contain up to 90 columns in the display with the wide array of display options.
    The commonly used ALV functions used for this purpose are;
    1. REUSE_ALV_VARIANT_DEFAULT_GET
    2. REUSE_ALV_VARIANT_F4
    3. REUSE_ALV_VARIANT_EXISTENCE
    4. REUSE_ALV_EVENTS_GET
    5. REUSE_ALV_COMMENTARY_WRITE
    6. REUSE_ALV_FIELDCATALOG_MERGE
    7. REUSE_ALV_LIST_DISPLAY
    8. REUSE_ALV_GRID_DISPLAY
    9. REUSE_ALV_POPUP_TO_SELECT

  • WCF-WebHttp Variable mapping with more than 255 Characters

    Hi all,
    I am using WCF-WebHttp send-receive port to query data from SalesForce. I have query as promoted property and it is mapped with {query} variable in Http Method and URL mapping. It works perfectly when my query has less than 256 characters (promoted property
    character limit), but I have to use longer queries. URL does not allow variable concatination which means I can't use multiple promoted properties. Please suggest a solution.
    If this answers your question please mark as answer. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    Hi,
    You can review the suggestion made on the
    post. Might help.
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • Adding field with more than 255 characters to table VBAP

    Hi experts,
    i am with a requirment to add field model number to VBAP table.
    but the length of the field permitted is 255 char. basically model number comprises of all the characterstics fo material explained, so naturally its lenght will be long....sap do not allow me to enter string as data type for the field.
    what should i do
    thaks in advance
    Edited by: Thomas Zloch on Mar 1, 2012

    Hi, exactly. Since you are trying to write a data longer than 255, try this solution:
    variable_string type string.
    var_clear type string.
    strlen type i.
    count type i.
    strlen = strlen(variable_string).
    if strlen > 132.
    Do.
    count = count + 1.
    TLINE-TDLINE = variable_string(132).
    if count = 1.
    TLINE-TDFORMAT = '*'
    else.
    TLINE-TDFORMAT = space.
    ENDIF.
    append tline.
    MOVE variable_string+132 to var_clear.
    clear variable_string.
    MOVE var_clear to variable_string.
    if variable_string = space.
    EXIT.
    ENDDO.
    *now your VBAP-ZCUSTFIELD
    concatenate sy-datum sy-uzeit vbap-vbeln vbap-posnr to VBAP-ZCUSTFIELD.
    input in SAVE_TEXT Function module.
    The next time youre running it, just use the value in VBAP-ZCUSTFIELD. and run READ_TEXT FM
    As much as you want to extend one field to 255 characters, it is impossible. Unless you have to fill in several fields and cut your >255 character data.

  • How do I send a message with more than 140 characters?

    Hi,
    I am having some problems with Firefox that just cropped up. I have been using it quite a while without incident.
    Now when I try to access my bank account, after I log in with the user name and password [I am at the page where I select my account], the screen shows a blank screen with this string.
    http://sso2.toast.net/login.php?SAMLRequest=fVLJTsMwEL0j8Q%2BW79mKEMhqggoIUYklooEDN9edJka2J3icFv4eNwUBB7g%2Bv3nLeKZnb9awDXjS6EpepDln4BSutGtL%2FthcJaf8rDo8mJK0phezIXTuAV4HoMDipCMxPpR88E6gJE3CSQskghKL2e2NmKS56D0GVGg4m1%2BWHNV6aVT7YjsD2oLrAUxrLGpAwK6HJfTLToLk7Okr1mQXa040wNxRkC5EKC%2BKJD9JJnlTHIvJsSiOnjmrP53Otds3%2BC%2FWck8icd00dVLfL5pRYKNX4O8iu%2BQtYmsgVWh39rUk0psIr6Uh4GxGBD7EgBfoaLDgF%2BA3WsHjw03JuxB6Elm23W7Tb5lMZiHGCamDkElFvBoXK8Zu%2FsdG%2F08uv5x59a09zX5IVZ8ftusxv6zRaPXOZsbg9sKDDLFE8EPscIXeyvC3W5EWI6JXyXqkisFRD0qvNaw4y6q96%2B%2FLiPfyAQ%3D%3D&RelayState=https%3A%2F%2Fwww.google.com%2Fa%2Ftoast.net%2FServiceLogin%3Fservice%3Dmail%26passive%3Dtrue%26rm%3Dfalse%26continue%3Dhttp%253A%252F%252Fmail.google.com%252Fa%252Ftoast.net%252F%253Fchat%253D0%2526labs%253D0%26bsv%3Dllya694le36z%26ltmpl%3Ddefault%26ltmplcache%3D2%26from%3Dlogin
    This also happens when I try to get my web mail from my internet service provider.
    IE gets through without issue.
    I have tried updating with no sucess.
    Then I uninstalled and reinstalled the program with the same results.
    Thanks, Mac McClure

    Actually,Acrobat won't do it by itself, you need a driver created by the scanner's manufacturer. In fact, many scanner's come with the capability. I have had HP, Epson and Fijitsu scanners they all came with the capability of scanning to PDF. The Fujitsu will not work with Acrobat's scanning capability, since it does not come with the appropriate drivers, even though it came with a copy of Acrobat!

  • Upload Excel file to itab with more than 255 chars

    I want to upload an excel file to internal table with more than 255 characters in one of the field. However it restricts the upload to only 255 characters. Currently I am using the code
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
      EXPORTING
    i_field_seperator = 'X'
    i_line_header = 'X'
         i_tab_raw_data = wa_tab_raw_data
         i_filename = p_file
      TABLES
         i_tab_converted_data = <fs_table>
      EXCEPTIONS
         conversion_failed = 1
         OTHERS = 2.
    where <Fs_table> is a dynamic structure in which one column is defined as string. We cannot use FM ALSM_EXCEL_TO_INTERNAL_TABLE as it has a restriction of only 50 characters and I dont want to create a Zstruture in the system.

    It wont work for excel file type.However, with FM Gui_Upload and use a text tab-delimited file we can upload long text.
    Here is the code.
    CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = p_files
          filetype                = 'ASC'
          has_field_separator     = 'X'
        TABLES
          data_tab                = <fs_table>
        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.

  • Anyone know how to gernerate CRUD applications with flex and coldfusion?

    Anyone know how to gernerate CRUD applications with flex and
    coldfusion? I am working with a remote coldsfusion installation
    with MS SQL and I don't have RDS.

    You might investigate "squidhead". It is CF based. I'm not
    sure if it has any Flex related features.
    http://squidhead.riaforge.org/

Maybe you are looking for