Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

pick command

Former Member
0 Likes
757

hi,

what is the use of pick command

2 REPLIES 2
Read only

Former Member
0 Likes
552

Hi Sateesh,

If ever you have used the AT LINE-SELECTION event in classical interactive list reporting, when you double click a field, SAP automatically triggers a function code.

This function code is 'PICK' and it is associated with standard SAP function key F2. Hence you must in your PF status definition never assign F2 function key to any other function code.

The use of this 'PICK' and its F2 is used e.g. whenever you need the application/program to "react" to a double click.

In dialog programs/module pools, you have a screen field, or table control column. It has a attribute - "Responds to double click". Well marking this attribute checkbox is not enough to use the double click functionality. You need to assign the PICK function code to the function key F2 in the PF status of the screen and then you can check the value of OKCODE (sy-ucomm) as PICK to respond to double click by user.

Hope this helps clear the air on this subject.

Cheers,

Aditya

Read only

Former Member
0 Likes
552

When the user triggers the function code PICK, AT LINE-SELECTION is always triggered if the cursor is positioned on a list line. The function code PICK is, by default, always linked with function key F2 and hence with the mouse double-click. Consequently, if you have a simple program that does not react to any further user actions, you only need to write this event block.

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.

If you want to fire both “ At User Command” & “ AT line-selection” then you have to put pick corresponding f2 in the SET PF-STATUS

For more info

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba34635c111d1829f0000e829fbfe/content.htm

Reward points if helpful.

Cheers,

Chandru