2012 Jul 03 11:31 AM
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
2012 Jul 03 11:53 AM
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
2012 Jul 03 11:43 AM
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.
2012 Jul 03 11:45 AM
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.
2012 Jul 03 12:03 PM
Hi chinmay.
i have checked the field of my field catalog and my tab <f_tab>...they are having the same fields
2012 Jul 03 12:11 PM
2012 Jul 03 11:53 AM
Try running BALVBUFDEL report and do a consistency check .
http://help.sap.com/saphelp_470/helpdata/en/d6/23253963143e6ae10000000a11402f/content.htm
2012 Jul 03 12:22 PM
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
2012 Jul 03 12:59 PM
Hi,
You can find the info in this note.
Note 122975 - Resetting buffering of ALV field catalog
Thanks,
Shambu
2012 Jul 03 11:59 AM
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.
2012 Jul 03 12:07 PM
What will happen to field catalog if internal table IT_EKPO contains more than one record for a particular LIFNR ?
Regards, Vinod
2012 Oct 31 2:47 PM
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.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |