Functions of reference tables and reference fields in the ABAP Data Dictionary

Source: Internet
Author: User

The role of reference tables and reference fields in the ABAP data dictionary when you first create a table and Structure in SE11, you will encounter a problem. If you set a field to the quan or curr type, that is, when the quantity or amount is used, a reference table is always required...
When you first create a table and Structure in SE11, you will encounter a problem. If you set a field to the quan or curr type, that is, the quantity or amount, A reference table and a reference field are always required. What is the purpose of this field?
This starts from the nature of numbers. Everyone knows that a "number can speak". However, commercial numbers are not algebra, and they cannot speak even if they do not have a unit, this is also a nonsense. For example, if you have read the New Year's film "if you are not the one", Ge You and Fan Wei just reached 2 million of the agreement on the great epoch invention "different terminal, the split between the dollar and the pound will pop up immediately-the numbers will be misunderstood.
SAP does not let this happen. For the quantity and amount, SAP requires that you specify a Unit. This unit is specified by the reference table and reference fields. In this way, the unit of this number can be accurately obtained by the ABAP runtime environment, so that no one can see this number exaggerated or reduced.
Now that you know why, the next step is to explain how to do it.

For database tables:
1. The reference table is the best explanation of the current table. The unit of the quantity in a record is the value contained in its reference field, such as in the primary data table such as Mara;
2. If the reference table is another table, in principle, the current table should have a field that uses the reference table as a foreign key table. In this way, the unit of the quantity in a record is the value of the foreign key field of the record. This is the value of the reference field corresponding to the reference table, for example, the t031 table;
3. What is most incomprehensible is that the field reference table is not a foreign key table. I have no idea how the value corresponds to the unit, maybe it is a program control? This needs to be explained by SAP. There are also many such examples, such as StPO.

For the structure:
The situation is similar to the above, but it is mostly a third definition that cannot be explained.

Functions of reference tables and reference fields in the ABAP Data Dictionary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.