Application Development 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: 

reg. cursor-selection in module pool....have ur points.

Former Member
0 Kudos

Hi all,

Pleas. help me with a simple example of at cursor-selection in module pool programming.

with simple code & steps

<b>Have ur points.</b>

Regards,

pradeep.phogat@gmail.com

4 REPLIES 4

Former Member
0 Kudos

hi

<b>AT CURSOR-SELECTION</b>

The AT CURSOR-SELECTION addition at the event PAI causes the module mod to be called only if

The function used to trigger event PAI has function code "CS" and function type "S"

The cursor is placed on a single input or output field of the screen at the moment of the user action

The call occurs within the usual PAI processing, meaning that the automatic input checks defined in the system or in the ABAP Dictionary are executed and the MODULE statement is called according to its position in the event block. You can use the addition in connection with the FIELD statement.

If the PAI event is triggered under the above circumstances, the function code is not passed to sy-ucomm and the OK field. They keep their previous values.

<b>pls reward points for useful ans</b>

<i>Regards

Vivek</i>

Former Member
0 Kudos

Hi Pradeep,

Checkout sample program

DEMO_DYNPRO_SET_CURSOR

Regards, ABY

Former Member
0 Kudos

Hi Pradeep,

The Best explanation with example comes from our help.sap.com....

<i><b>http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabbd35c111d1829f0000e829fbfe/content.htm</b></i>

Also this might help...

<b>MODULE mod [ AT {EXIT-COMMAND|CURSOR-SELECTION} ]

[ ON {CHAIN-INPUT|CHAIN-REQUEST} ]

[ SWITCH switch ].

... AT CURSOR-SELECTION</b>

The AT CURSOR-SELECTION addition at the event PAI causes the module mod to be called only if

The function used to trigger event PAI has function code "CS" and function type "S"

The cursor is placed on a single input or output field of the screen at the moment of the user action

The call occurs within the usual PAI processing, meaning that the automatic input checks defined in the system or in the ABAP Dictionary are executed and the MODULE statement is called according to its position in the event block. You can use the addition in connection with the FIELD statement.

If the PAI event is triggered under the above circumstances, the function code is not passed to sy-ucomm and the OK field. They keep their previous values.

<b>Note</b>

The function type and function code of a function are determined in the Screen Painter or in the Menu Painter. We recommend to assign function code "CS" in the Menu Painter to function key F2 in order to simultaneously assign the double-click function of the mouse to it. This allows you to assign dialog modules to the selection of input or output fields.

<b><u>Refer thread:</u></b> <i><b>

Hope that helps!!

<i><b>*Reward useful answers*</b></i>

Regards,

Naveenan.

Former Member
0 Kudos

Hi Pradeep,

You can specify that a module should only be called if the cursor is positioned on a particular screen element.

MODULE <mod> AT CURSOR-SELECTION .

The module <mod> is called whenever the function code of the user action is CS with function type S. If you use this statement, u assign the same function code CS to function key F2. This also assigns it to the mouse double-click.

Suppose u have assigned like above.So if you want to got to customer master transaction on double clicking customer no: from ur program u can code

when 'CLCK'.

set parameter id <name> <fieldname>.

call transaction <tcode> and skip first screen.