Skip to Content
Aug 26, 2010 at 09:19 AM

Mail sent by the program are getting appended for every line item in ITAB.


Hello Experts,

My program has to send mail for every line item in my internal table. Each line itme will provide the data to be filled in body of the mail .Now the problem is when i recieve mail in outlook the body of the mail is getting appended every time i recieve the mail

For example , if the mail has to go for 3 entry in itab out of five then i'm getting 3 mails but 2nd has body of 1 also and 3d has body of 1st and 2nd.

I'm using loop - endloop and it is happening due to this but is there any other way out to send mails for each line without body getting appended.

Please see the code below i'm using:-

LOOP AT lt_bg INTO lw_bg.

PERFORM populate_message_table.>>>>>>Preparing body

PERFORM send_email_message.>>>>>>>>> need to capture in loop as evry line itme has distinct subject of mail


PERFORM initiate_mail_execute_program.