SAP FI, CO, MM, PP, SD, PM, PS, QM, SM, HR, WF, BW, APO, Basis,  ABAP/4, Certification, Books
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

Back to ABAP Menu:
ABAP Example Hints and Tips

Return to :-
SAP Hints and Tips on Configuration and ABAP/4 Programming

(c) www.sap-basis-abap.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.sap-basis-abap.com is in no way affiliated with SAP AG.
Any unauthorised copying or mirroring is prohibited.