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: 

Problem with ALV using classes

Former Member
0 Kudos

Dear all,

I am facing a strange problem with ALV grid.

I am using the method set_table_for_first_display of class cl_gui_alv_grid.

For Layout I am using FM 'LVC_FIELDCATALOG_MERGE'.

In the output all the fields are displayed in blue colour. I am not modifying the field catalogue.

One more strange thing I observed is if I dont pass variant to the method set_table_for_first_display, the output is fine (all the columns are in white colour).

Now I want all the fields in white colour when i pass variant.

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
      i_structure_name       = 'ZC9_TWS_DEV_OUTPUT'
      i_bypassing_buffer     = 'X'
    CHANGING
      ct_fieldcat            = gs_fieldcat
    EXCEPTIONS
      inconsistent_interface = 0
      program_error          = 0
      OTHERS                 = 0.

CALL METHOD go_grid_1->set_table_for_first_display
    EXPORTING
      is_layout       = gs_layout
      is_variant      = gv_variant
      i_save          = 'A'
      i_default       = 'X'
    CHANGING
      it_fieldcatalog = gs_fieldcat
      it_outtab       = gt_output.

Could you please help me

Thanks in advance

Edited by: Aravind Kanaparthi on May 6, 2011 11:58 AM

3 REPLIES 3

Former Member
0 Kudos

Is possible that you are passing fields property in fieldcatalog, setting "KEY" = true?

0 Kudos

Hi Spantaleoni ,

Thanks for your reply.

As you said I was setting the key field and then removed it. But that field layout is saved and every time that layout was being called.So, All the columns are in blue colour even the key field is space

I have deleted the default layout. Now its fine.

Thanks once again

Former Member
0 Kudos

Solved by myself