Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8802

Re: Get Checked Box Value in ALV

$
0
0

U can use the below code to get the value of check box in the ALV

 

*----------------------------------------------------------------------*

*       CLASS lcl_event_handler IMPLEMENTATION

*----------------------------------------------------------------------*

CLASS ty_event_handler IMPLEMENTATION .

*

  METHOD m_on_link_click.

    DATA lwa_alv TYPE ty_output.

*   Get the value of the checkbox and set the value accordingly

*   Refersh the table

 

 

    READ TABLE i_alv INTO lwa_alv INDEX row.

    IF sy-subrc IS INITIAL.

      IF lwa_alv-chk IS INITIAL.

        lwa_alv-chk = 'X'.

        MODIFY i_alv FROM lwa_alv INDEX row TRANSPORTING chk.

        CLEAR lwa_alv.

      ELSEIF lwa_alv-chk = 'X'.

        CLEAR lwa_alv-chk.

        MODIFY i_alv FROM lwa_alv INDEX row TRANSPORTING chk.

        CLEAR lwa_alv.

      ENDIF.

    ENDIF.

  ENDMETHOD.                    "on_link_click

*

ENDCLASS.                    "cl_event_handler IMPLEMENTATION

 

Regards,

Manasa.


Viewing all articles
Browse latest Browse all 8802

Trending Articles