Skip to Content
0
Jul 03, 2012 at 10:31 AM

Values repeating in ALV

1948 Views

hello all,

i am trying to build a report using dynamic alv.

I am getting correct data into my tab <f_tab> but while displaying it for first few columns the values are repeating.

I know that it is problem with field catalague but i tried in many ways but in vain

my field catalogue declaration is as follows

WA_FIELDCAT-SELTEXT_L = 'SITE NAME'.
WA_FIELDCAT-FIELDNAME = 'SITE'.
WA_FIELDCAT-OUTPUTLEN = '20'.
APPEND WA_FIELDCAT TO GT_FIELDCAT.
CLEAR WA_FIELDCAT.

LOOP AT IT_EKPO1 INTO WA_EKPO1.
READ TABLE IT_LFA1 INTO WA_LFA1 WITH KEY LIFNR = WA_EKPO1-LIFNR.
IF SY-SUBRC = 0.
REPLACE ALL OCCURRENCES OF '(' IN WA_LFA1-NAME1 WITH SPACE.
REPLACE ALL OCCURRENCES OF ')' IN WA_LFA1-NAME1 WITH SPACE.
CONDENSE WA_LFA1-NAME1 NO-GAPS.

WA_FIELDCAT-FIELDNAME = WA_LFA1-NAME1.
WA_FIELDCAT-SELTEXT_M = WA_LFA1-NAME1.
* WA_FIELDCAT-TABNAME = <F_TAB>.
WA_FIELDCAT-OUTPUTLEN = '25'.
APPEND WA_FIELDCAT TO GT_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDIF.
ENDLOOP.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = T_LAYOUT
IT_FIELDCAT = GT_FIELDCAT
I_SAVE = 'X'
TABLES
T_OUTTAB = <F_TAB>.

IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.

i amattaching screen shot how it is displayed.

in that 2nd 3rd 4th columns values are repeated but in my tab <f_tab> they are correct.

where im going wrong.

ujwal

Moderator Message: Please do not use ALL CAPS in your subject line.

Message was edited by: Kesavadas Thekkillath

Attachments

zdoc.png (126.2 kB)