Skip to Content

Input fields in CL_GUI_ALV_GRID


Is it possible to open specific fields for input using the Class CL_GUI_ALV_GRID. It seems that i can open a hole column, but in some of the rows i do not want the fields open!


Jakob Steen-Petersen

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Nov 21, 2003 at 05:27 PM

    The process is very similar to the one for setting a exception light at the row level in an ALV grid. First add an structure of type lvc_t_styl to your data table you will be passing to the it_outttab parameter of the alv grid. Lets call this structure CELL_TYPE for now. You then need to fill in the stylefname variable of your layout structure (type lvc_s_layo) that you pass to the is_layout paramter of the alv grid. You have now told the ALV grid where to go to look for your cell level style information.

    Next we need to set the style per cell. As you loop through your ALV grid data table checking your criteria, you will want to set your values into CELL_TYPE. For each row you can set the CELL_TYPE field name using variable FIELDNAME. You can then set the STYLE variable using either cl_gui_alv_grid=>mc_style_disabled or cl_gui_alv_grid=>mc_style_enabled.

    We have an SAP example program, BCALV_EDIT_02, in our 46C system that I studied before I wrote my first program that did this.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.