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

ALV to HTML

Former Member
0 Likes
2,190

Dear All,

In a report FM "resuse_ALV-List_display" is used with grouping and sorting.

Is there any way to download/display the report in HTML file instead of ALV list display.

I know there is an option to download ALV list to HTML after List is displayed. But I want instead of ALV list HTML should be displayed or downloaded with the same format as ALV list.

Please let me know.

Regards

Arindam

2 REPLIES 2
Read only

Former Member
0 Likes
1,130

hi,

Once ALV is displayed use this path from menu bar system->list->save->HTML.

Read only

Former Member
0 Likes
1,130

Hi Arindam,

Check the below DEMO programs provided by SAP for ALV Functionalities.

BCALV_DEMO_HTML

BCALV_TEST_FULLSCREEN_HTML

BCALV_TEST_FULLSCREEN_HTMLTOP

BCALV_TEST_HTML_HEADER

Check the below code for your refernce

REPORT  y_test_export.
DATA: html TYPE TABLE OF w3html. " occurs 10 with header line.
DATA: html_wa TYPE w3html.
DATA: listobject TYPE TABLE OF abaplist. " occurs 10.
DATA: report_name TYPE syrepid.
 
report_name = 'DEMO_LIST_FORMAT_COLOR_1' .
 
SUBMIT (report_name) EXPORTING LIST TO MEMORY AND RETURN .
 
CALL FUNCTION 'LIST_FROM_MEMORY'
  TABLES
    listobject = listobject.
 
CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
  EXPORTING
    report_name = report_name
  TABLES
    html        = html
    listobject  = listobject.