ABAP 中的表型別及作用
ABAP 中的表型別及作用(轉)
Transparent tables
A transparent table in the dictionary has a one-to-one relationship with a table in the database. Its structure in R/3 Data Dictionary corresponds to a single database table. For each transparent table definition in the dictionary, there is one associated table in the database. The database table has the same name, the same number of fields, and the fields have the same names as the R/3 table definition. When looking at the definition of an R/3 transparent table, it might seem like you are looking at the database table itself.
Transparent tables are much more common than pooled or cluster tables. They are used to hold application data. Application data is the master data or transaction data used by an application. An example of master data is the table of vendors (called vendor master data), or the table of customers (called customer master data). An example of transaction data is the orders placed by the customers, or the orders sent to the vendors.
Transparent tables are probably the only type of table you will ever create. Pooled and cluster tables are not usually used to hold application data but instead hold system data, such as system configuration information, or historical and statistical data.
Both pooled and cluster tables have many-to-one relationships with database tables. Both can appear as many tables in R/3, but they are stored as a single table in the database. The database table has a different name, different number of fields, and different field names than the R/3 table. The difference between the two types lies in the characteristics of the data they hold.
Table Pool and Pooled Tables
A pooled table in R/3 has a many-to-one relationship with a table in the database. For one table in the database, there are many tables in the R/3 Data Dictionary. The table in the database has a different name than the tables in the DDIC, it has a different number of fields, and the fields have different names as well. Pooled tables are an SAP proprietary construct.
When you look at a pooled table in R/3, you see a description of a table. However, in the database, it is stored along with other pooled tables in a single table called a table pool. A table pool is a database table with a special structure that enables the data of many R/3 tables to be stored within it(in database, it is only one table). It can only hold pooled tables.
R/3 uses table pools to hold a large number (tens to thousands) of very small tables (about 10 to 100 rows each). Table pools reduce the amount of database resources needed when many small tables have to be open at the same time. SAP uses them for system data. You might create a table pool if you need to create hundreds of small tables that each hold only a few rows of data. To implement these small tables as pooled tables, you first create the definition of a table pool in R/3 to hold them all. When activated, an associated single table (the table pool) will be created in the database. You can then define pooled tables within R/3 and assign them all to your table pool (see Figure 3.2).
Pooled tables are primarily used by SAP to hold customizing data.
When a corporation installs any large system, the system is usually customized in some way to meet the unique needs of the corporation. In R/3, such customization is done via customizing tables. Customizing tables contain codes, field validations, number ranges, and parameters that change the way the R/3 applications behave.
Some examples of data contained in customizing tables are country codes, region (state or province) codes, reconciliation account numbers, exchange rates, depreciation methods, and pricing conditions. Even screen flows, field validations, and individual field attributes are sometimes table-driven via settings in customizing tables.
During the initial implementation of the system the data in the customizing tables is set up by a functional analyst. He or she will usually have experience relating to the business area being implemented and extensive training in the configuration of an R/3 system.
Table cluster and cluster tables
A cluster table is similar to a pooled table. It has a many-to-one relationship with a table in the database. Many cluster tables are stored in a single table in the database called a table cluster.
A table cluster is similar to a table pool. It holds many tables within it. The tables it holds are all cluster tables.
Like pooled tables, cluster tables are another proprietary SAP construct. They are used to hold data from a few (approximately 2 to 10) very large tables. They would be used when these tables have a part of their primary keys in common, and if the data in these tables are all accessed simultaneously. 這些表一起儲存在於他們有共同的主鍵。
Table clusters contain fewer tables than table pools and, unlike table pools, the primary key of each table within the table cluster begins with the same field or fields. Rows from the cluster tables are combined into a single row in the table cluster. The rows are combined based on the part of the primary key they have in common. Thus, when a row is read from any one of the tables in the cluster, all related rows in all cluster tables are also retrieved, but only a single I/O is needed.
A cluster is advantageous in the case where data is accessed from multiple tables simultaneously and those tables have at least one of their primary key fields in common. Cluster tables reduce the number of database reads and thereby improve performance.
As another example, assume the data from order header and order item tables is always needed at the same time and both have a primary key that begins with the order number. Both the header and items could be stored in a single cluster table because the first field of their primary keys is the same. When implemented as a cluster, if a header row is read, all item rows for it are also read because they are all stored in a single row in the table cluster. If a single item is read, the header and all items will also be read because they are stored in a single row.
Restrictions on Pooled and Cluster Tables
Pooled and cluster tables are usually used only by SAP and not used by customers, probably because of the proprietary format of these tables within the database and because of technical restrictions placed upon their use within ABAP/4 programs. On a pooled or cluster table:
Ø Secondary indexes cannot be created.
Ø You cannot use the ABAP/4 constructs select distinct or group by.
Ø You cannot use native SQL.
Ø You cannot specify field names after the order by clause.
Ø Order by primary key is the only permitted variation.
CAUTION |
The use of pooled and cluster tables can prevent your company from using third-party reporting tools to their fullest extent if they directly read data-base tables because pooled and cluster tables have an SAP proprietary for-mat. If your company wants to use such third-party tools, you may want to seek alternatives before creating pooled or cluster tables. |
Because of these restrictions on pooled and cluster tables and because of their limited usefulness, this book concentrates on the creation and use of transparent tables. The creation of pooled and cluster tables is not covered.
come from :http://www.cnblogs.com/omygod/archive/2007/12/28/1018961.html
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/132884/viewspace-1002118/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux中檔案顏色代表型別Linux型別
- C#中continue、return、break的區別及作用C#
- Java Web中requset,session,application 的作用域及區別JavaWebSessionAPP
- T-SQL——關於表型別SQL型別
- 在SQL Server 2008中的SP上使用表型別值引數MHSQLServer型別
- 根據需要的圖表型別選擇echarts對應的series型別型別Echarts
- 【Qt6】列表模型——幾個便捷的列表型別QT模型型別
- C# 列表型別 增加 刪除 計數C#型別
- Linux中chmod命令的定義及作用!Linux
- 探索 DTD 在 XML 中的作用及解析:深入理解文件型別定義XML型別
- MySQL information_schema庫下的表型別資訊彙總MySqlORM型別
- call apply bind的作用及區別? 應用場景?APP
- python語言中類和函式的作用及區別!Python函式
- Python資料視覺化之Pygal圖表型別Python視覺化型別
- 【TcaplusDB知識庫】預設Schema表型別介紹型別
- Linux中的特殊符號含義及作用!Linux符號
- javascript中break和continue的區別和作用JavaScript
- PL/SQL基本結構---PLSQL複合型別---表型別變數tableSQL型別變數
- 優秀第三方庫收集-圖表型別型別
- Hibernate中的自動建表及引數作用
- 作用域及作用域鏈
- 淺析Java中的雜湊值HashCode的作用及用法Java
- Xamarin圖表開發基礎教程(11)OxyPlot框架支援的圖表型別框架型別
- Xamarin圖表開發基礎教程(10)OxyPlot框架支援的圖表型別框架型別
- P12 2.3線性表型別的定義和一些操作型別
- Xamarin圖表開發基礎教程(12)OxyPlot框架支援的金融圖表型別框架型別
- meta標籤的作用及整理
- 伺服器的作用及用途伺服器
- transient的作用及序列化
- c指標型別的作用指標型別
- Java程式中的代理作用和應用場景及實現Java
- JavaScript中的var、let 及 const 區別JavaScript
- (四)Python中的字串型別及操作Python字串型別
- 好程式設計師Python培訓分享print和return的作用及區別程式設計師Python
- 作用域、作用域鏈及閉包(一)
- 伺服器的作用及運用伺服器
- Java transient 的作用及使用方法Java
- SAP ABAP 報表幾個事件的先後執行順序和作用事件
- C++中::的作用C++