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

Process after input

sushant_singh
Participant
0 Likes
1,814

Hi all,

can you please tell me how can we trigger PAI through prgramming without any

user input?

For example you can run the transaction OMJJ and see how the image of tree nodes change consequently.

7 REPLIES 7
Read only

Former Member
0 Likes
1,428

on every dynpro just press enter, and your PAI gets triggered.

Read only

Former Member
0 Likes
1,428

Hi.

Try to use this class method: CL_GUI_CFW=>SET_NEW_OK_CODE

Maybe that's what you are searching for.

Kind Regards,

Timo.

Read only

0 Likes
1,428

Hi Timo,

can you please provide me any example of using

class method: CL_GUI_CFW=>SET_NEW_OK_CODE.

Thanks & regards

Sushant Singh

Read only

0 Likes
1,428

Hi Sushant,

In a PAI module of a dynrpo i receive a timer event. Inside the event handler method I use the following piece of code.:


DATA: ucomm TYPE sy-ucomm VALUE 'PICK'.
* trigger PAI
    call method cl_gui_cfw=>set_new_ok_code
             exporting
                 new_code = ucomm.

The method triggers a PAI similar to an ENTER or a button pressed by the user. You can implement a normal user command module in PAI of the dynpro processing the command set by the above method.

This could be used for example to automatically show the details of a table row, if the user doesn't select a different line within the given time.

Regards,

Timo.

Read only

0 Likes
1,428

Hi Timo,

thanks for your suggestion .To know the exact requirement please run the transaction OMJJ and after selecting the movement type see how the image of tree nodes will change .

regards,

sushant singh

Read only

0 Likes
1,428

Hi.

Sorry, but I can't see your requirement.

If it's the tree nodes that are changing when you open or close the top node that is done by event handler. You have to register the tree control to an event handler. That's not conneted to a PAI at all.

Hope you will find it,

Timo.

Read only

Former Member
0 Likes
1,428

Hi,

to trigger the PAI we need to so some action on the keyboard or with the Mouse, then only the Ok_Code will be triggerd ....

Regards

Sudheer