当前位置:网站首页>ABAP CDs view with association example
ABAP CDs view with association example
2022-04-23 09:31:00 【rogerix4】
1. ASSOCIATION Application scenarios of
- ASSOCIATION It's a kind of passing Join A join condition that gets data from multiple tables , But these are “ Connect on demand ”, in other words , They will only be triggered when the user accesses the required data that needs to be associated with the table
- because ASSOCIATION Is triggered on demand , When Join When there are more actual accesses, users only access a single or a few Join when , Compared with tradition, it can complete SQL
- ASSOCIATION Association cardinality of
- [ 0 … 1 ] = At most one (at most one)
- [ 1 … 1 ] = Only one-to-one correspondence is allowed (exactly one)
- [ 0 … n ] = Associate any number (any number)
- [ 1 … n ] = Associate at least one (at least one)
- [ 1 … 1 ] [ 1 … n ] It ensures that the associated main table always has at least one record
2. Realization CDS VIEW WITH ASSOCIATION
-
Create a CDS VIEW WITH ASSOCIATION


-
Realization CDS VIEW WITH ASSOCIATION Code
@AbapCatalog.sqlViewName: 'ZCDS_ASSO_01' @AbapCatalog.compiler.compareFilter: true @AbapCatalog.preserveKey: true @AccessControl.authorizationCheck: #CHECK @EndUserText.label: 'cds view with association' define view ZCDS_ASSOCIATIONS as select from spfli as t1 association [1] to sflight as _sflight on $projection.carrid = _sflight.carrid { key t1.carrid, t1.connid, t1.countryfr, t1.cityfrom, t1.airpfrom, t1.countryto, t1.cityto, t1.airpto, t1.fltime, t1.deptime, t1.arrtime, t1.distance, t1.distid, _sflight }
3. Data preview

-
Right click anywhere , Click on Follow Association You can see ASSOCIATION

-
double-click Associations see , This shows that the default Association The way is **[ 0 … 1 ]**

-
Association _sflight

4. stay ABAP Call in
- frequently-used Select * Unable to get Association _sflight Data content in , This is the beginning of the story (Association It will only be triggered when the user accesses the required data of the associated table )

- Correct reading method

- Activate error report :The association “_SFLIGHT” could not be resolved. correct
- Use incorrect call View Name An error will be reported during activation

- resolvent : Use View Name that will do

- Use incorrect call View Name An error will be reported during activation
版权声明
本文为[rogerix4]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230623504064.html
边栏推荐
- Machine learning (VI) -- Bayesian classifier
- Kettle实验 (三)
- Go language learning notes - slice, map | go language from scratch
- Kernel PWN learning (3) -- ret2user & kernel ROP & qwb2018 core
- 【SQL server速成之路】数据库的视图和游标
- LeetCode 1611. The minimum number of operations to make an integer 0
- Applet error: cannot read property'currenttarget'of undefined
- 112. 路径总和
- Pre parsing of JS
- Employee probation application (Luzhou Laojiao)
猜你喜欢

NPM reports an error: operation not allowed, MKDIR 'C: \ program files \ node JS \ node_ cache _ cacache’

JS node operation, why learn node operation

nn. Explanation of module class

LeetCode 1611. The minimum number of operations to make an integer 0
![[reading notes] Chapter 5 conditional statements, circular statements and block statements of Verilog digital system design tutorial (with answers to thinking questions)](/img/a2/b50fadad859a050eecfa15a436e126.png)
[reading notes] Chapter 5 conditional statements, circular statements and block statements of Verilog digital system design tutorial (with answers to thinking questions)
![[C language] document operation](/img/89/b19dda13d27e37fedf6736c102245b.png)
[C language] document operation

Flink SQL realizes the integration of stream and batch

Pre parsing of JS

kettle庖丁解牛第14篇之JSON输入

成功的DevOps Leader 应该清楚的3个挑战
随机推荐
DVWA range practice record
MySQL of database -- Fundamentals
LeetCode 1611. The minimum number of operations to make an integer 0
高薪程序员&面试题精讲系列91之Limit 20000加载很慢怎么解决?如何定位慢SQL?
Two declaration methods of functions of JS
Write down the post order traversal of the ~ binary tree
ATSS(CVPR2020)
Codeforces Round #784 (Div. 4)
Detailed explanation of delete, truncate and drop principles in MySQL database
npm报错 :operation not permitted, mkdir ‘C: \Program Files \node js \node_ cache _ cacache’
Kernel PWN learning (4) -- double fetch & 0ctf2018 baby
Kettle experiment conversion case
nn. Explanation of module class
2D 01 Backpack
Leetcode0587. Install fence
NLLLoss+log_ SoftMax=CE_ Loss
Common errors of VMware building es8
[in-depth good article] detailed explanation of Flink SQL streaming batch integration technology (I)
How to obtain geographical location based on photos and how to prevent photos from leaking geographical location
基于ThinkPHP5版本TRC20-资金归集解决方案