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: 

Edit/display single cell in CL_GI_ALV_GRID.. dont knw where its going wrong

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

4 REPLIES 4

Clemenss
Active Contributor
0 Kudos

Hi Amit,

do you call method Check_change_data in PAI?

Please use the above <> code button to mark

code

as

code

.

Regards,

Clemens

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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