11-20-2008 8:18 AM
Hi,
how to give the subheading(Top-of_page) in alv using REUSE_ALV_GRID_DISPLAY.
Example like
*********average of material**************.(main heading)
average of average of average of ***********(Subheadings)
3 months 6 months 12 months
Regards,
Suresh.
11-20-2008 8:29 AM
Hi
Try this code
******************************
FORM top_of_page.
DATA: lt_top_of_page TYPE slis_t_listheader ,
ls_line LIKE LINE OF lt_top_of_page.
DATA: c_title(60).
c_title = 'XXX'.
CLEAR : ls_line.
ls_line-typ = 'H'.
LS_LINE-KEY: not used for this type
ls_line-info = v_title1. "some text
APPEND ls_line TO lt_top_of_page.
CLEAR : ls_line.
ls_line-typ = 'S'.
LS_LINE-KEY: not used for this type
ls_line-info = v_werks.
APPEND ls_line TO lt_top_of_page.
CLEAR : ls_line.
ls_line-typ = 'S'.
LS_LINE-KEY: not used for this type
ls_line-info = v_title2. "some text
APPEND ls_line TO lt_top_of_page.
CLEAR : ls_line.
ls_line-typ = 'S'.
LS_LINE-KEY: not used for this type
ls_line-info = v_title3. "some text
APPEND ls_line TO lt_top_of_page.
Kopfinfo: Typ S
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = lt_top_of_page
I_LOGO =
I_END_OF_LIST_GRID =
I_ALV_FORM =
.
ENDFORM. "TOP_OF_PAGE
11-20-2008 8:29 AM
Hi
Try this code
******************************
FORM top_of_page.
DATA: lt_top_of_page TYPE slis_t_listheader ,
ls_line LIKE LINE OF lt_top_of_page.
DATA: c_title(60).
c_title = 'XXX'.
CLEAR : ls_line.
ls_line-typ = 'H'.
LS_LINE-KEY: not used for this type
ls_line-info = v_title1. "some text
APPEND ls_line TO lt_top_of_page.
CLEAR : ls_line.
ls_line-typ = 'S'.
LS_LINE-KEY: not used for this type
ls_line-info = v_werks.
APPEND ls_line TO lt_top_of_page.
CLEAR : ls_line.
ls_line-typ = 'S'.
LS_LINE-KEY: not used for this type
ls_line-info = v_title2. "some text
APPEND ls_line TO lt_top_of_page.
CLEAR : ls_line.
ls_line-typ = 'S'.
LS_LINE-KEY: not used for this type
ls_line-info = v_title3. "some text
APPEND ls_line TO lt_top_of_page.
Kopfinfo: Typ S
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = lt_top_of_page
I_LOGO =
I_END_OF_LIST_GRID =
I_ALV_FORM =
.
ENDFORM. "TOP_OF_PAGE
11-20-2008 8:31 AM
FORM TOP USING T_HEADING TYPE SLIS_T_LISTHEADER.
DATA: X_HEADING TYPE SLIS_LISTHEADER.
CLEAR T_HEADING.
CLEAR X_HEADING.
X_HEADING-TYP = 'H'.
X_HEADING-INFO = ' *********average of material**************'.
APPEND X_HEADING TO T_HEADING.
CLEAR X_HEADING.
X_HEADING-TYP = 'S'.
X_HEADING-INFO = 'average of average of average of ***********'.
APPEND X_HEADING TO T_HEADING.
CLEAR X_HEADING.
X_HEADING-TYP = 'S'.
X_HEADING-INFO = '3 months 6 months 12 months'.
APPEND X_HEADING TO T_HEADING.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = T_HEADING[].
I_LOGO = 'ENJOYSAP_LOGO'.
ENDFORM. "top
11-20-2008 9:05 AM
Hi,
average of material is mainheading(1st row heading).
mainheaing subdivided into 3 headings like averarage of 3 months , averarage of 6 months and averarage of 12 months(2nd row heading)
-
average of material.(main heading)
average of -
average of -
average of (Subheadings)
3 months -
6 months -
12 months
Regards,
Suresh.