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: 

Ok Code in Module pool programming

Former Member
0 Kudos

Hi all,

I want to know what is the ok_code or sy-ucomm fro TAB, ENTER and DOUBLE CLICK and different events in module pool programming

And what is the execution sequence in module pool programming?

Means which event execute First..PAI or PBO

Thanks in advance.....

1 ACCEPTED SOLUTION

former_member196299
Active Contributor
0 Kudos

hi Dhwani,

sy-ucomm value for double click is PICK ,

there is no such ok_code for ENETR ..it keeps on changing from transaction to transaction , even you can specify the ok_code for ENTER in menu painter .

and I am sorry , I d't understand what is TAB ( what exactly you wanted to mean ?) .

The sequence of module pool programming is :

first PBO is triggered and the screen appears in GUI .

after the user-action is done the PAI triggers , then the PBO again n then you see the screen ..

Regards,

Ranjita

8 REPLIES 8

Former Member
0 Kudos

HI,

Process Before Output is the part of the dynpro code that is precessed before the user can do anithing with the data in the screen

Process After Input is the part of the dynpro code that is preocessed after the interaction with the user.

when an action is performed ,the system triggers the PROCESS AFTER INPUT event.The data passed includes field screen data data entered by the user and a function code. A functioncode is a technical name that has been allocated in a screen Painter or Menu Painter to a meny entry,a push button,the ENTER key or a function Key of a screen.An internal work field(<b>ok-code</b>)in the PAI module evaluates the function code,and the appropriate action is taken.

Regards,

sathiya Ramasmay

former_member196299
Active Contributor
0 Kudos

hi Dhwani,

sy-ucomm value for double click is PICK ,

there is no such ok_code for ENETR ..it keeps on changing from transaction to transaction , even you can specify the ok_code for ENTER in menu painter .

and I am sorry , I d't understand what is TAB ( what exactly you wanted to mean ?) .

The sequence of module pool programming is :

first PBO is triggered and the screen appears in GUI .

after the user-action is done the PAI triggers , then the PBO again n then you see the screen ..

Regards,

Ranjita

Former Member
0 Kudos

Hi,

Ok codes are user defined ones. It can be set by creating the Pf status of the screen. For TAB,ENTER,etc you can give ur own ok codes and handle it accordingly in program.

PBO will execute first while starting the transaction.

PAI will exectute after user gives any values to the screen.

Reward if helpful.

alejandro_bindi
Active Contributor
0 Kudos

In customer programs (Z) OKcodes are defined by you, assigning them to screen elements in Menu Painter or Screen painter.

In the case of standard programs, it depends, you should open the screen for which you wanna know okcodes in SE80 and check, or enter the standard transaction and set /H before doing the action. In SY-UCOMM you get the okcode.

Screen flow is like this:

PBO (Process before output)

--- User action

PAI (Process after input)

Regards

Provide points if useful.

Former Member
0 Kudos

Hi..

Ok codes for the following are -


TAB -- =TABHDT4

ENTER-- /00

DOUBLE CLICK---- =MESELECT

Hope it helps..

Reward points if useful..

Arun

Former Member
0 Kudos

Hi,

ENTER - ' ' ->space.

PBO is first executed.

Thanks.

Former Member
0 Kudos

hi,

sy-ucomm is mainly to activate PAI in module pool programing.

we will assign

ok_code= sy-ucomm.

PAI will be activated first which will include

once the input is given PAI will be processed which includes all logical coding part.

PBO is processed just before output which mainly include pf-status and title .

Reward with points if helpful.

former_member491305
Active Contributor
0 Kudos

Hi,

there is no event to trigger for "tab" key.

For ENTER,You have to set the funtion code for that in function keys of GUI status.

For Double click, the function code is F2.You have to assign any one function code to this function key.

When you run a transaction ,The first event which will trigger is Process Before Output.