cancel
Showing results for 
Search instead for 
Did you mean: 

Improper display of threads

former_member194669
Active Contributor
0 Kudos

For the past few days i seeing some threads displayed in improper.( No alignment )

The following is thread i viewed like this way

Hello, I've a little problem in sending a mail with attachment with SO_NEW_DOCUMENT_ATT_SEND_API1 The System is ECC6 I've made a little function to generate and send a mail with an ICS file attached (iCal, i send a meeting request) My problem is when the mail is sent, the attachment seems to be changed, i send Meeting.ics and i receive Untitled.msg empty The problem is the same if i use my business workplace to send the mail with the same ICS attachment, i receive untitled.msg empty I was wondering if SAP have to know the file type, so i've tried with a file with .xyz extension.... all works perfectly, so no, SAP does't have to Here is the code for information the code is configured to send an xyz file that works perfectly for me, i need the same with .ics (even if i begin to think that is a basis/exchange problem) Maybe somebody can confirm this Sorry for indent, i didn't found how to put this cleanly

 DATA: tab_lines LIKE sy-tabix. * Variables for EMAIL functionality DATA: maildata LIKE sodocchgi1. DATA: mailpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE. DATA: mailhead LIKE solisti1 OCCURS 1 WITH HEADER LINE. DATA: mailbin LIKE solisti1 OCCURS 10 WITH HEADER LINE. DATA: mailtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE. DATA: mailrec LIKE somlrec90 OCCURS 0 WITH HEADER LINE. DATA: solisti1 LIKE solisti1 OCCURS 0 WITH HEADER LINE. ************************************************************************ * START PROGRAM * ************************************************************************ *Clear all internal data CLEAR: maildata, mailtxt, mailbin, mailpack, mailhead, mailrec. REFRESH: mailtxt, mailbin, mailpack, mailhead, mailrec. CLEAR: mailpack, mailbin, mailhead. REFRESH: mailpack, mailbin, mailhead. * Mail Subject maildata-obj_descr = subject_mail. * Mail text LOOP AT body_mail. concatenate mailtxt-line body_mail-line CL_ABAP_CHAR_UTILITIES=>CR_LF into mailtxt-line. ENDLOOP. APPEND mailtxt. * Prepare Packing List DESCRIBE TABLE mailtxt LINES tab_lines. READ TABLE mailtxt INDEX tab_lines. maildata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( mailtxt ). * Creation of the entry for the text document CLEAR mailpack-transf_bin. mailpack-head_start = 1. mailpack-head_num = 0. mailpack-body_start = 1. mailpack-body_num = tab_lines. mailpack-doc_type = 'RAW'. APPEND mailpack. *Creation of the attachement PDF * Move OTF code to structure SOLI form email CLEAR solisti1. REFRESH solisti1. concatenate 'BEGIN:VCALENDAR' CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line. concatenate solisti1-line 'BEGIN:VEVENT' CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line. concatenate solisti1-line 'DTSTART:' begda 'T' begtime CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line. concatenate solisti1-line 'DTEND:' endda 'T' endtime CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line. concatenate solisti1-line 'SUMMARY:' SUBJECT_RV CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line. concatenate solisti1-line 'LOCATION:' location_RV CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line. concatenate solisti1-line 'STATUS:' 'CONFIRMED' CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line. concatenate solisti1-line 'DESCRIPTION:' into solisti1-line. loop at body_rv. concatenate solisti1-line body_rv-line '
' into solisti1-line. endloop. concatenate solisti1-line CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line. concatenate solisti1-line 'END:VEVENT' CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line. concatenate solisti1-line 'END:VCALENDAR' CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line. APPEND solisti1. *Send OTF code to mail structure LOOP AT solisti1. MOVE-CORRESPONDING solisti1 TO mailtxt. APPEND mailtxt. ENDLOOP. *Set status of the attachement DESCRIBE TABLE mailtxt LINES tab_lines. mailhead = 'ATTACHMENT'. APPEND mailhead. ** Creation of the entry for the compressed attachment CLEAR mailpack-transf_bin. mailpack-head_start = 2. mailpack-head_num = 1. mailpack-body_start = 2. mailpack-body_num = tab_lines. mailpack-doc_type = 'XYZ'. mailpack-obj_name = 'ATTACHMENT'. mailpack-obj_descr = 'Meeting.xyz'. mailpack-doc_size = tab_lines * 255. APPEND mailpack. * Set recipient - email address mailrec-receiver = to. mailrec-rec_type = 'U'. APPEND mailrec. * Sending the document CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' EXPORTING document_data = maildata put_in_outbox = 'X' commit_work = 'X' TABLES packing_list = mailpack object_header = mailhead contents_bin = mailbin contents_txt = mailtxt receivers = mailrec EXCEPTIONS too_many_receivers = 1 document_not_sent = 2 operation_no_authorization = 4 OTHERS = 99. *Check Return code for each receiver IF sy-subrc = 0. LOOP AT mailrec. WRITE 😕 mailrec-receiver, mailrec-retrn_code. ENDLOOP. ENDIF. *If needed, uncomment this to launch SOST queue *Normally, this is automatic * IF sy-subrc = 0. * SUBMIT rsconn01 * WITH mode = 'INT' * WITH output = ' ' * AND RETURN. * ENDIF. ENDFUNCTION. 

Thanks in advance Antoine

Accepted Solutions (1)

Accepted Solutions (1)

former_member181995
Active Contributor
0 Kudos

Hi a®s,

Please take a look at

Cheers

Answers (1)

Answers (1)

faisal_altaf2
Active Contributor
0 Kudos

Hi, a®s

Please Have a look at [ATTENTION Limit of 2500 characters in a posting|/thread/1319756 ;

Best Regards,

Faisal