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

Formating with SO_NEW_DOCUMENT_SEND_API1

JayantkumarS
Participant
0 Likes
2,215

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

7 REPLIES 7
Read only

Former Member
0 Likes
1,805

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

Read only

0 Likes
1,805


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.

Read only

0 Likes
1,805

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

Read only

0 Likes
1,805

Hello stefan,

thanks for update .

If it is text element can you help me how do we make formating ?

Thanks.

Jayant.

Read only

0 Likes
1,805

Hello stefan,

thanks for update .

If it is text element can you help me how do we make formating ?

Thanks.

Jayant.

Read only

rosenberg_eitan
Active Contributor
0 Likes
1,805

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.

See sample

Read only

Former Member
0 Likes
1,805

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