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

urgent alv problem

Former Member
0 Likes
767

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.

6 REPLIES 6
Read only

Former Member
0 Likes
729

Just refresh the fieldcatalog table before filling it with the field information.

Read only

0 Likes
729

refresh <field catalog table>[].

Read only

Former Member
0 Likes
729

Hi,

problem is that you internal table is getting

appended for each call . refresh table as below

when 'TOTAL'.

free i_fieldcatalog.

Regards

Amole

Read only

Former Member
0 Likes
729

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.

Read only

0 Likes
729

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??

Read only

0 Likes
729

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