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

Display Heading

Former Member
0 Likes
921

Hi all,

I am using REUSE_ALV_GRID_DISPLAY FM, i want to display report heading on first page(On Backgroud as well) so i have used standarad subroutineperform batch-heading(rsbtchh0).

It's not working...any help will be appreciated.

rgds,

Rag

8 REPLIES 8
Read only

Former Member
0 Likes
868

hi

debugg it find it out may be values are not passing properlay.

~linganna

Read only

0 Likes
868

I have already done this ...that's why i have posted it here .

Read only

0 Likes
868

what is happening in bugg mod.

Read only

0 Likes
868

Hi ,

Did you try top of page:

call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program          = v_repid
          i_callback_pf_status_set    = c_routinte_status
          i_callback_user_command     = c_routine_user
          i_callback_html_top_of_page = 'F_TOP_OF_PAGE'
          is_layout                   = v_layout
          it_fieldcat                 = i_fieldcat[]
          it_events                   = i_events
        tables
          t_outtab                    = i_final
        exceptions
          program_error               = 1
          others                      = 2.
      if sy-subrc <> 0.
...
      endif.

form f_top_of_page using p_doc type ref to cl_dd_document .
    call method p_doc->add_text
      exporting
        text         = 'Your text'
        sap_emphasis = c_bold.
endform.

Regards.

Edited by: Dev Parbutteea on Jul 2, 2009 12:24 PM

Read only

0 Likes
868

What is p_doc here ?

Read only

Pawan_Kesari
Active Contributor
0 Likes
868

How about using TOP_OF_LIST event callback of FM.

Populate the parameter

*"     REFERENCE(IT_EVENTS) TYPE  SLIS_T_EVENT OPTIONAL

of FM with 'TOP_OF_LIST' and you form name, which will be called on event TOP_OF_LIST. Then write code in that perfom to display report heading..

Read only

Former Member
0 Likes
868

hi,

try this..

DATA: it_event TYPE slis_t_event,

wa_event TYPE slis_alv_event.

"*****************************************

PERFORM create_event. " to handle alv events

"***************************************

&----


*& Form CREATE_EVENT

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM create_event .

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

  • EXPORTING

  • I_LIST_TYPE = 0

IMPORTING

et_events = it_event

EXCEPTIONS

list_type_wrong = 1

OTHERS = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

*

READ TABLE it_event INTO wa_event WITH KEY name = 'TOP_OF_PAGE'.

wa_event-form = 'TOP_OF_PAGE'.

MODIFY it_event FROM wa_event INDEX sy-tabix..

CLEAR wa_event.

ENDFORM. " CREATE_EVENT

"**************************************************************

&*********************************************************************

  • To display TOP_OF_PAGE.

************************************************************************

FORM top_of_page.

DATA:LV_DATE TYPE SY-DATUM,

LV_DATE1(10) TYPE C.

LV_DATE = SY-DATUM.

CONCATENATE LV_DATE4(2) '/' LV_DATE6(2) '/' LV_DATE+0(4) INTO LV_DATE1.

REFRESH it_header.

CLEAR l_string.

l_string = 'HEADER TEXT'(hd2).

wa_header-typ = 'H'.

wa_header-info = l_string.

APPEND wa_header TO it_header.

CLEAR wa_header.

wa_header-typ = 'S'.

wa_header-key = 'DATE' .

wa_header-info = LV_DATE1.

APPEND wa_header TO it_header.

CLEAR wa_header.

wa_header-typ = 'S'.

wa_header-key = 'USER NAME' .

wa_header-info = SY-UNAME.

APPEND wa_header TO it_header.

CLEAR wa_header.

**********FM TO WRITE THE HEADER ON THE LIST******

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = it_header

  • I_LOGO =

  • I_END_OF_LIST_GRID =

  • I_ALV_FORM =

.

ENDFORM. "top_of_page

hope this helps

Regards

RItesh J

Read only

Former Member
0 Likes
868

k thnx