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

Convert ALV selected data to html

Former Member
0 Likes
1,350

Hello Guys...

I am New in ABAP can you help me with my problem how can i convert the selected data in ALV report to make as body of the email in a table style..please help me..thank you..

Message was edited by: Manish Kumar <meaningful subject added by moderator>

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,005

Hi John,

Once you have the selected entries of the ALV in an internal table.

You need to use e-mail body as HTML and use HTML tags to build the table in email body.

Could you tell me if you are using any function module for e-mail triggerring or are you using class-methods.

if you are using class CL_DOCUMENT_BCS then you can use like below:

*-- Create the email document

           lo_document = cl_document_bcs=>create_document(

                                         i_type = 'HTM'

                                         i_text = lt_message_body

                                         i_subject = lv_subject ).

then while populating table LT_MESSAGE_BODY you need to use table tags like <TD> <TR> and format the table as required and build the body content. This should do the trick.

And if you are using any Function module then may be the below link might help you:

You just need to change the table html tags as required and build it. The link is just a reference.

Thanks,

Naveen

Hello Guys...

I am New in ABAP can you help me with my problem how can i convert the selected data in ALV report to make as body of the email in a table style..please help me..thank you..

Message was edited by: Manish Kumar <meaningful subject added by moderator>

3 REPLIES 3
Read only

Former Member
0 Likes
1,006

Hi John,

Once you have the selected entries of the ALV in an internal table.

You need to use e-mail body as HTML and use HTML tags to build the table in email body.

Could you tell me if you are using any function module for e-mail triggerring or are you using class-methods.

if you are using class CL_DOCUMENT_BCS then you can use like below:

*-- Create the email document

           lo_document = cl_document_bcs=>create_document(

                                         i_type = 'HTM'

                                         i_text = lt_message_body

                                         i_subject = lv_subject ).

then while populating table LT_MESSAGE_BODY you need to use table tags like <TD> <TR> and format the table as required and build the body content. This should do the trick.

And if you are using any Function module then may be the below link might help you:

You just need to change the table html tags as required and build it. The link is just a reference.

Thanks,

Naveen

Read only

0 Likes
1,005

thank you very much..converting to HTML now ok..now im working on the details on the table that get in the alv display..

Read only

0 Likes
1,005

If you are successful, please close the thread by marking it as answered.

Thanks,

Naveen