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

Issue with SO_DOCUMENT_SEND_API1

Former Member
0 Likes
381

Hi Experts,

I am sending mail and an excelsheet attachment through SO_DOCUMENT_SEND_API1.

My issue is i am having 5 rows in the internal table which i am passing to this FM.

But when checked in the inbox, only 3 rows are coming in the excel attachement.

Please guide me.

2 REPLIES 2
Read only

Former Member
0 Likes
347

Hi

Let us know how you are passing the internal table content to the mailing FM.

Regards

Raj

Read only

Former Member
0 Likes
347

Hi Swapnil,

There Could be an issue when you are transforming your Internal table in to Excel file, Kindly follow the Example code below and do modifocations accordingly.

The below code shows you how to create an excell table form your data.

*Build data table for .xls document

*If you have Unicode check active in program attributes thnen you will

*need to declare constants as follows

*class cl_abap_char_utilities definition load.

constants:

con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret type c value cl_abap_char_utilities=>CR_LF.

CONCATENATE 'MACHINE' 'MODEL'
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.

LOOP AT iTAB.
CONCATENATE ITAB-ZMACHINE ITAB-ZMODEL
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
ENDLOOP.