2006 Sep 18 11:30 AM
Hi,
I m getting one problem in alv. My all o/p values are right but when i press total button my heading in alv get repeated. Will u tell me what i have to do so that i can solve the problem.
Hi,
I m getting one problem in alv. My all o/p values are right but when i press total button my heading in alv get repeated. Will u tell me what i have to do so that i can solve the problem.
2006 Sep 18 11:32 AM
Just refresh the fieldcatalog table before filling it with the field information.
2006 Sep 18 11:33 AM
2006 Sep 18 11:36 AM
Hi,
problem is that you internal table is getting
appended for each call . refresh table as below
when 'TOTAL'.
free i_fieldcatalog.
Regards
Amole
2006 Sep 18 11:37 AM
hi salil,
refresh the fieldcatalog before it is populated.
otherwise each time the headings get appended to the internal table
refresh it_fieldcat.
clear it_fieldcat.
2006 Sep 18 12:26 PM
Hi,
My problem is like
in o/p screen
prog xyz
date 09/1/2006
custno amount country
123 1200 uk
145 1500 us
when i press summation button in my alv report i got the o/p as
prog xyz
date 09/1/2006
prog xyz
date 09/1/2006
prog xyz
date 09/1/2006
anybody will tell me what i can do??
2006 Sep 18 12:36 PM
I think you are talking about the ALV header here which you must be filling in the "TOP-OF-PAGE" event.
You can refresh the header before filling the it.For example
IT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
G_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
*Build the event table
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = IT_EVENTS.
READ TABLE IT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE G_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO IT_EVENTS.
ENDIF.
REFRESH IT_LIST_TOP_OF_PAGE[].
FORM TOP_OF_PAGE.
ULINE.
WRITE : SY-TITLE(65) CENTERED, 'Page :' , SY-PAGNO .
ULINE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
I_LOGO = 'ENJOYSAP_LOGO'
IT_LIST_COMMENTARY = IT_LIST_TOP_OF_PAGE.
ULINE.
ENDFORM. "TOP_OF_PAGE