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

Values repeating in ALV

former_member420959
Participant
0 Likes
5,601

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,648

Try running BALVBUFDEL report and do a consistency check .

http://help.sap.com/saphelp_470/helpdata/en/d6/23253963143e6ae10000000a11402f/content.htm

Try running BALVBUFDEL report and do a consistency check .

http://help.sap.com/saphelp_470/helpdata/en/d6/23253963143e6ae10000000a11402f/content.htm

10 REPLIES 10
Read only

laurent_fournier2
Contributor
0 Likes
3,648

Hi,

I have seen many times this kind of problems to be produced from buffers.

Try the following :

Change the code in order to pass empty field catalog to reuse_alv_grid_display.

Execute your program ( Will produce a dump no_fieldcatalog_available ).

Revert to the old version ( fill correctly the field Catalog ).

Try again to execute the program.

Most of the times the above procedure has solved this kind of problems.

Regards.

Read only

Former Member
0 Likes
3,648

Whenever values repeat in ALV, the column is present in Field catlog, but absent in Internal table that is passed.

Please check the mapping of fields of <F_TAB> and the fields mentioned in field catlog.

Read only

0 Likes
3,648

Hi chinmay.

i have checked the field of my field catalog and my tab <f_tab>...they are having the same fields

Read only

0 Likes
3,648

Have you tried the solution I proposed ?

Read only

Former Member
0 Likes
3,649

Try running BALVBUFDEL report and do a consistency check .

http://help.sap.com/saphelp_470/helpdata/en/d6/23253963143e6ae10000000a11402f/content.htm

Read only

0 Likes
3,648

Thanks shambu,

My problem resolved and i learned a new thing today.

But i have doubt,

do we have to run the report BALVBUFDEL before doing this.

what exatly does this report do???

Thanks once again

Read only

0 Likes
3,648

Hi,

You can find the info in this note.

Note 122975 - Resetting buffering of ALV field catalog

Thanks,

Shambu

Read only

Former Member
0 Likes
3,648

Dear Ujwal

i am agree ,

desynchronize of fields between internaltable and alv field specification causes the duplication

of display.

make sure it should be mapped end to end.

Regards.

Read only

Former Member
0 Likes
3,648

What will happen to field catalog if internal table IT_EKPO contains more than one record for a particular LIFNR ?

Regards, Vinod

Read only

Former Member
0 Likes
3,648

Hi Shambhu,

I have same issue  in a report .

I have run the report  'BALVBUFDEL' as you explianed.

It gave success message ' %F buffer of EUINFO/LTEX has been reset' .

After this i run my report  but no luck...

Any idea how shall i proceed?

Thanks,

Pavani.