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: 

problem in module pool

Former Member
0 Kudos

Hi gurus ,

I am creating a module pool program. I am updating some fileds on some condition. In a special case after i update a variable i want the PBO to be called explicitly so that the values will be reflected on the scree. If anybody has any idea please suggest . code will be helpful.

regards

Amlan N

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

To trigger the PBO you need to trigger the PAI explicitly. To trigger the PAI by yourself you can use the method SET_NEW_OK_CODE of the global class CL_GUI_CFW to set a function code.

The advantage of using this technique is that the event handler method is executed automatically and there are no conflicts with the automatic input checks associated with the screen. The disadvantage is that the contents of the screen fields are not transported to the program, which means that obsolete values could appear on the next screen. You can work around this by using the SET_NEW_OK_CODE method to trigger field transport and the PAI event after the event handler has finished.

Hope this will be helpful for you.

regards

Amarendra

9 REPLIES 9

Former Member
0 Kudos

may be somewhere u are clearing the data once u saved ..... look at that piece of code.

regards

Prabhu

Former Member
0 Kudos

I am not very sure about the requirement. Once you displayed the screen why do you need to call PBO again once one screen value change??? Is it PAI?? In that case you can use the following :

Chain.

Field F1 Module <Mod1>.

Field F2 Module <Mod2>.

Endchain.

The module <Mod1> will be called only when field F1 changes and module <Mod2> will be called when F1 and F2 changes.

0 Kudos

Hi Amlan,

Can you provide your requirement in detail?

Regards,

Sangar

Former Member
0 Kudos

Have a modify statement in your PBO.

The work area has to be modified with the newly entered values, then only you can hold the values that you have entered.

Former Member
0 Kudos

Define those variables globally. i think u have defined them locally now. Define them in top include and call the screen . so that they can reflect

Regards,

Ajay

Former Member
0 Kudos

hi,

do u want to come back to main screen i mean the input screen?

if that s the thing then u can use Leave to Screen .

Former Member

Former Member
0 Kudos

Hi,

To trigger the PBO you need to trigger the PAI explicitly. To trigger the PAI by yourself you can use the method SET_NEW_OK_CODE of the global class CL_GUI_CFW to set a function code.

The advantage of using this technique is that the event handler method is executed automatically and there are no conflicts with the automatic input checks associated with the screen. The disadvantage is that the contents of the screen fields are not transported to the program, which means that obsolete values could appear on the next screen. You can work around this by using the SET_NEW_OK_CODE method to trigger field transport and the PAI event after the event handler has finished.

Hope this will be helpful for you.

regards

Amarendra

Former Member
0 Kudos

The requirement is not clear.

If you want the updated values on the screen, then its enough to define the fields globally in the program and moreover to update certain values from the screen definitely there will be user interaction. Once user command involves then obviously PBO triggers automatically.