Skip to Content
author's profile photo
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • author's profile photo
    Former Member
    Posted on Aug 20, 2007 at 11:07 AM

    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>

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 20, 2007 at 11:16 AM

    Hi Pradeep,

    Checkout sample program

    DEMO_DYNPRO_SET_CURSOR

    Regards, ABY

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 20, 2007 at 11:19 AM

    Hi Pradeep,

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

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

    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>module-request

    Hope that helps!!

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

    Regards,

    Naveenan.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 20, 2007 at 11:20 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded