What do you mean by PBO (process before output) and PAI (process after input)?
For a SAP transaction, the graphical representation of the screen and related processing logic is called a dynpro (dynamic program). Each dynpro consists of a PBO/PAI module to prepare and process the data displayed or entered on the screen.
• PBO (Process Before Output): A processing event which is called before the screen is displayed. Its tasks include the initialization of the screen fields and supply default data values for the screen.
• PAI (Process After Input): A processing event taking place after you leave a screen. Its tasks are to process the input data or initiate the update of the database.