hi all,
i've done sending email with PDF and html file attachment, it is working fine.
When comes to text file attachment, i use list from memory to read the abalist
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = i_abaplist
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e398(00) with 'Read error from memory'.
ENDIF.
then use list to asci to get the content of the text file
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
LIST_INDEX = -1
WITH_LINE_BREAK = ' '
IMPORTING
LIST_STRING_ASCII =
LIST_DYN_ASCII =
TABLES
LISTASCI = it_mess_att
LISTOBJECT = i_abaplist
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 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.
the content and format in it_mess_att looks fine.
However when the txt file sent through "SO_DOCUMENT_SEND_API1",
we got txt file attachment with all alignment out.
Please advise what's going wrong in between.
thanks.