ABAP 7.52-更新概覽

  • 內表可以作爲SQL查詢的數據源
select *
  from tj02t
  into table @data(lt_status).

select single istat
  from @lt_status as t
  where istat eq 'I0045'
  into @data(lv_status_teco).
  • 新方法CL_ABAP_ITAB_UTILITIES=>VIRTUAL_SORT ()實現內表排序,返回結果是最終排序的行索引
DATA(v_index) =
      cl_abap_itab_utilities=>virtual_sort(
        im_virtual_source = VALUE #(
         ( source     = REF #( itab )
           components = VALUE #( ( name = 'col1' )
                                 ( name = 'col2' ) ) ) ) ).

  • SQL函數 BINTOHEX / HEXTOBIN 實現字節(16進制)和字符(二進制)之間的強制轉換(無法用CAST做到)
select single id as uuid32, hextobin( id ) as uuid16
from iwreferenc
where tcode = 'SE38'
into @data(wa).

if sy-subrc = 0.
  data uuid16 like wa-uuid16.
  cl_system_uuid=>convert_uuid_c32_static(
  exporting
    uuid          =     wa-uuid32
  importing
    uuid_x16      =     uuid16 ).
  assert wa-uuid16 = uuid16.
endif.

cl_demo_output=>display_data( wa ).

結果:可以看到是不同的類型
轉換結果

  • 註解WITH PRIVILEGED ACCESS 可以關閉 CDS access control
"將取出所有的記錄
SELECT *
       FROM demo_cds_auth_literal WITH PRIVILEGED ACCESS
       ORDER BY carrid
       INTO TABLE @DATA(result).

cl_demo_output=>display( result ). 
  • 左外連接支持TO ONE 和 TO MANY來定義基數
  • 子查詢中支持使用ORDER BY and UP TO, OFFSET
  • CDS annotations可以用DDLA定義爲獨立的CDS對象
  • 推出對ABAP Daemons的支持
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章