‎2009 May 19 6:39 AM
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
‎2009 May 19 2:34 PM
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
‎2009 May 19 6:46 AM
may be somewhere u are clearing the data once u saved ..... look at that piece of code.
regards
Prabhu
‎2009 May 19 6:51 AM
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.
‎2009 May 19 6:55 AM
Hi Amlan,
Can you provide your requirement in detail?
Regards,
Sangar
‎2009 May 19 6:56 AM
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.
‎2009 May 19 7:00 AM
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
‎2009 May 19 7:50 AM
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 .
‎2009 May 19 9:58 AM
‎2009 May 19 2:34 PM
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
‎2009 May 19 2:40 PM
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.