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: 

ALV - question

former_member194669
Active Contributor
0 Kudos

Hi,

I have an ALV with edit option (Object Oriented using CL_GUI_ALV_GRID)


coloum A 	Column B
A		
B		X	
C		X
D		X
.		X
.		X
.		X	
.		X	
Z

Here in column B is check box. My requirement is user should NOT allow to enter values in Colum B against values A & Z.

I don't want to validate after entering values and then give an error message

Here is code


 call method g_grid->set_table_for_first_display
    exporting
      is_layout            = gs_layout
      i_save               = 'A'
      it_toolbar_excluding = i_exclude[]
    changing
      it_fieldcatalog      = gt_fieldcat[]
      it_outtab            = <i_status>[]." This is dynamically generated int table
  call method g_grid->set_ready_for_input
    exporting
      i_ready_for_input = v_input.

a®s

Edited by: a®s on Jun 16, 2008 2:56 PM

1 REPLY 1

Former Member
0 Kudos

didnt clearly under stand what is the driving factor / criteria to make column B check box, disabled.

Is it based on the value in column A.

loop at ls_outtab-celltab into ls_celltab.

if ls_celltab-fieldname eq 'CHECKBOX'.

§B4.Switch the style to dis- or enable a cell for input

if ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.

ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.

.......

refer to program BCALV_EDIT_05. wondering whether this will help..