Application Development 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: 

REUSE_ALV_FIELDCATALOG_MERGE new field missing

Former Member
0 Kudos

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?

1 ACCEPTED SOLUTION

Former Member

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

4 REPLIES 4

jayakummar
Active Participant
0 Kudos

Hi,

Please check Fieldcat Internal table which is passed into Display function module.

Thanks in advance,

jayakumar.M

0 Kudos

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

Former Member

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

0 Kudos

Thanks! problem solved!