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

Excel attachment in email

Former Member
0 Likes
374

Hi Friends,

I'm using FM SO_NEW_DOCUMENT_ATT_SEND_API1, to send my internal table contents as excel attachment via e-mail. I'm receiving the xls attachment via e-mail. I'm using cl_abap_char_utilities=>newline to pass internal table contents line by line. This is working fine.

But from second line onwards, the lines are right aligned. For eg. contents_bin-line is 255 character length. If the internal table line is just 100 characters, it is leaving the 1st 155 character space and starting from 101st caharacter space. I need the line to start from 1st character space.

How shall i do this?..

Please help me on this.

Regards,

Subbu.

Hi Friends,

I'm using FM SO_NEW_DOCUMENT_ATT_SEND_API1, to send my internal table contents as excel attachment via e-mail. I'm receiving the xls attachment via e-mail. I'm using cl_abap_char_utilities=>newline to pass internal table contents line by line. This is working fine.

But from second line onwards, the lines are right aligned. For eg. contents_bin-line is 255 character length. If the internal table line is just 100 characters, it is leaving the 1st 155 character space and starting from 101st caharacter space. I need the line to start from 1st character space.

How shall i do this?..

Please help me on this.

Regards,

Subbu.

1 REPLY 1
Read only

former_member192432
Participant
0 Likes
348

Hi ,

Use class cl_abap_char_utilities=>cr_lf as shown below .

CONSTANTS: c_cret TYPE c VALUE cl_abap_char_utilities=>cr_lf . " for carriage return

You can use class CL_BCS also for sending attachment thr mail.(Optional)

Regards

Chetan