‎2011 Nov 17 9:06 PM
Hi all,
I have a problem sending plain text emails with the FM SO_DOCUMENT_SEND_API1.
I've wrote a Z FM to send plain emails (pure txt) and it works fine into various SAP ECC 6.0 systems. Now I'm copying the FM into another SAP System and it send a .RAW attachment with text instead a simply text.
Code fragment bellow:
...
DESCRIBE TABLE lt_bodytxt LINES ld_lines.
READ TABLE lt_bodytxt INTO ls_bodytxt INDEX ld_lines.
ls_docdata-doc_size = ( ld_lines - 1 ) * 255 + strlen( ls_bodytxt ).
CLEAR ls_packing-transf_bin.
ls_packing-head_start = 1.
ls_packing-head_num = 0.
ls_packing-body_start = 1.
ls_packing-body_num = ld_lines.
ls_packing-doc_type = 'RAW'.
APPEND ls_packing TO lt_packing.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = ls_docdata
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = lt_packing
contents_txt = lt_bodytxt
receivers = lt_receivers
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.Does anyone knows whats happening.
Regards,
Gregory.
‎2011 Nov 18 2:01 AM
Hi Gregory,
This is not because of any code changes. You need to change the SCOT settings. Go to transaction SCOT. Select the INT node & double click on the node 'SMTP' (or some other name). You will get a popup. click on 'Set' button against the 'Internet' option. Please note that you should do it for INT node. In the next popup, check for 'Output formats for SAP documents'. In that, check what is there against 'RAW text'. By what you have described here, now it is set as 'No conversion' in your system. Thatswhy you are getting '.RAW' attachments. Change it to 'TXT'. Thats it. It will work.
Regards,
Gokul
‎2011 Nov 18 2:01 AM
Hi Gregory,
This is not because of any code changes. You need to change the SCOT settings. Go to transaction SCOT. Select the INT node & double click on the node 'SMTP' (or some other name). You will get a popup. click on 'Set' button against the 'Internet' option. Please note that you should do it for INT node. In the next popup, check for 'Output formats for SAP documents'. In that, check what is there against 'RAW text'. By what you have described here, now it is set as 'No conversion' in your system. Thatswhy you are getting '.RAW' attachments. Change it to 'TXT'. Thats it. It will work.
Regards,
Gokul
‎2011 Nov 21 1:10 PM
Hi Gokul,
Thx for ur answer it solves my problem.
Points rewarded.
Regards,
Gregory