Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding Function Module SO_NEW_DOCUMENT_ATT_SEND_API1

sarbajitm
Contributor
0 Likes
817

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.

7 REPLIES 7
Read only

Sm1tje
Active Contributor
0 Likes
777

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!

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
777

Hi,

Refer:

/people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher

https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/multiple%252battachment%252bon%252be_mai...

Hope this helps you.

Regards,

Tarun

Read only

Former Member
0 Likes
777

Hi

Goto SE37 SO_NEW_DOCUMENT_ATT_SEND_API1 go through the documentation given there.

Regards,

Sravanthi

Read only

Former Member
0 Likes
777

This message was moderated.

Read only

0 Likes
777

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

Read only

0 Likes
777

Hi Prabhu,

if you still watching this thread then please put some light based on my above post.

Thanks in advance.

Sarbajit.

Read only

former_member156446
Active Contributor
0 Likes
777
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