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

How to convert internal table data into excel format?

arpita_churi3
Active Participant
0 Likes
1,378

Hi all,

I want to convert internal table data in excel format and then

send it as email attachment in workflow.

Please tell me how do i perform this.

Regards,

Arpita.

1 ACCEPTED SOLUTION
Read only

former_member632729
Contributor
0 Likes
1,000

Hi,

use this FM SAP_CONVERT_TO_XLS_FORMAT

Raghunath.S

Hi all,

I want to convert internal table data in excel format and then

send it as email attachment in workflow.

Please tell me how do i perform this.

Regards,

Arpita.

6 REPLIES 6
Read only

Former Member
0 Likes
1,000

HI,

You can give the format as .DAT

Then, it will open with AS-EXCEL also.

Hope this helps.

Regards,

Rajat

Read only

Former Member
0 Likes
1,000

Hi

Use SO_NEW_DOCUMENT_SEND_API1 FM

Refer This LInk

Ranga

Read only

Former Member
0 Likes
1,000

hi

please refer to this thread

hope this helps

regards

Aakash Banga

Read only

Former Member
0 Likes
1,000

Hi Arpita,

Try this sample code::

Send mail

maildata-obj_name = 'TEST'.

maildata-obj_descr = 'Test Subject'.

loop at htmllines.

mailtxt = htmllines.

append mailtxt.

endloop.

mailrec-receiver = 'your receiver mail id'.

mailrec-rec_type = 'U'.

append mailrec.

call function 'SO_NEW_DOCUMENT_SEND_API1'

exporting

document_data = maildata

document_type = 'EXL'

put_in_outbox = 'X'

tables

object_header = mailtxt

object_content = mailtxt

receivers = mailrec

exceptions

too_many_receivers = 1

document_not_sent = 2

document_type_not_exist = 3

operation_no_authorization = 4

parameter_error = 5

x_error = 6

enqueue_error = 7

others = 8.

if sy-subrc 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

Hope it will help you.

Regards,

NIkita

Read only

former_member632729
Contributor
0 Likes
1,001

Hi,

use this FM SAP_CONVERT_TO_XLS_FORMAT

Raghunath.S

Read only

0 Likes
1,000

Hi,

Thanks for reply.

it is working now.

Regards,

Arpita