Skip to Content
0
Former Member
Dec 22, 2006 at 10:23 AM

setting to original value in ALV

13 Views

I have a requirement to edit a column in ALV, if it is wrong entry it should set to original value.

Can any1 please help me...

/the following code is dynamic call for REUSE..ALV_GRID_DSIPLAY

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

....................................

loop at it_rep_out into wa_rep_out.

if sy-tabix eq rs_selfield-TABINDEX.

gs_selfield_temp = wa_rep_out.

endif.

endloop.

CASE r_ucomm.

WHEN space OR 'ENTR' OR 'ENTER'.

gs_selfield = rs_selfield.

  • IF gs_selfield-fieldname = 'CODE'.

IF gs_selfield-value = 'R'.

MESSAGE i000 WITH 'Please enter'.

gs_selfield-value = gs_selfield_temp-code.

  • modify wa_rep_out.

ENDIF.