2007 Jun 13 3:01 PM
2007 Jun 13 3:05 PM
In Report, it is AT SELECTION-SCREEN OUTPUT.You can write all the screen related code .This event will trigger just before the selection screen is displayed.
2007 Jun 13 3:07 PM
Jyothsna,
You will come across PBO (Process Before Output) in dialog/module pool programming. You can not use that event in reports.
PBO is first event triggered in module pool.process before output event triggered before the screen is displayed.
Rgds,
Naren
2007 Aug 01 1:06 PM
Hi jyoths,
Here i given u a detail report for a dialog module programming
where u can see calling PBO on
MODULE STATUS_1000 output.
SET PF-STATUS 'PF_1000'.
SET TITLEBAR 'TITLE_1000'.
you just go for se80 create a program with some name
and it will pop up and ask u for title of program
and down there is TYPE give here as MODULE POOL
then take this codings down i given into ur program screen
and check the output..
&----
*& Module pool ZDIALOG_TEST
*&
&----
*&
*&
&----
PROGRAM ZDIALOG_TEST.
TABLES : MARA.
DATA : OK_CODE LIKE SY-UCOMM.
DATA : OK_CODE_2000 LIKE SY-UCOMM.
DATA : MATNR LIKE MARA-MATNR,
MTART LIKE MARA-MTART,
MEINS LIKE MARA-MEINS,
MBRSH LIKE MARA-MBRSH.
&----
*& Module STATUS_1000 OUTPUT
&----
text
----
module STATUS_1000 output.
SET PF-STATUS 'PF_1000'.
SET TITLEBAR 'TITLE_1000'.
endmodule. " STATUS_1000 OUTPUT
&----
*& Module USER_COMMAND_1000 INPUT
&----
text
----
module USER_COMMAND_1000 input.
IF MARA-MATNR NE ''.
IF OK_CODE = 'DISPLAY'.
SELECT SINGLE MATNR MTART MEINS MBRSH FROM MARA
INTO (MATNR,MTART,MEINS,MBRSH) WHERE
MATNR = MARA-MATNR.
IF SY-SUBRC EQ 0.
MARA-MATNR = MATNR.
MARA-MTART = MTART.
MARA-MEINS = MEINS.
MARA-MBRSH = MBRSH.
CALL SCREEN 2000.
ENDIF.
ENDIF.
ENDIF.
CASE OK_CODE.
WHEN 'BACK'.
LEAVE PROGRAM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
LEAVE PROGRAM.
ENDCASE.
endmodule. " USER_COMMAND_1000 INPUT
&----
*& Module STATUS_2000 OUTPUT
&----
text
----
module STATUS_2000 output.
SET PF-STATUS 'PF_2000'.
SET TITLEBAR 'TITLE_2000'.
endmodule. " STATUS_2000 OUTPUT
&----
*& Module USER_COMMAND_2000 INPUT
&----
text
----
module USER_COMMAND_2000 input.
CASE OK_CODE_2000.
WHEN 'BACK'.
LEAVE TO SCREEN 1000.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
LEAVE PROGRAM.
ENDCASE.
endmodule. " USER_COMMAND_2000 INPUT
Reward if it useful to u,
Best Wishes
Regards,
Guna,
2007 Aug 01 1:09 PM
<b>Whenever you are using CALL SCREEN <number> in your report,
double click on <number> and then in the FLOW LOGIC,
uncomment the PBO OUPUT, double click and then use it.</b>
here's a sample code....
&----
*& Module STATUS_0100 OUTPUT
&----
PBO Event
----
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'OOPS'.
SET TITLEBAR 'TIT'.
Subroutine to fill the Variant Structure
PERFORM FILL_VARIANT.
IF W_GRID IS INITIAL.
CREATE OBJECT W_GRID
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = CL_GUI_CONTAINER=>SCREEN0
I_APPL_EVENTS =
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
I_FCAT_COMPLETE = SPACE
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0
CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT = W_VARIANT
I_SAVE = 'A'
I_DEFAULT = 'X'
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
IR_SALV_ADAPTER =
CHANGING
IT_OUTTAB = T_OUTTAB
IT_FIELDCATALOG = T_FIELDCAT
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0.
ENDIF. " IF W_GRID IS INITIAL
CREATE OBJECT W_EVENT_CLICK.
SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
ENDMODULE. " STATUS_0100 OUTPUT
Regards,
Pavan
2007 Aug 01 1:11 PM
2007 Aug 01 1:46 PM
hi jyothsna,
try this .....
*----
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.
plz reward points if answer s useful...
Regards,
Mandeep.
2007 Aug 01 5:31 PM
hi,
u cannot directly use PBO in reports but u can still use thru 'CALL ScREEN xxx ' frm ur report.
In that screen , u will have PBO PAI ,,,,.
Reward with points if helpful,
Revert back if any issues.
Regards,
Naveen.
2007 Aug 02 9:33 AM
hi
used for 'Call Screen <screen number> its double click then show that PAI and PBO.
PAI - Process After Input (it is used for pushbutton and at selection-screen).
PBO - Process Before Output (it is used for at selection-screen output and comparing that subscreen program).
Reward Point if Useful,
Thanks & Regards,
S.Suresh.