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

PBO & PAI

Former Member
0 Likes
5,987

HI ALL

GIVE ME EXPLANATION ON PBO & PAI .

1 ACCEPTED SOLUTION
Read only

Former Member
3,047

Hi Abhi,

Heres some explanation..

PROCESS BEFORE OUTPUT (PBO) is automatically triggered after the PAI processing of the previous screen and before the current screen is displayed. You can program the PBO processing of the screen in this block. At the end of the PBO processing, the screen is displayed.

PROCESS AFTER INPUT (PAI) is triggered when the user chooses a function on the screen. You can program the PAI processing of the screen in this block. At the end of the PAI processing, the system either calls the next screen or carries on processing at the point from which the screen was called.

HI ALL

GIVE ME EXPLANATION ON PBO & PAI .

5 REPLIES 5
Read only

Former Member
3,048

Hi Abhi,

Heres some explanation..

PROCESS BEFORE OUTPUT (PBO) is automatically triggered after the PAI processing of the previous screen and before the current screen is displayed. You can program the PBO processing of the screen in this block. At the end of the PBO processing, the screen is displayed.

PROCESS AFTER INPUT (PAI) is triggered when the user chooses a function on the screen. You can program the PAI processing of the screen in this block. At the end of the PAI processing, the system either calls the next screen or carries on processing at the point from which the screen was called.

Read only

Former Member
0 Likes
3,047

Hi,

please check out the link below it will help you in understanding PBO and PAI asspects.

http://help.sap.com/saphelp_46c/helpdata/en/fc/eb2d67358411d1829f0000e829fbfe/content.htm

for PBO of the Selection Screen please check out the below link it will help you

http://help.sap.com/saphelp_nw04/helpdata/en/79/34a234d9b511d1950e0000e8353423/content.htm

FOR MORE INFORMATION ON PAI PLEASE CHECK OUT THE LINK BELOW IT WILL HELP YOU

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm

***********please reward points if the information is helpful to you***************

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
3,047

HI,

PBO stands for PRocess Before Output, So as the name suggests it will be called before the screen is shown to the user. So what ever the code that is related to manipulating the UI has to go in PBO modules. Like LOOP AT SCREEN And modifying the SCREEN table.

PAI stands for Process After Input, so this is the place where you want to validate your data, raise messages, errors etc. Also you can group your fields here and monitor them ON REQUEST and ON INPUT using CHAIN ENDCHAIN and FIELD MODULE statements.

Apart from them you have POV which is Process ON Value Request. This is the place to put in your code to provide Value Helps for your screen fields.

Regards,

Sesh

Read only

former_member196299
Active Contributor
0 Likes
3,047

hI Abhi ,

PBO ( Process Before Output 😞 this is an event which gets triggered before a screen id displayed in the GUI . you code all your initializations for the screens , assign default values kind of things here . and after the PBO event is processed your screen is displayed to the user .

PAI ( Process After Input 😞 This is an event which gets triggered once the user does any action on the screen ( any screen operations, even a mouse click ) . You code in this area when you want to do something based on the user-interactions.

For every screen event a PBO and a PAI is called simultaneously.

Hope these explanations will be of help !

Regards,

Ranjita

Read only

Former Member
0 Likes
3,047

Screen Flow Logic


Screen flow logic contains the procedural part of a screen. You create it in the flow logic editor in the Screen Painter, which is very similar to the ABAP Editor. The language used to program screen flow logic has a similar syntax to ABAP, but is not part of ABAP itself. It is sometimes referred to as screen language.

Unlike ABAP programs, screen flow logic contains no explicit data declarations. You define screen fields by placing elements on the screen mask.

The screen flow logic is like an ABAP program in that it serves as a container for processing blocks. There are four event blocks, each of which is introduced with the screen keyword PROCESS:

PROCESS BEFORE OUTPUT.
...

PROCESS AFTER INPUT.
...

PROCESS ON HELP-REQUEST.
...

PROCESS ON VALUE-REQUEST.




As in ABAP, the event block is introduced by the corresponding keyword statement, and it concludes either when the next block is introduced, or at the end of the program. The first two statements are created automatically by the Screen Painter when you create a new screen. The corresponding events are triggered by the runtime environment:

· PROCESS BEFORE OUTPUT

(PBO) is automatically triggered after the PAI processing of the previous screen and before the current screen is displayed. You can program the PBO processing of the screen in this block. At the end of the PBO processing, the screen is displayed.

· PROCESS AFTER INPUT

(PAI) is triggered when the user chooses a function on the screen. You can program the PAI processing of the screen in this block. At the end of the PAI processing, the system either calls the next screen or carries on processing at the point from which the screen was called.

· PROCESS ON HELP-REQUEST

(POH) and

PROCESS ON VALUE-REQUEST

(POV) are triggered when the user requests field help (F1) or possible values help (F4) respectively. You can program the appropriate coding in the corresponding event blocks. At the end of processing, the system carries on processing the current screen.

As is normal with events, you must only program event blocks for the events to which you want the flow logic to react. However, the screen flow logic must contain at least the two statements

PROCESS BEFORE OUTPUT and PROCESS AFTER INPUT

in the correct order.

Example of Flow Logic Example
The following example shows some use of screen flow logic:


*------------------------------------------------

*  Sample Code

*---------------------------------------------------

*Processing Before Screen Output

PROCESS BEFORE OUTPUT.

  MODULE INIT_FIELDS.

* Self-programmed F1 Help

PROCESS ON HELP-REQUEST.

  FIELD GSSG-BUKRG MODULE V-BUKRG.

* Processing after user input

PROCESS AFTER INPUT.

* Lock customer master record

CHAIN.

  FIELD GSSG-KTNRG

     MODULE ENQUEUE_CUSTOMER_MASTER.

* Read customer master record

  MODULE READ_CUSTOMER_MASTER.

* Read business area

  MODULE READ_GSSG.

ENDCHAIN.

* Process function code

FIELD OK-CODE MODULE OKCODE ON INPUT.

reward points if it is usefull ....

Girish