2014 Aug 22 8:29 AM
Hello Gurus,
Please me with below.
i am using FM SO_NEW_DOCUMENT_SEND_API1 to send mail notification. Data send is as below.
AS IS
Document Item VKROG VTWEG
SPART
1234 00010 CA ABC
00
2345 00020 CA ABC
00
TO Be
Document Item VKROG VTWEG SPART
1234 00010 CA ABC 00
2345 00020 CA ABC 00
Please guide me if this is possible with FM SO_NEW_DOCUMENT_SEND_API1.
Rgs,
Jayant
2014 Aug 22 8:42 AM
Hi,
yes its possible. i would suggest to create SO10 Text and then use convert-FM ITF to ASCII
its up to you if you go on to HTML format with this or stay at ASCII.
well whatever format you use there are tabulators in both.
regards
Stefan Seeburger
2014 Aug 22 8:47 AM
Thanks Stefan,
sorry but could not understand the link in creating SO10 text for displaying internal table data.
this FM is triggred through a Z program.
Please explain, as mine is ASCII content and i should not this exisiting logic. As this came like an enhancment.:):)
Rgs,
Jayant.
2014 Aug 22 9:54 AM
Hi Jayant,
well normaly you use formulars when formated text is needed. but when you just want to format a table you should be able to pass this in the body table of SO_NEW_DOCUMENT_SEND_API1 just with "move" or "write" command. use the offset to align your text as you would when writing a table to the screen.
just a hint but emails look more fancy when they are in html format.
u can also give pure html code to the body table. email programms like outlook will translate it befor showing content.
regards
Stefan Seeburger
2014 Aug 25 11:00 AM
Hello stefan,
thanks for update .
If it is text element can you help me how do we make formating ?
Thanks.
Jayant.
2014 Aug 25 11:01 AM
Hello stefan,
thanks for update .
If it is text element can you help me how do we make formating ?
Thanks.
Jayant.
2014 Aug 22 9:04 AM
Hi,
Please use cl_bcs .
see http://wiki.scn.sap.com/wiki/display/Snippets/Send+email+from+ABAP+with+class+CL_BCS .
I your case you might omit the COMMIT WORK.
At this point:
"Email BODY
APPEND 'Hello world! My first ABAP email!' TO gv_text.
You can compose a nice html table .
http://www.w3schools.com/html/html_tables.asp
All the DATA: statment can be local .
Regards.
2014 Aug 22 9:06 AM
Hi Shetty,
As of Release 6.10, it is recommend that you no longer use the API1 interface for sending documents. Instead, use the BCS interface. Send your mail as HTML formated.
You can find the complete documentation and program examples here:
Sending Mails - Home Page - ABAP Development - SCN Wiki
Regards,
Fred