Check Boxes in an Interactive Report

How to display the datas which were selected by clicking the check boxes in an interactive report?
This data has to display in my second list index, on clicking the user command.

Executing User Commands (AT USER-COMMAND AND AT LINE-SELECTION)

AT USER-COMMAND event is used in interactive reporting. The code between the AT USER-COMMAND and the ENDAT command is executed when the user enters data into the OK code field(the upper-left entry field on the screen where you enter transactions). The data entered into the OK code field is stored in the system field SY-UCOMM.

Eg :

AT USER-COMMAND.
  CASE SY-UCOMM.
    WHEN 'DETAIL'.
        SELECT * FROM BSEG WHERE BELNR = BKPF-BELNR.
.....
ENDCASE.

The AT LINE-SELECTION comand defines the code thats executed after a user double-clicks a line or presses the F2 function key.

Eg :

AT LINE-SELECTION.
SELECT * FROM BSEG WHERE GJAHR = BKPF-GJAHR.

Tips by Khan.

The difference for Selection Options and Parameters
Difference between Select-Options and Parameters

More Function Module
Functions / SAP Script / ALV

Tables
Database Table

ABAP Books List
ABAP/4 Certification, Programming, Smartforms, Sapscripts and Object Oriented Programming Books

Smart Forms
SAP Smartforms

ABAP Menu:
ABAP Example Hints and Tips

Return to Index:-
SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.  The site www.gotothings.com is in no way affiliated with SAP AG.
Any unauthorised copying or mirroring is prohibited.