Application Development 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: 

Subheadings(Top-of_page) in REUSE_ALV_GRID_DISPLAY

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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.