当前位置:网站首页>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
边栏推荐
- Secrets in buffctf file 1
- Number of islands
- [reading notes] Chapter 5 conditional statements, circular statements and block statements of Verilog digital system design tutorial (with answers to thinking questions)
- npm ERR! network
- Leetcode题库78. 子集(递归 c实现)
- Flink SQL realizes the integration of stream and batch
- Two ways for flutter providers to share data
- Cloud computing competition -- basic part of 2020 competition [task 3]
- DMP engine work summary (2021, lightsaber)
- KVM installation and deployment
猜你喜欢
Number of islands
JS node operation, why learn node operation
A must see wechat applet development guide 1 - basic knowledge
JS DOM event
Three challenges that a successful Devops leader should be aware of
Principle of synchronized implementation
I don't understand time, timestamp and time zone. Look at this article
NPM reports an error: operation not allowed, MKDIR 'C: \ program files \ node JS \ node_ cache _ cacache’
MySQL of database -- basic common query commands
错题汇总1
随机推荐
Leetcode0587. Install fence
DVWA range practice
Where is int a = 1 stored
kettle庖丁解牛第14篇之JSON输入
Chapter VIII project stakeholder management of information system project manager summary
npm报错 :operation not permitted, mkdir ‘C: \Program Files \node js \node_ cache _ cacache’
A must see wechat applet development guide 1 - basic knowledge
数据清洗 ETL 工具Kettle的安装
Go language learning notes - exception handling | go language from scratch
Unfortunately, I broke the leader's confidential documents and spit blood to share the code skills of backup files
JS DOM event
Flutter's loading animation is more interesting
Principle of synchronized implementation
Write down the post order traversal of the ~ binary tree
Leetcode question bank 78 Subset (recursive C implementation)
成功的DevOps Leader 应该清楚的3个挑战
小女孩行走
小程序报错:Cannot read property 'currentTarget' of undefined
Summary of wrong questions 1
Node installation