" In a SAP system, the work process play a very important role. It is seen that a majority of the processing is done by work processes. Work processes execute dialog steps in user transactions, updates, lock administration can display the status of the work process running on your application server after logon. To display the status choose Administration --> System Administration ---> Monitor ---> System Monitoring ----> Process over view or Execute transaction SM50. To get the updated information, the display must be refreshed regularly. The administrator must regularly monitor the system processes for checking the appropriateness of the number and configuration. Generally possesses are monitored to obtain information. The information obtained can be used for many purposes. It can be used to determine, whether the number of work processes in your system is adequate to assess if the instance is working to its ultimate capacity and to gather information for troubleshooting or for tuning. The SAP work processes correspond to operating system processes, these processes can be monitored through other operating systems also. Or it can be said that process ID (PID) of the SAP system is the same as PID of the other operating systems. SAP has a runtime directory /usr/sap//SYS/exe/run. Some programs are present in this runtime directory for monitoring. You can monitor some of the work processes and the dispatcher from the operating system with the help of these monitoring programs. To display the overview of SAP application server choose System Monitoring ---> Servers. You can also display the overview of the work process running on this particular server in the SAP system. To display the overview of the work process first click on the desired server name. "
"The flow of a program is determined by a sequence of screens in a dialog transaction. The screens that are called within a transaction, must belong to a single ABAP program, usually a module pool (Type M). You have to use the transaction maintenance transaction (SE93) to create a dialog transaction. Once you have entered a transaction code and a short description, chose transaction type program and screen. Then enter data on the next screen as required. The transaction code in a dialog program must be linked to the number of its initial screen. Finally enter this number in the screen number field."
If the help of the icons in the SAP ABAP Editor you can do the following from the initial screen.
Check the Program:
The program is checked for syntax errors. One the program is free of Syntax errors you can activate it.
Activate the Program:
Only activated version of the Program can be executed. You can have 2 versions of the program, Active and Inactive.
Run the Program
The program can be executed by this Icon.
Check the where used list.
You can check where all the current program is used in the SAP system. This can be useful for Includes and Function Modules.
Do the Environment Analysis
Gives a list of Objects used in the Program along with short description and development class.
Online Manual
Gives online documentation for ABAP Statements, Keywords, Objects
Delete the Program
Deletes the Program. Make sure that you have a backup of the program before deleting it. If you have transported the program to Quality or Production then it is possible to retrieve the program. As a general rule always back up the program.
Copy the Program
Makes a copy of the Program.
Rename the Program
Renames the Program
Start Debugging
You can start the debugger from here.
Execute the Program with a Variant
Execute the Program with a variant. You need to create a Variant first.
Get the Variant List.
If you have created a Variant you can get a list and choose the desired Variant.
SAP ABAP Function module to calculate the difference between 2 dates.
The function module HR_HK_DIFF_BT_2_DATES in SAP ABAP can be used to calculate the difference between 2 dates.
HR_HK_DIFF_BT_2_DATES
Please check the following program. Experiment with the OUTPUT FORMAT (Example '01', '02', '03', '04', 05'). Make sure that Date1 is greater than Date2
REPORT ZEX_DIFFBETW2DATES .
Data: d_date1 like P0001-BEGDA, d_date2 like P0001-BEGDA, d_yrs like P0347-SCRYY, d_months like P0347-SCRMM, d_days like P0347-SCRDD.
* Date1 should be greater than date 2 d_date1 = '20050101'. d_date2 = '20000104'.
* This function calculates the diference between date 1 and date 2 CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES' EXPORTING DATE1 = d_date1 DATE2 = d_date2 OUTPUT_FORMAT = '05' IMPORTING YEARS = d_yrs MONTHS = d_months DAYS = d_days EXCEPTIONS INVALID_DATES_SPECIFIED = 1 OTHERS = 2. IF SY-SUBRC <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF.
Always specify your conditions in the Where-clause instead of checking
them yourself with check statements. The database system can then use an index
(if possible) and the network load is considerably less.
Always use Pretty Printer and Extended Program Check before releasing the code.
Do not leave unused code in the program. Comment the code thoroughly. Align the comments and the Code. Follow the SAP Standards and SAP Best Practices guidelines. It’s a good practice to take a dump of the code on your local drive.