01-14-2005 5:27 PM
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......
01-17-2005 7: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
01-18-2005 9:58 PM
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.
01-19-2005 9: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