Wednesday, May 7, 2008
SAP ABAP Version Management
SAP ABAP Version Management.
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
Select the appropriate version and activate it.
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
Select the appropriate version and activate it.
SAP ABAP Drill Drill Down Report Concept
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
as follows
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.
Write:/ VBAK-VBELN, VBAP-POSNR, VBAP-MATNR.
*&---------------------------------------------------------------------*
*& 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.
Write:/ VBAK-VBELN, VBAP-POSNR, VBAP-MATNR.
SAP ABAP Function Module to Add Months to a Date and get the resulting date
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.
Please see the program given below.
The Output would be as follows.
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.
Data: D_NewDate like sy-datum.
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
MONTHS = P_Months
OLDDATE = P_odate
IMPORTING
NEWDATE = D_NewDate.
Write:/ 'New Date is ', D_NewDate.
We will see the output of the above program for the following inpu.Parameters: P_Months(4) type n,
P_odate like sy-datum.
Data: D_NewDate like sy-datum.
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
MONTHS = P_Months
OLDDATE = P_odate
IMPORTING
NEWDATE = D_NewDate.
Write:/ 'New Date is ', D_NewDate.
P_MONTHS = 10
P_odate = 05/05/2004
P_odate = 05/05/2004
The Output would be as follows.
Add Months To Year
New Date is 03/05/2005
New Date is 03/05/2005
Subscribe to:
Posts (Atom)
ABAP TIPS
|
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. |