" 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. "
"The SAP Control Framework is used for the communication between the controls on the presentation server and the ABAP application server. In ABAP Objects, it is programmed, and contains a set of global classes that you can find in the Class Browser under Basis -> Frontend Services. Between the application server and presentation server these classes encapsulate the communication, which is implemented using Remote Function Calls. There is a global class, which encapsulates all application controls. In the class Browser under Basis -> Frontend Services or Basis -> Components Integration, you can find the SAP Basis Controls."
SAP ABAP Determining The Attributes Of Data Objects At Runtime
Attributes of SAP ABAP Data Objects can be determined at Runtime. The following attributes can be determined at runtime.
FIELD LENGTH DATA TYPE OUTPUT LENGTH DECIMAL PLACES CONVERSION ROUTINE DISTANCE BETWEEN TWO FIELDS HELP TEXT ID
The statement used for determining the attributes of a field is DESCRIBE. We have seen earlier how we can use DESCRIBE to find attributes of a internal Table. See the post on Internal Table Basics.
Please find below the Syntax used to determine the attributes of SAP ABAP Data Objects at runtime.
Once the above statement is executed the type of the field <field> is obtained in the variable <t>.
Example.
REPORT ZEX_ATTRIBUTES .
Data: d_intiger type i, d_float type f, d_packed type p, d_character type c, d_date type d, d_numc type n, d_time type t, d_hexa type x, d_type type c.
DESCRIBE FIELD d_intiger type d_type. Write:/ 'd_intiger', d_type.
DESCRIBE FIELD d_float type d_type. Write:/ 'd_float', d_type.
DESCRIBE FIELD d_packed type d_type. Write:/ 'd_packed', d_type.
DESCRIBE FIELD d_character type d_type. Write:/ 'd_character', d_type.
DESCRIBE FIELD d_date type d_type. Write:/ 'd_date', d_type.
DESCRIBE FIELD d_numc type d_type. Write:/ 'd_numc', d_type.
DESCRIBE FIELD d_time type d_type. Write:/ 'd_time', d_type.
DESCRIBE FIELD d_hexa type d_type. Write:/ 'd_hexa', d_type.
The output of the above program is as follows.
Finding Attributes of a field
d_intiger I d_float F d_packed P d_character C d_date D d_numc N d_time T d_hexa X
Finding the Length at Runtime.
Syntax
DESCRIBE FIELD <field> LENGTH <l>.
The length of the filed <field> is obtained in <l>.
Example.
REPORT ZEX_ATTRIBUTES1 .
Data: d_char(8) type c, d_len type i.
move 'TEXT' to d_char. DESCRIBE FIELD d_char LENGTH d_len. Write:/ d_char, 'Length', d_len.
We will now see an example of finding out the conversion routine at runtime. As we have seen earlier the Domain AUART has a conversion routine AUART. We will now determine this by using the example given below.
REPORT ZEX_ATTRIBUTES_CONVERSIONR .
data: d_ord like vbak-auart, d_mask(10).
DESCRIBE FIELD d_ord EDIT MASK d_mask. Write:/ d_mask.
The output of this program is as follows.
Finding the conversion Routine ==AUART
1 comment:
Anonymous
said...
You can also use field symbols if you do not know a certain data type at runtime. As an SAP ABAP Developer for 10 years, I always recommend my team to use field symbols wherever possible.
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.
1 comment:
You can also use field symbols if you do not know a certain data type at runtime. As an SAP ABAP Developer for 10 years, I always recommend my team to use field symbols wherever possible.
Post a Comment