ABAP 740新的OPEN SQL增强特性
The following open SQL statement looks a little weird, however it could really works in 740.
(1) The field name of my structure ty_my_sflight is different from field defined in sflight, so in SQL statement I use the format AS to move the content from DB to the corresponding fields of my internal table.
(2) I want to calculate the percent about how many seat are occupied and put the result into my field my_seatrate. Now I could push the calculation to DB layer instead of calculating it in ABAP side.
(3) The logic to determine the flight price in the example shows that we could define some application logic in open SQL statement.
(4) Since we are using new SQL enhanced syntax in 740, it is required that all variables defined in the application code must be escaped with flag “@” when they are being used in the SQL, as is shown in line 28 and 33.
The original data displayed in SE16:
The content of internal table lt_flight is listed below. We observed that the price for the 2013-2-13 and 2013-3-13 is reduced correctly, also the seat occupation percent.
By the way, here below is a slide which talks about the optimization on two ERP transaction in HANA. There are several kinds of optimization categories and one of them also uses the similar syntax described in this blog:
The performance before HANA optimization:
The performance after optimization in HANA:
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关文章
- 内连接,左右连接和全连接的区别是什么_sql左连接和右连接区别
- MySQL 常用时间范围查询SQL样例
- SQL(MSSQLSERVER)服务启动错误代码3414的解决方法
- SQL Server中聚合历史备份信息对比数据库增长的方法
- 利用Redis实现SQL伸缩的方法简介
- 语句MySQL优化:精确掌握SQL语句(mysql优化sql)
- ABAP 7.52 中的Open SQL新特性详解编程语言
- MySQL查看历史SQL:史上最全指南(mysql查看历史sql)
- SQL Server数据库:解释与实践(sqlserver释义)
- 功能SQL Server美妙美化,让你绝无倦意(sqlserver有美化)
- 使用免费SQL Server 打造你的绝佳数据库(sqlserver免费版)
- MySQL数据库导入SQL文件实现快速搭建(sql文件导入mysql数据库)
- MySQL中如何导入SQL文件(mysql如何导入sql文件)
- 将SQL查询结果存入Redis缓存(sql结果存入redis)
- Oracle SQL替换指南简单操作轻松有效实现(oracle中sql替换)
- Oracle中SQL备份保障数据安全的必要步骤(Oracle中sql备份)
- Oracle SQL 实战字符串截取技巧(oracle。sql截取)
- 从Oracle数据库查重SQL技巧介绍(oracle sql查重)
- 使用Oracle SQL实现数据表查询(oracle sql查表)
- ASP程序与SQL存储过程结合使用详解
- Sql学习第一天——SQL练习题(建表/sql语句)