SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

ALV in HTML format



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ALV Grid / ALV Tree / ALV List
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Sat Sep 13, 2008 7:18 pm    Post subject: ALV in HTML format Reply with quote

Author: Venkat Appikonda

Code:
REPORT ztest_page.
DATA : it_flight TYPE TABLE OF sflight WITH HEADER LINE.
DATA: t TYPE x.

START-OF-SELECTION.
  SELECT * FROM sflight INTO TABLE it_flight.

END-OF-SELECTION.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program          = sy-repid
      i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
      i_callback_top_of_page      = 'TOP_OF_PAGE'
      i_structure_name            = 'SFLIGHT'
    TABLES
      t_outtab                    = it_flight
    EXCEPTIONS
      program_error               = 1
      OTHERS                      = 2.
*&---------------------------------------------------------------------*
*& Form TOP_OF_PAGE
*----------------------------------------------------------------------*
FORM top_of_page.
  WRITE 'This is the Top of page which triggers in print'.
ENDFORM. "TOP_OF_PAGE
*&---------------------------------------------------------------------*
*& Form html_top_of_page
*&---------------------------------------------------------------------*
FORM html_top_of_page USING document TYPE REF TO cl_dd_document.
  DATA : dl_text(255) TYPE c. "Text
* Add new-line
  CALL METHOD document->new_line.
  CALL METHOD document->new_line.
  CLEAR : dl_text.
* program ID
  dl_text = 'Program Name :'.
  CALL METHOD document->add_gap.
  CALL METHOD document->add_text
    EXPORTING
      text         = dl_text
      sap_emphasis = cl_dd_area=>heading
      sap_color    = cl_dd_area=>list_heading_int.
  CLEAR dl_text.
  dl_text = sy-repid.
  CALL METHOD document->add_text
    EXPORTING
      text         = dl_text
      sap_emphasis = cl_dd_area=>heading
      sap_color    = cl_dd_area=>list_negative_inv.
* Add new-line
  CALL METHOD document->new_line.
  CLEAR : dl_text.
  dl_text = sy-uname.
  CALL METHOD document->add_gap
    EXPORTING
      width = 34.
  CALL METHOD document->add_text
    EXPORTING
      text         = dl_text
      sap_emphasis = cl_dd_area=>heading
      sap_color    = cl_dd_area=>list_negative_inv.
* Add new-line
  CALL METHOD document->new_line.
  CLEAR : dl_text.
  CALL METHOD document->add_gap
    EXPORTING
      width = 34.
* Move date
  WRITE sy-datum TO dl_text.
  CALL METHOD document->add_text
    EXPORTING
      text         = dl_text
      sap_emphasis = cl_dd_area=>heading
      sap_color    = cl_dd_area=>list_negative_inv.
* Add new-line
  CALL METHOD document->new_line.
  CLEAR : dl_text.
* Move time
  WRITE sy-uzeit TO dl_text.
  CALL METHOD document->add_gap
    EXPORTING
      width = 34.
  CALL METHOD document->add_text
    EXPORTING
      text         = dl_text
      sap_emphasis = cl_dd_area=>heading
      sap_color    = cl_dd_area=>list_negative_inv.
* Add new-line
  CALL METHOD document->new_line.
ENDFORM. "HTML_TOP_OF_PAGE
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ALV Grid / ALV Tree / ALV List All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.