Showing posts with label Background Jobs. Show all posts
Showing posts with label Background Jobs. Show all posts

Friday, April 22, 2022

EVENTS IN MODULE POOL PROGRAM IN SAP ABAP.

EVENTS IN MODULE POOL PROGRAM IN SAP ABAP. 


Process before output (PBO)

Process after input (PAI)

Process on value-request (POV)

Process on help-request (POH)


PROCESS BEFORE OUTPUT:-  This event is triggered before the screen is displayed. This event is used to assign some default values to screen fields. With those values the field will be displayed.


PROCESS AFTER INPUT:-  This event is triggered after giving input to the screen fields. This is used to handle user action actions on the screen.


PROCESS ON VALUE-REQUEST:- This is used to give F4 help to screen fields.


PROCESS ON HELP-REQUEST:- This is used to give F1 help to screen fields.


The in the module pool program should be written between module and endmodule.


AT EXIT-COMMAND:- It is used to go to the leave the screen or process some logic even though some of the mandatory fields of a screen not filled.


SY-UCOMM:- It is a system variable used to catch the  function code that is triggered for user actions on the screen.


OK_CODE:- It is used as substitute for sy-ucomm.


Pre-requisites for using Control break statements


Pre-requisites for using Control break statements in sap. 

Pre-requisites for using Control break statements Control break statements should be used in side the loop but on change of can be used outside the loop. Before using the control break statement the internal table should be sorted by the field on which control break statement is going to be used.

 

AT FIRST:- This is triggered at the first record of the internal table. This is triggered only once. It is usually used to write the heading to columns while displaying the records of internal table.


AT LAST:- This is also triggered only once at the last record of the internal table. This is used to find out grand totals of numeric values.


AT NEW <FIELD>:- This is triggered at the starting of every new record based on a particular field. It is used to calculate sub totals.


AT END OF <FIELD>:- This is triggered at the end of every new record based on a particular field. It is also used to find out sub totals.

Sunday, September 13, 2020

Debug Background Jobs in SAP ABAP.

How to debug Background Jobs?


Debug Background Jobs in SAP ABAP.

Ans: The Background jobs can be debug using the command ‘JDBG’.

 Execute the T-code SM37

 Check the required background job to be debug.

 Enter JDBG in the Command field & Press Enter

 Keep on pressing F7 until the required program is stopped.

 Use the Function keys F5/F6/F7 to check the program Line by line/Block by Block once it is reached.