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

header

Former Member
0 Likes
718

hii,

how to align the heading of output.

i want the heading in center.

i used SLIS_T_LISTHEADER.

thanks.

5 REPLIES 5
Read only

Former Member
0 Likes
679

HI ,

if the line size of ur report is 80 (say) , then u can use the wtite statement in top of list as write (40) 'header'.

reggards,

Ramya

Read only

Former Member
0 Likes
679

u should use it only in this order.

  • Report title

clear t_heading[].

clear x_heading.

x_heading-typ = 'H'.

x_heading-info = 'AKBOSS'(001).

append x_heading to t_heading.

  • Program name

clear x_heading.

x_heading-typ = 'S'.

x_heading-key = 'Program: '.

x_heading-info = sy-repid.

append x_heading to t_heading.

  • User who is running the report

clear x_heading.

x_heading-typ = 'A'.

x_heading-info = sy-uname.

append x_heading to t_heading.

if u replace the order also, only header will trigger first. so it is not possible.

Read only

0 Likes
679

hi shan,

wats this (001) do in your code

thanks all of u..

Edited by: aks on Oct 17, 2008 2:24 AM

Edited by: aks on Oct 17, 2008 2:25 AM

Read only

Former Member
0 Likes
679

hi aks

simply

TOP-OF-PAGE.

write: / (no. of columns after you want to write your header)

thnxs and regards

sachin sharma

njoy day!!!

Read only

Former Member
0 Likes
679

Hi ,

To get heading in center use html_top_of_page.

code will be like this:


FORM html_top_of_page USING top TYPE REF TO cl_dd_document.

  DATA: l_text(255) TYPE c.
  DATA: text1(255)  TYPE c.
  DATA: t_header TYPE REF TO cl_dd_table_element ,
        wa_header TYPE REF TO cl_dd_table_area.

  CALL METHOD top->add_gap --->USED TO GIVE THE DESIRED GAP
    EXPORTING
      width = 10.


  CALL METHOD top->add_text
    EXPORTING
      text          = '<YOUR TEXT GOES HERE>'
*    text_table    = wa_header
*    fix_lines     =
      sap_style     = 'HEADING'
      sap_color     = cl_dd_document=>list_heading_int
      sap_fontsize  = 'MEDIUM'
      sap_fontstyle = 'ARIAL'
      sap_emphasis  = cl_dd_document=>strong.
*    style_class   =
*  CHANGING
*    document      =
   ENDIF.

AND PASS IT TO :


CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
*   I_INTERFACE_CHECK                 = ' '
*   I_BYPASSING_BUFFER                = ' '
*   I_BUFFER_ACTIVE                   = ' '
  i_callback_program                = sy-repid
   i_callback_pf_status_set          = 'SET_STANDARD'
   i_callback_user_command           = 'USER_COMMAND'
*   I_CALLBACK_TOP_OF_PAGE            = ' '
   i_callback_html_top_of_page       = 'HTML_TOP_OF_PAGE'
.
.
.
.
.