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

Destroy CL_BCS object

former_member355168
Participant
0 Likes
939

Dear Experts,

I am sending email with multiple attachments to multiple user .

The program is assigned to an output type for delivery.

User will be using tcode VL71.

if user process only single delivery, all going fine.

But if user process two or more deliveries at a time, then the email body of first email is getting appended to second email body with all attachments.

I have declared all objects locally in the subroutine(FORM..ENDFORM).

Can anyone guide how to delete the object of cl_bcs class after mail is sent, OR

clear / initialize the object every time , program is called.

Thanks in advance.

Jaspal

2 REPLIES 2
Read only

ziolkowskib
Active Contributor
0 Likes
751

Hi Jaspal,

If you create new object of CL_BCS each time you execute your logic that problem should not occur.

Are you sure the content is not kept in your local variables? 

Read only

matt
Active Contributor
0 Likes
751

If you have an object mail type ref to cl_bcs then simply clear mail.