08-20-2011 11:58 AM
Hello,
I have a table itab in which 1 field BWART is a drop down field. Nw what I need is when the users select BWART the another field AUFNR in the table ITAB should become read only or display for that record
I am using CL_GUI_ALV_GRID display and used the following code to the event DATA_CHANGED in handled.
CALL METHOD alv1->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
Also I have used lvc_t_styl in the table declaration
TYPES : BEGIN OF ty_zmatform.
INCLUDE STRUCTURE zmatform.
TYPES : celltab TYPE lvc_t_styl.
TYPES : END OF ty_zmatform.
DATA : itab TYPE STANDARD TABLE OF ty_zmatform,
wa TYPE ty_zmatform,
in the method for data change I am making the style as disabled using CL_GUI_ALV_GIRD=>mc_style_disabled
I have also used REFRESH_TABLE_DISPLAY but still I am not able to make the field AUFNR as read only
dnt knw where I am going wrong... kindly help
08-20-2011 6:55 PM
Try putting breakpoint to see if your code is getting executed! User will have to change some value to trigger data change event. You need to modify record of internal table if you missed that and then call refresh display method.
Nitesh
08-20-2011 5:55 PM
Hi Amit,
do you call method Check_change_data in PAI?
Please use the above <> code button to mark
code
as
code
.
Regards,
Clemens
08-22-2011 4:11 AM
HI Clemens Hi Nitesh
I have'nt used that method chanaged_data_check Clemens but my event DATA_CHANGED is being triggered and the internal table also changes according.
But I feel the Problem is that after DATA_CHANGED method my PBO does not getting triggered
Also when I press enter later PBO gets triggered and now in the internal table there is a record with style as disabled and refresh _alv method is also called but nothin seems to happen
08-20-2011 6:55 PM
Try putting breakpoint to see if your code is getting executed! User will have to change some value to trigger data change event. You need to modify record of internal table if you missed that and then call refresh display method.
Nitesh
08-22-2011 4:33 AM
Hi
its solved now, I forget to add the layout where one specifies the filedname of the lvc_t_styl type
Also my refresh_alv was in the PBO, I removed from there and put in the event DATA_CHANGED
thanks for ur help