Skip to Content
author's profile photo Former Member
Former Member

Attacments in Excel with Char > 255 char

I am facing the problem in sending emails attachments through SAP with attachment file type as .xls, I am using fuction SO_NEW_DOCUMENT_ATT_SEND_API1. My table width is >255 characters. I tried using fuction SX_TABLE_LINE_WIDTH_CHANGE but I am unable to get the desired result(sending emails in CSV format with more than 255 characters in a line) The characters get truncated after 255 characters.

I also tried table compress and table decompress.

But not working...any idea will be of great help......

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jan 17, 2005 at 07:07 AM

    Hi Ramesh,

    here's an example for att. binary files like xls-files:

    *packing list

    OBJPACK-TRANSF_BIN = 'X'.

    OBJPACK-HEAD_START = 1.

    OBJPACK-HEAD_NUM = 0.

    OBJPACK-BODY_START = 1.

    OBJPACK-BODY_NUM = TAB_LINES.

    OBJPACK-DOC_TYPE = 'xls'. "e.g. excel

    OBJPACK-OBJ_NAME = 'ANLAGE'.

    read table exttab index 1.

    OBJPACK-OBJ_DESCR = exttab.

    objpack-doc_size = ( tab_lines - 1 ) * 255 + strlen( objbin ).

    APPEND OBJPACK.

    *send

    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'

    EXPORTING

    DOCUMENT_DATA = DOC_CHNG

    PUT_IN_OUTBOX = 'X'

    TABLES

    PACKING_LIST = OBJPACK

    OBJECT_HEADER = OBJHEAD

    CONTENTS_hex = objbin

    CONTENTS_TXT = OBJTXT

    RECEIVERS = RECLIST

    regards Andreas

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Andreas

      My problem is not creatin attachment. I have got the attachemnt with only 255 lines where are my internal table has 1149 characters.

      I tried all these

      call function 'SX_TABLE_LINE_WIDTH_CHANGE'

      call function 'TABLE_COMPRESS' and

      call function 'TABLE_DECOMPRESS'

      But still I cannot fit in the Internal table here.

      Soem light on the No of Charters will be helpful.

  • Posted on Jan 19, 2005 at 09:21 AM

    Hi Ramesh,

    a try:

    1) save your file at appl.server with

    OPEN DATASET file FOR OUTPUT filter 'compress'.

    (File = /tmp/test.Z)

    2) open this file and send it binary

    (look what,i wrote yesterday)

    Good speed !

    Andreas

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.