In SAP ABAP version Management is very useful to keep track of the changes that you make to your program. Version Management helps in keeping a record of the changes that you make and in case you want to revert back to the older version you can do so by activating the appropriate version. Version management is a better way of trying out some change in the code and if this leads to undesirable results then you can go back to the earlier version. In case you want to revert back to the earlier version you need to re-activate it. Version management is also useful to an auditor to review the complete history of a program. The system administrator can view the version management to track changes in a specific time interval.
To create a version of a program please follow the path given below.
From the ABAP Editor
Utilities >>>>>>>>>>>>>>>> Version >>>>>>>>>>>>>>> Create Version
To activate the the previous version navigate to
Utilities >>>>>>>>>>>>>>>> Version >>>>>>>>>>>>>>> Version Management
SAP ABAP Drill Down Report Concept (Double click to get the secondary list.)
In ABAP if you wish to get the secondary list by double clicking any of the lines of a report then you can make use of the event
AT LINE-SELECTION
as follows
REPORT ZEX_DOUBLECLICK .
*&---------------------------------------------------------------------* *& ABAPLOVERS: Example of Double Click to get secondary List *&---------------------------------------------------------------------*
* Table Declaration TABLES: VBAK, VBAP.
* Start-Of-Selection START-OF-SELECTION. SELECT single vbeln INTO (VBAK-VBELN) FROM VBAK. WRITE / VBAK-VBELN.
* Single click AT LINE-SELECTION. Select Single posnr matnr INTO (VBAP-POSNR, VBAP-MATNR) from vbap where VBELN = VBAK-VBELN.
SAP ABAP Function Module to Add Months to a Date and get the resulting date
In case you want to add months to a date filed and get the resulting Day, Month and year you can use the following function module.
MONTH_PLUS_DETERMINE
The above mentioned function module accepts the date in SY-DATUM type and months in NUMC. The 2 Parameters are imported in the function module and processed and the resulting date is exported to the calling program.
Please see the program given below.
REPORT ZEX_ADDMONTHSTOYEAR .
Parameters: P_Months(4) type n, P_odate like sy-datum.
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.