欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

ABAP 740新的OPEN SQL增强特性 ABAPC4CCloudCDS viewCloudFoundry 

程序员文章站 2022-06-13 18:00:27
...

he following open SQL statement looks a little weird, however it could really works in 740.

 

ABAP 740新的OPEN SQL增强特性
            
    
    
        ABAPC4CCloudCDS viewCloudFoundry 

 

(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:

 

ABAP 740新的OPEN SQL增强特性
            
    
    
        ABAPC4CCloudCDS viewCloudFoundry 

 

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.

 

ABAP 740新的OPEN SQL增强特性
            
    
    
        ABAPC4CCloudCDS viewCloudFoundry 

 

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:

 

ABAP 740新的OPEN SQL增强特性
            
    
    
        ABAPC4CCloudCDS viewCloudFoundry 

 

The performance before HANA optimization:

 

ABAP 740新的OPEN SQL增强特性
            
    
    
        ABAPC4CCloudCDS viewCloudFoundry 

 

The performance after optimization in HANA:

 

ABAP 740新的OPEN SQL增强特性
            
    
    
        ABAPC4CCloudCDS viewCloudFoundry 

 

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

ABAP 740新的OPEN SQL增强特性
            
    
    
        ABAPC4CCloudCDS viewCloudFoundry