Application Development 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: 

Long text in mail as excel attachment

former_member583823
Participant
0 Kudos

Hi Experts,

I am sending internal table as excel attachment in mail through Function Module -  SO_DOCUMENT_SEND_API1.

But there is one field with long text. Pls help me how to send long text in excel sheet as mail attachment.

Regards,

Reny Richard

7 REPLIES 7

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

Loop on the output table of read_text and concatenate the lines into string.

Regards.

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

And do your self a favor and use CL_BCS instead of SO_DOCUMENT_SEND_API1 .

See Send email from ABAP with class CL_BCS - Code Gallery - SCN Wiki

See

Use "where use" for class CL_BCS .

Regards.

former_member220028
Active Contributor
0 Kudos

Hi,

longtexts are stored as SO10 Texts, though you need to get them via READ_TEXT as Etian Rosenberg already said.

you have to find out what Type and IDs these texts have in your szenario.

regards

Stefan Seeburger

former_member583823
Participant
0 Kudos

Hi Experts,

I am getting the long text from table - /BOBF/D_TXCCON and field is TEXT which is of type String..

I am getting entire text in internal table but while sending data to excel. Only 255 character is available.

Regards,

Reny Richard

former_member220028
Active Contributor
0 Kudos

Hi,

i think using csv format is the easiest solution. otherwise you have to search the forum how to handle the 255 character restriction.

regards

Stefan Seeburger

former_member583823
Participant
0 Kudos

Hi All,

Thanks for the support.. I was able to solve the issue with FM SO_DOCUMENT_SEND_API1.

Thanks,

Reny Richard

former_member220028
Active Contributor
0 Kudos

Hello,

can you provide the solution and mark as answered?

regards

Stefan Seeburger