[SAP ABAP] Convert LIST MEMORY to HTML

FUNCTION zfmarein_list_to_html.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  TABLES
*"      T_HTML STRUCTURE  W3HTML
*"----------------------------------------------------------------------


  DATA li_tmp LIKE STANDARD TABLE OF abaplist WITH HEADER LINE,
           li_html LIKE STANDARD TABLE OF w3html WITH HEADER LINE.

  REFRESH t_html.

*  "Get Report Memory
  CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
      listobject li_tmp
    EXCEPTIONS
      not_found  4
      OTHERS     8.

  CALL FUNCTION 'WRITE_LIST'
    TABLES
      listobject li_tmp
    EXCEPTIONS
      empty_list 1
      OTHERS     2.

  CALL FUNCTION 'WWW_LIST_TO_HTML'
    TABLES
      html   li_html
    EXCEPTIONS
      OTHERS 1.

  t_html[] li_html[].



ENDFUNCTION.

Comments