2015 Feb 02 1:37 PM
Hi ,
In my 'XLS" attachment data alignment is not appearing correctly when using classes.please let me know what needs to be done.
below is the code.
DATA : lt_att_content_table TYPE soli_tab,
ls_text TYPE soli.
CONCATENATE 'USERID' 'USER NAME' 'PS No.'
INTO ls_text SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
APPEND ls_text TO lt_att_content_table.
CLEAR:ls_text.
LOOP AT gt_usr02_attach INTO gs_usr02_attach.
CONCATENATE gs_usr02_attach-userid gs_usr02_attach-ename
gs_usr02_attach-pernr
INTO ls_text SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
APPEND ls_text TO lt_att_content_table.
CLEAR:ls_text.
ENDLOOP.
**mail cc to HR
lv_attach_name = 'SAP Logon Details.xls'.
CALL METHOD lref_document->add_attachment
EXPORTING
i_attachment_type = 'XLS'
i_attachment_subject = lv_attach_name
i_att_content_text = lt_att_content_table.
Screenshot in the attached xls file.:
2015 Feb 02 3:48 PM
Hi Dhinesh,
BCS_EXAMPLE_7 - is the example program which uses Cl_BCS class to send email with XLS attachement. Please refer to it. I think you need to add CL_ABAP_CHAR_UTILITIES=>CR_LF to trigger a new line.
Thanks,
Naga
2015 Feb 02 3:48 PM
Hi Dhinesh,
BCS_EXAMPLE_7 - is the example program which uses Cl_BCS class to send email with XLS attachement. Please refer to it. I think you need to add CL_ABAP_CHAR_UTILITIES=>CR_LF to trigger a new line.
Thanks,
Naga