" The functions Hold data and Set data is used when you want to create a group of objects that contain the same data. The function Hold data can be used to create data that can be changed, for example if you wish to create multiple objects with slight variation in the field values (Sales order or Purchase order) then the function Hold data can be used. If you wish to create multiple objects with exactly the same data without changing any of the filed values then SET data can be used. To hold data on the screen you need to first enter the data in the field and then choose User Profile from the Systems Menu. Now choose Hold data. The data that you hold on the screen can be changed. In case if you wish to hold data on the screen without changing it then select SET data. This way the data will be held but you will not be able to change the contents of the individual fields. You can delete the Data that is held. To do this select User profile from the Systems menu and select the option Delete data. Once the delete Data option is selected no data will be displayed the next time you visit the screen. You may want to work in more than one screen, and would like to store data in each screen, to do this you can press Ctrl+S or click on the save icon while moving between screens. You can also Cancel the data that you have just entered on the screen. To do this press the cancel button. Please note that when using HOLD data and SET data options, the required/Mandatory fields on the screen cannot be ignored. The correct values should be entered in these fields before proceeding to the next screen. Using the menus and functions you can go to the other screens within your task, as well as in related tasks. Check the Goto Extras and Environment menus in the Menu bar to find out the other screens available within your task and related tasks. Depending upon the task the contents also change. "
"A subset of Standard SQL that is fully integrated in ABAP is Open SQL statements. Their role is to help you by giving permission to access data irrespective of the database system, which the R/3 installation is using. The Data Manipulation Language (DML) part of the Standard SQL is present in the Open SQL. In other words, it gives you the permission to read (SELECT) and change (INSERT, UPDATE, DELETE) data. In the R/3 system, the tasks of the Data Definition Language (DDL) and Data Control Language (DCL) parts of the Standard SQL are performed by the ABAP dictionary and the authorization system."
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 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.