‎2007 Mar 19 6:24 PM
Hi, First Post . Im using the FM SO_DOCUMENT_SEND_API1 to send emails, and i manage to get it work, kind of..., with a litlle bug...
I actually manage to send the mail with the attach but my problem its when im creating and filling the attach, the attach that i receive has only one line of the itab, not all...
Can someone help me on this subject?
CLEAR t_packing_list.
REFRESH t_packing_list.
*********This is the body message
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
t_packing_list-body_num = 2.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
* Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 20.
t_packing_list-body_start = 3.
t_packing_list-body_num = 20.
t_packing_list-doc_type = 'TXT'.
t_packing_list-doc_size = t_packing_list-body_num * 255.
t_packing_list-obj_descr = 'Exemplo de Teste'.
t_packing_list-obj_langu = sy-langu.
t_packing_list-obj_name = 'Teste'.
APPEND t_packing_list.
The code is kind a hardcoded , but the itab that im using has got 20 lines.
Thanks in Advance,
Regards
‎2007 Mar 19 6:41 PM
Hi Joao,
Please change the size of the body.. use a logic like this:
*********This is the body message
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
t_packing_list-body_num = 2.
*insert
describe table it_message lines t_packing_list-body_num.
describe table it_body lines lv_cntl.
t_packing_list-body_num = t_packing_list-body_num + lv_cntl .
***
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Hope this helps..
Let me know if there is anything further..
BR
Rakesh
PS: Please close this thread if your question in answered..
‎2007 Mar 20 11:23 AM
Hi, thk for your post but it didnt work out.. :s, probably did something wrong.
I'll just post my code,
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
describe table it_message lines t_packing_list-body_num. " This is the table with the message body ??
describe table i_tab lines lv_cntl. " This is the table with the data
t_packing_list-body_num = t_packing_list-body_num + lv_cntl .
* DESCRIBE TABLE i_tab LINES t_packing_list-body_num.
* linha = t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
* Create attachment notification
* This is where i want to write all the lines from the i_tab to the attach
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 20.
t_packing_list-body_start = 3.
describe table it_message lines t_packing_list-body_num.
describe table i_tab lines lv_cntl.
t_packing_list-body_num = t_packing_list-body_num + lv_cntl .
* DESCRIBE TABLE t_packing_list LINES t_packing_list-body_num.
t_packing_list-doc_type = 'TXT'.
t_packing_list-doc_size = t_packing_list-body_num * 255.
t_packing_list-obj_descr = 'Exemplo de Teste'.
* t_packing_list-doc_type = 'RAW'.
t_packing_list-obj_langu = sy-langu.
t_packing_list-obj_name = 'Teste'.
APPEND t_packing_list.
but i must did something wrong that is not working, any help would be apreciated
Thk,
Regards