Skip to Content
0
Former Member
Dec 11, 2013 at 04:13 AM

reading ALV checkbox value

33 Views

Hi,

I am facing a problem in reading the checkbox value in ALV. Here is my code.Select All & Deselect All is working fine but when I am using only the checkbox select, it is not reading the value. Please help. Please let me know where am I going wrong.

fieldcatalog-fieldname = 'ACTION'.

fieldcatalog-seltext_m = 'SEND MAIL'.

fieldcatalog-col_pos = 14.

fieldcatalog-outputlen = 18.

fieldcatalog-decimals_out = '0'.

fieldcatalog-CHECKBOX = 'X'.

fieldcatalog-edit = 'X'.

fieldcatalog-emphasize = 'C511'.

* fieldcatalog-hotspot = 'X'.

append fieldcatalog to fieldcatalog.

clear fieldcatalog.

FORM USER_COMMAND USING vl_ucomm LIKE sy-ucomm "#EC CALLED

rs_selfield TYPE slis_selfield.

CASE vl_ucomm.

WHEN '&IC1'.

if rs_selfield-fieldname = 'MATNR'.

READ TABLE itab2 INDEX rs_selfield-tabindex into wa_itab2.

ENDIF.

when 'SEND'.

READ TABLE itab2 INDEX rs_selfield-tabindex.

loop at itab2 where action = 'X'.

MOVE-CORRESPONDING itab2 to itab33.

append itab33.

clear itab33.

endloop.


call SCREEN 1001.

when 'SELECT'.

loop at itab2.

itab2-action = 'X'.

modify itab2 TRANSPORTING action.

rs_selfield-refresh = 'X'.

endloop.

when 'DESELECT'.

loop at itab2.

itab2-action = ''.

modify itab2 TRANSPORTING action.

rs_selfield-refresh = 'X'.

endloop.

WHEN OTHERS.

ENDCASE.

ENDFORM.

Regards,

Sharbani