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: 

what is PBO event

Former Member
0 Kudos

hi

what is PBO event

7 REPLIES 7

Former Member
0 Kudos

Hi,

It is an event to process screen before displaying.

It is precisely used for formatting a screen.

Suppose you want to hide or disable field after certain operations , you can do it.

Reward if useful!

Former Member
0 Kudos

Hi,

PBO - Process Before Output

This module will be called once the screen statement in your program is being called that is either set screen or call screen

that is Before the output display what ever the opertaion you want to do you can perform in this module

PAI - Process After Input

This module is called once the user gives the input

for example

if in your program you want to display the contents of the itab either in a tbale control or in tab strip or through alv those opertaion will be done in PBO - status

and if you have designed any icons in your toolbar , if any function key is associated with your icon , say like if F2 is clicked it should leave the screen or to leave the program those operations should be done in PAI - user command

In the following program calling the alv, sll the select operations are done in PBO and the user command were handled by PAI

TABLES: sflight.

*----


  • G L O B A L I N T E R N A L T A B L E S

*----


DATA: gi_sflight TYPE STANDARD TABLE OF sflight.

*----


  • G L O B A L D A T A

*----


DATA: OK_CODE LIKE SY-UCOMM,

g_wa_sflight LIKE sflight.

  • Declare reference variables to the ALV grid and the container

DATA:

go_grid TYPE REF TO cl_gui_alv_grid,

go_custom_container TYPE REF TO cl_gui_custom_container.

&----


*& Selection ScreenSection for the ALV Grid

&----


selection-screen begin of block add1 with frame title text-001.

select-options : s_carrid for sflight-carrid.

selection-screen end of block add1.

*----


  • S T A R T - O F - S E L E C T I O N.

*----


START-OF-SELECTION.

SET SCREEN '100'.

&----


*& Module USER_COMMAND_0100 INPUT

&----


MODULE user_command_0100 INPUT.

CASE OK_CODE.

WHEN 'EXIT' OR 'CANCEL'.

LEAVE TO SCREEN 0.

ENDCASE.

ENDMODULE. " USER_COMMAND_0100 INPUT

&----


*& Module STATUS_0100 OUTPUT

&----


MODULE status_0100 OUTPUT.

SET PF-STATUS 'STATUS'.

  • Create objects

IF go_custom_container IS INITIAL.

CREATE OBJECT go_custom_container

EXPORTING container_name = 'ALV_CONTAINER'.

CREATE OBJECT go_grid

EXPORTING

i_parent = go_custom_container.

PERFORM load_data_into_grid.

ENDIF.

ENDMODULE. " STATUS_0100 OUTPUT

&----


*& Form load_data_into_grid

&----


FORM load_data_into_grid.

  • Read data from table SFLIGHT

SELECT *

FROM sflight

INTO TABLE gi_sflight

where carrid in s_carrid.

  • Load data into the grid and display them

CALL METHOD go_grid->set_table_for_first_display

EXPORTING i_structure_name = 'SFLIGHT'

CHANGING it_outtab = gi_sflight.

ENDFORM. " load_data_into_grid

Thanks.

Former Member
0 Kudos

Hi,

PBO is Process befor output event.

This event is triggered before the screen is displayed to the user.

Check the following link

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

http://help.sap.com/saphelp_nw04/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm

Reward if helpful.

Regards,

Umasankar.

Former Member
0 Kudos

Former Member
0 Kudos

PBO

Process Before Output, screen event. Triggered by the ABAP runtime environement before a screen is sent to the presentation server. After PBO processing, screen fields receive the contents of data objects of the same name of the ABAP program.

Refer to this example...

http://help.sap.com/saphelp_nw70/helpdata/en/52/b6d760d97611d3a7140000e83dd863/frameset.htm

Regards,

Pavan

Former Member
0 Kudos

hi

it is the event to be triggered before displaying the screen

ex:

if u want a screen with some of the fields disabled, then in pbo u have write codings for that...

then u can specify PF ststus in PBO. correspondingly u can write codings for that PF status..

ex:

SET PF-STATUS 'PF000007'.

SET TITLEBAR 'RFQ1'.

CASE OK_CODE.

WHEN 'BACK'." go to screen 1000 when back is pressed.

LEAVE to screen 1000.

ENDCASE.

  • disable the following fields- rfq ,rfqtype,date,vendor,company code

  • and purchase organisation.

LOOP AT SCREEN.

IF SCREEN-NAME = 'ZVENME411-RFQ' OR SCREEN-NAME = 'ZVENME411-RFQTYPE' OR SCREEN-NAME = 'ZVENME411-RFQDATE' OR SCREEN-NAME = 'ZVENME411-VENDOR' OR SCREEN-NAME = 'ZVENME411-COMPANY_CODE' OR SCREEN-NAME = 'ZVENME411-PURORG'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

reward if useful..