05-29-2008 7:57 AM
05-29-2008 8:08 AM
Hi Ali,
Both events are used in Classical ALV Report.
AT USER COMMAND event will call when the user click the toolbar button.
AT LINE SELECTION - This event will call when the user select the particular record.
Refer the below link.
[http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba3ae35c111d1829f0000e829fbfe/content.htm|http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba3ae35c111d1829f0000e829fbfe/content.htm]
[http://www.sap-img.com/abap/program-to-test-line-selection-scrolling-within-document.htm|http://www.sap-img.com/abap/program-to-test-line-selection-scrolling-within-document.htm]
[http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/at_list_.htm|http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/at_list_.htm]
Reward if it is helpful
Regards,
Boobalan Suburaj
05-29-2008 8:02 AM
hi,
AT LINE-SELECTION.
<statements>.
As described in the section Dialog Status for Lists, the function code PICK is always added to the standard list status when you have an AT LINE-SELECTION event in your program.
If you assign PICK to other function keys or menu entries, AT LINE-SELECTION is also triggered when the user chooses then. You should avoid this for the sake of the semantics.
Conversely, if you have a more extensive program that does not react to line selection, you should not use the function code PICK. Instead you should assign a different function code to F2 , to ensure that as many events as possible trigger the AT USER-COMMAND event.
Event Block for User-Defined Function Codes
If the user chooses a function code during list processing that is neither processed by the system, or PICK or PF<nn>, the system triggers the event AT USER-COMMAND. For this event, you must define your own GUI status for a list. To react to your own function codes in a program, you must define the following event block:
AT USER-COMMAND.
<statements>.
In this event block, you can use an IF or CASE structure to tell the function codes apart. They are available in the system field SY-UCOMM. There are further system fields that are filled in list events, such as SY-LSIND and SY-PFKEY, that allow you to make further case distinctions.
regards,
Veeresh
05-29-2008 8:08 AM
Hi Ali,
Both events are used in Classical ALV Report.
AT USER COMMAND event will call when the user click the toolbar button.
AT LINE SELECTION - This event will call when the user select the particular record.
Refer the below link.
[http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba3ae35c111d1829f0000e829fbfe/content.htm|http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba3ae35c111d1829f0000e829fbfe/content.htm]
[http://www.sap-img.com/abap/program-to-test-line-selection-scrolling-within-document.htm|http://www.sap-img.com/abap/program-to-test-line-selection-scrolling-within-document.htm]
[http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/at_list_.htm|http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/at_list_.htm]
Reward if it is helpful
Regards,
Boobalan Suburaj