当前位置:网站首页>SAP 03-amdp CDs table function using 'with' clause
SAP 03-amdp CDs table function using 'with' clause
2022-04-23 09:31:00 【rogerix4】
1. Code
-
In this case CDS Table Function On the basis of , Demonstrate the use of WITH:SAP 02-AMDP Functions for CDS Table Functions
CLASS zamdp_demo_02 DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. interfaces: IF_AMDP_MARKER_HDB. class-methods: GET_SPFLI_US for table function zamdp_cds_tabfunc_01. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zamdp_demo_02 IMPLEMENTATION. method GET_SPFLI_US by database function for hdb language sqlscript options read-only using spfli sflight. return with sflight_tmp as ( select distinct carrid,connid from sflight where carrid = 'AA' and connid = '0017' ) select t2.MANDT, t1.CARRID, t1.CONNID, t2.COUNTRYFR, t2.CITYFROM, t2.AIRPFROM, t2.COUNTRYTO, t2.CITYTO, t2.AIRPTO, t2.FLTIME, t2.DEPTIME, t2.ARRTIME, t2.DISTANCE, t2.DISTID, t2.FLTYPE, t2.PERIOD from sflight_tmp as t1 left outer join spfli as t2 On t1.carrid = t2.carrid and t1.connid = t2.connid where t2.mandt = :ip_clnt --Use Table Function Parameter and t2.COUNTRYFR = :ip_COUNTRYFR; endmethod. ENDCLASS.
2. Result display
- In the original example , Results after operation
- In this case , Use WITH Clause ( The data is used for secondary screening , More accurate than the original range )
版权声明
本文为[rogerix4]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230623504249.html
边栏推荐
- Comparison of overloading, rewriting and hiding
- 1 + X cloud computing intermediate -- script construction, read-write separation
- Simply understand = = and equals, why can string not use new
- DVWA range practice record
- Flutter 的加载动画这么玩更有趣
- Single sign on SSO
- Project upload part
- 个人主页软件Fenrus
- 【SQL server速成之路】数据库的视图和游标
- Cross domain configuration error: when allowcredentials is true, allowedorigins cannot contain the special value "*“
猜你喜欢
【读书笔记】《Verilog数字系统设计教程》 第5章 条件语句、循环语句和块语句(附思考题答案)
Go language learning notes - slice, map | go language from scratch
Kettle实验
DVWA range practice record
Common errors of VMware building es8
Summary of wrong questions 1
npm ERR! network
Program, process, thread; Memory structure diagram; Thread creation and startup; Common methods of thread
Leetcode0587. 安装栅栏(difficult)
kernel-pwn学习(3)--ret2user&&kernel ROP&&QWB2018-core
随机推荐
Machine learning (VI) -- Bayesian classifier
Colorui solves the problem of blocking content in bottom navigation
MySQL of database -- basic common query commands
1 + X cloud computing intermediate -- script construction, read-write separation
ALV tree (ll LR RL RR) insert delete
Node installation
Give the method of instantiating the object to the new object
What is monitoring intelligent playback and how to use intelligent playback to query video recording
EmuElec 编译总结
Number theory to find the sum of factors of a ^ B (A and B are 1e12 levels)
Enter "net start MySQL" and "system error 5. Access denied" appears. Detailed explanation of the problem
Your guide to lowering your cholesterol with TLC (continuously updated)
Chapter VIII project stakeholder management of information system project manager summary
Exclusive thoughts and cases of JS
108. Convert an ordered array into a binary search tree
ALV树(LL LR RL RR)插入删除
ATSS(CVPR2020)
Summary of wrong questions 1
[geek challenge 2019] havefun1
Go language learning notes - array | go language from scratch