Skip to Content
0
Former Member
Mar 04, 2008 at 03:57 AM

alv

14 Views

Hi all,

I'm making a fieldcatalog in this i'm sending a field text by merging two data. and in of the fieldcatalog is pointing the same data type. ie date type.

now when I'm displaying this fieldcatalog it shows the text heading as date1 date1 all the time. attaching my code with it.

please kindly look into it and let me know what is the problem.

REPORT ZTEST_MP_DATE.

tables: pa0001.

data: begin of itab occurs 0,

date type pa0001-begda,

end of itab.

type-pools : SLIS.

data: date(10) type c.

data: count type i value 1.

data: repid like sy-repid.

data: it_fieldcat type slis_t_fieldcat_alv,

wa_fieldcat type slis_fieldcat_alv.

data: wa_layout type slis_layout_alv.

data: count1 type i value 1,

header(2) type c.

start-of-selection.

DO 20 times.

header = count1.

concatenate 'DATE' header into WA_FIELDCAT-SELTEXT_S.

concatenate 'DATE' header into WA_FIELDCAT-FIELDNAME.

*WA_FIELDCAT-FIELDNAME = 'DATE'.

WA_FIELDCAT-TABNAME = 'ITAB'.

*WA_FIELDCAT-SELTEXT_L = 'DATE'.

WA_FIELDCAT-COL_POS = count.

WA_FIELDCAT-OUTPUTLEN = 10.

APPEND WA_FIELDCAT TO IT_FIELDCAT.

CLEAR WA_FIELDCAT.

count = count + 1.

count1 = count1 + 1.

enddo.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

IS_LAYOUT = WA_LAYOUT

IT_FIELDCAT = IT_FIELDCAT

*I_TABNAME = 'ITAB'

*IT_EVENTS = GT_YEVENTS

*IT_SORT =

*I_TEXT = ' '

TABLES

T_OUTTAB = ITAB

EXCEPTIONS

PROGRAM_ERROR = 1

MAXIMUM_OF_APPENDS_REACHED = 2

OTHERS = 3

.

end-of-selection.

reward point for all useful answere.