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

CL_DOCUMENT_BCS question?

Former Member
0 Likes
875

HI

I am sending a text based contents of an internal table as an attachment in email. My code is as follows:

DATA   lo_document     TYPE REF TO cl_document_bcs.

  lo_document->add_attachment(
         EXPORTING
            i_attachment_type = 'RAW'
            i_attachment_subject = 'attachment'
            i_att_content_text = lt_attachment[] ).

I am getting the output attachment in the email as attachment.RAW. Is there a way I can get rid of the ".RAW" extension? I need the attachment file without any extensions.

Having a blank for attachment type outputs the file in binary file which is not of use to me.

Thanks in anticipation

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
799

Hi,

in table TSOTD you can find the list of valid types. Maybe type EXT may solve your issue.

Regards,

Klaus

3 REPLIES 3
Read only

Former Member
0 Likes
799

Hi Ramprasad,

Attachment type is mandatory field in class method-CL_DOCUMENT_BCS~ADD_ATTACHMENT so you have to provide the attachment type.

Regards,

Sudeesh Soni

Read only

Former Member
0 Likes
800

Hi,

in table TSOTD you can find the list of valid types. Maybe type EXT may solve your issue.

Regards,

Klaus

Read only

0 Likes
799

Hi

I tried EXT. It does produce an attachment file without file extension, however, the file is a binary file. I need the file to be opened in a text editor and be able to see text. Other types in the table are of no use to me. Thanks for your suggestion anyway.