Build Report Header(Title)


----Add to START-OF-SELECTION Event
* Create Report Title
  PERFORM build_report_title USING gd_report_title gd_logo.
----Add to main prog after START-OF-SELECTION Event
*&-------------------------------------------------------------*
*&      Form  BUILD_REPORT_TITLE
*&-------------------------------------------------------------*
*       Build table for ALVtree header
*--------------------------------------------------------------*
*  <->  p1        Header details
*  <->  p2        Logo value
*--------------------------------------------------------------*
FORM build_report_title CHANGING
      pt_report_title  TYPE slis_t_listheader
      pa_logo             TYPE sdydo_value.
  DATA: ls_line TYPE slis_listheader,
        ld_date(10) TYPE c.
* List Heading Line(TYPE H)
  CLEAR ls_line.
  ls_line-typ  = 'H'.
* ls_line-key     "Not Used For This Type(H)
  ls_line-info = 'PO ALVTree Display'.
  APPEND ls_line TO pt_report_title.
* Status Line(TYPE S)
  ld_date(2) = sy-datum+6(2).
  ld_date+2(1) = '/'.
  ld_date+3(2) = sy-datum+4(2).
  ld_date+5(1) = '/'.
  ld_date+6(4) = sy-datum(4).
  ls_line-typ  = 'S'.
  ls_line-key  = 'Date'.
  ls_line-info = ld_date.
  APPEND ls_line TO pt_report_title.
* Action Line(TYPE A)
  CLEAR ls_line.
  ls_line-typ  = 'A'.
  CONCATENATE 'Report: ' sy-repid INTO ls_line-info  SEPARATED BY space.
  APPEND ls_line TO pt_report_title.
ENDFORM.           "BUILD_REPORT_TITLE
  

Related Articles

Activate user interaction within SAP ALV tree
Add button to SAP ALV tree toolbar using ABAP code
ABAP ALV Tree tutorial to create a fully working ALVTree Control SAP dynpro program
Create ALV Tree Custom control and add to sap dynpro screen
Final ABAP code for the ALV Tree PBO(..O01) and FORM(..F01) includes
Create SAP ALV Tree Container in ABAP dynpro screen container
Create Container and Object
Create ALV tree main program including Data & Event declaration
SAP ALV Tree fieldcatalog creation
Set SAP ALV tree table for first display and user interaction
Build SAP ALV tree Hierarchy
Build SAP ALV tree Hierarchy Header
Add alv tree already exists check to pbo module
Create all includes required for the ALV tree report
Full ABAP code listing of main ALV tree program
Module creation screen
Create SAP ALV Tree object within ABAP dynpro screen container/H1>
Create ok code to store ALV tree user interaction
Example Output from ALV tree display
Create screen control
Create Screen along with PBO and PAI modules
Create Pf-status(screen menu functionality)
Refresh ALVtree
ALVtree toolbar processing
Implement user defined buttons to ALVtree toolbar
ALVtree user interaction processing
Implement ALVtree user interaction processing
Setup ALVtree variant
Main Steps to create ALV simple Tree(Using Objects)
Create Add Custom control to screen
Final code for the PBO(..O01) and FORM(..F01) includes
Create Container and Object
Create and register events for user interaction
Create ALVtree Hierarchy
Add already exists check!
Create Includes for ALVtree report
Full ABAP code listing of main program
Create Container and Object
Create screen control
Example Output from ALV simple tree display
Create screen control
Create Screen along with PBO and PAI modules
Create Pf-status(screen menu functionality)