‎2009 Mar 30 6:54 AM
Hi,
How to set the following table field of the FM SO_NEW_DOCUMENT_ATT_SEND_API1 .
PACKING_LIST
OBJECT_HEADER
CONTENTS_BIN
CONTENTS_TXT
RECEIVERS.
I have gone through the FM. Please help me with a code snippet along with a bit of explanation.
Regards.
Sarbajit.
‎2009 Mar 30 7:16 AM
If there is at least one subject which has been explained in this forum over and over again, it would be about this function module. Search the forum first, before posting!
‎2009 Mar 30 7:21 AM
Hi,
Refer:
/people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
Hope this helps you.
Regards,
Tarun
‎2009 Mar 30 8:52 AM
Hi
Goto SE37 SO_NEW_DOCUMENT_ATT_SEND_API1 go through the documentation given there.
Regards,
Sravanthi
‎2009 Mar 30 6:54 PM
‎2009 Mar 31 6:57 AM
Hi Prabhu,
Thanks for the explanation along with your code that you have given. But your code snippet does not reflect anything regarding attachment.Actually my requirement is to attaching a smartform to a mail and sending it to a specific mailid. I have developed a code through which I am able to save the Smartform in local server. Now in SDN Code Gallery I also get code snippet of converting a Smartform into PDF and attaching it to a mail. You also can check it out by clicking Wiki->Wiki Categories(SAP NetWeaver and Technology)->Code Gallery->(Type Smartforms in Search space)->click on 3rd page link at below
->Click on 4thlink from bottom(Smartform as PDF to MailID). There you get the following code snippet
LOOP AT gt_pdf_tab INTO gs_pdf_tab.
gv_pos = 255 - gv_len.
IF gv_pos > 134. "length of pdf_table
gv_pos = 134.
ENDIF.
gs_objbin+gv_len = gs_pdf_tab(gv_pos).
gv_len = gv_len + gv_pos.
IF gv_len = 255. "length of out (contents_bin)
APPEND gs_objbin TO gt_objbin.
CLEAR: gs_objbin, gv_len.
IF gv_pos < 134.
gs_objbin = gs_pdf_tab+gv_pos.
gv_len = 134 - gv_pos.
ENDIF.
ENDIF.
ENDLOOP.
IF gv_len > 0.
APPEND gs_objbin TO gt_objbin.
ENDIF.
If you have time kindly check it out and can explain what is this piece of code doing?
Thanks and Regards.
Sarbajit.
Edited by: Sarbajit Majumdar on Mar 31, 2009 11:28 AM
‎2009 Apr 02 10:01 AM
Hi Prabhu,
if you still watching this thread then please put some light based on my above post.
Thanks in advance.
Sarbajit.
‎2009 Mar 30 6:58 PM
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE lt_message LINES t_packing_list-body_num.
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 = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE gt_file LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
t_packing_list-obj_descr = w_doc_data-obj_descr.
t_packing_list-obj_name = w_doc_data-obj_name.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.t_attachment[] = gt_file[].
......
contents_bin = t_attachment