05-22-2009 9:46 AM
Hi guys,
I'm adding one more column to be displayed on an old existing program that uses REUSE_ALV_FIELDCATALOG_MERGE to generate the ALV fieldcat.
DATA : BEGIN OF itab OCCURS 0,
matnr LIKE eina-matnr,
extwg LIKE mara-extw,
matkl LIKE mara-matkl,
mtart LIKE mara-mtart,
maktx LIKE makt-maktx,
lifnr LIKE eina-lifnr,
wglif LIKE eina-wglif,
{color:red}idnlf like eina-idnlf, " <---------new field{color}
name1 LIKE lfa1-name1,
profl LIKE mara-profl,
END OF itab.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-cprog
i_internal_tabname = 'ITAB'
i_client_never_display = ''
i_inclname = sy-cprog
* i_bypassing_buffer = 'X'
CHANGING
ct_fieldcat = t_cat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
I've added in a new field inside the ITAB internal table, but it wouldn't appear in the t_cat, only all the old fields will appear. What have i done wrong?
05-22-2009 10:01 AM
Hi,
This issue with ALV buffer: when you change field catalog it is not always updated immediately. To refresh the buffer you can run report BALVBUFDEL or BCALV_BUFFER_DEL_SHARED (I do not remember the difference and so run both to be sure ). ....
If you have any variant ,Please dletete the variante and try.
Regards
Pugazhenthi.P
Satyam Computer Services Ltd
05-22-2009 9:49 AM
Hi,
Please check Fieldcat Internal table which is passed into Display function module.
Thanks in advance,
jayakumar.M
05-22-2009 9:54 AM
This is the t_cat I receive after running through the FM.
ROW_POS COL_POS FIELDNAME TABNAME
0 | 1 |MATNR |ITAB <
0 | 2 |EXTWG |ITAB <
0 | 3 |MATKL |ITAB <
0 | 4 |MTART |ITAB <
0 | 5 |MAKTX |ITAB <
0 | 6 |LIFNR |ITAB <
0 | 7 |WGLIF |ITAB <
0 | 8 |NAME1 |ITAB <
0 | 9 |PROFL |ITAB <
As you can see, IDNLF is missing in t_cat.
Thanks for helping
05-22-2009 10:01 AM
Hi,
This issue with ALV buffer: when you change field catalog it is not always updated immediately. To refresh the buffer you can run report BALVBUFDEL or BCALV_BUFFER_DEL_SHARED (I do not remember the difference and so run both to be sure ). ....
If you have any variant ,Please dletete the variante and try.
Regards
Pugazhenthi.P
Satyam Computer Services Ltd
05-22-2009 10:07 AM