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

Problem while using FM SO_DOCUMENT_SEND_API1

Former Member
0 Likes
386

Dear All

I am using FM SO_DOCUMENT_SEND_API1 to send a mail with an excel attachment.

Data is populated into the table lt_attachment and is then converted into excel by the FM.

LOOP AT lt_temp INTO lw_temp.

CONDENSE lw_temp-f1.

CONCATENATE lw_temp-f1

lw_temp-f2

lw_temp-f3

lw_temp-f4

lw_temp-f5

lw_temp-f6

lw_temp-f7

lw_temp-f8

lw_temp-f9

lw_temp-f10

lv_car_ret

INTO lt_attachment-line

SEPARATED BY lv_sep.

lv_car_ret is used to enter a new line.

But problem is that the first column gets displaced by a number of characters even when in internal table there is no space.

Kindly help me in resolving the issue.

Thanks in advance.

Points for sure.

Regards

Dinesh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
365

Try this:

CONCATENATE lw_temp-f1

lw_temp-f2

lw_temp-f3

lw_temp-f4

lw_temp-f5

lw_temp-f6

lw_temp-f7

lw_temp-f8

lw_temp-f9

lw_temp-f10

INTO lt_attachment-line

SEPARATED BY lv_sep.

lt_attachment-line+254(1) = CL_ABAP_CHAR_UTILITIES=>CR_LF.

2 REPLIES 2
Read only

Former Member
0 Likes
366

Try this:

CONCATENATE lw_temp-f1

lw_temp-f2

lw_temp-f3

lw_temp-f4

lw_temp-f5

lw_temp-f6

lw_temp-f7

lw_temp-f8

lw_temp-f9

lw_temp-f10

INTO lt_attachment-line

SEPARATED BY lv_sep.

lt_attachment-line+254(1) = CL_ABAP_CHAR_UTILITIES=>CR_LF.

Read only

Former Member
0 Likes
365

Hi Vijay

Thanks a ton!!! A long standing problem has been resolved.

Points awarded.

Regards

Dinesh