‎2008 Dec 18 7:08 AM
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
‎2008 Dec 18 7:22 AM
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.
‎2008 Dec 18 7:22 AM
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.
‎2008 Dec 18 8:07 AM
Hi Vijay
Thanks a ton!!! A long standing problem has been resolved.
Points awarded.
Regards
Dinesh