当前位置:网站首页>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
边栏推荐
- Unfortunately, I broke the leader's confidential documents and spit blood to share the code skills of backup files
- Sql1 [geek challenge 2019]
- 员工试用期转正申请书(泸州老窖)
- How to obtain geographical location based on photos and how to prevent photos from leaking geographical location
- Kettle experiment (III)
- GoLand debug go use - white record
- Flink 流批一体在小米的实践
- 2D 01 Backpack
- Two declaration methods of functions of JS
- NLLLoss+log_ SoftMax=CE_ Loss
猜你喜欢
Amazon cloud technology entry Resource Center, easy access to the cloud from 0 to 1
AQS & reentrantlock implementation principle
MySQL of database -- Fundamentals
《数字电子技术基础》3.1 门电路概述、3.2 半导体二极管门电路
Acquisition of DOM learning elements JS
Distributed message oriented middleware framework selection - Digital Architecture Design (7)
A must see wechat applet development guide 1 - basic knowledge
JSON input of Chapter 14 of kettle paoding jieniu
Simple understanding of arguments in JS
MySQL of database -- overview and installation
随机推荐
Simple understanding of arguments in JS
Kettle实验
Kettle experiment conversion case
Go language learning notes - slice, map | go language from scratch
Summary of common concepts and problems of linear algebra in postgraduate entrance examination
kettle庖丁解牛第14篇之JSON输入
ALV树(LL LR RL RR)插入删除
Kettle experiment
ASUS laptop can't read USB and surf the Internet after reinstalling the system
基于ThinkPHP5版本TRC20-资金归集解决方案
SAP 101K 411K 库存变化
npm报错 :operation not permitted, mkdir ‘C: \Program Files \node js \node_ cache _ cacache’
1 + X cloud computing intermediate -- script construction, read-write separation
Your guide to lowering your cholesterol with TLC (continuously updated)
Kettle experiment (III)
Enter "net start MySQL" and "system error 5. Access denied" appears. Detailed explanation of the problem
JS scope, scope chain, global variables and local variables
kernel-pwn学习(3)--ret2user&&kernel ROP&&QWB2018-core
Canary publishing using ingress
Cloud computing competition -- basic part of 2020 competition [task 3]