SAP S4后的一些注意点(一)(更新中)

  1. SAP
    此外,我们必须确保 P10 中所有新的 Unicore 代码都是云就绪的。因此,在 ATC 中增加了一项新的检查(自定义),以证明代码的云就绪性。此外,我们还在 ADT 中安装了一个名为 ABAP Cleaner 的新插件,它也可以帮助您转换和检查代码的云就绪性(但仅限于语法检查)。可以在ECLIPSE下载这样的工具。
    地址:
    直接在eclipse输入“ https://sap.github.io/abap-cleaner/updatesite”安装新的ABAP cleaner软件.

怎么使用ABAP cleaner插件?

Select any amount of ABAP code in the current code editor in ADT - or alternatively, do NOT select any code to apply cleanup to the current method or declaration section.

(1)Automatic:Press Ctrl + 4 or select menu ‘Source Code / Clean Up With Automated ABAP Cleaner’. The cleanup will be done automatically, using the profile and cleanup range that was last selected when you used the interactive ABAP cleaner UI (see below).

(2)Inactive:Press Ctrl + Shift + 4 or select menu ‘Source Code / Clean Up With Interactive ABAP Cleaner…’. This will open the ABAP cleaner UI to compare the original and the cleaned code.

在这里插入图片描述

(Un)check the ‘Highlight …’ options to focus on certain types of changes. If you come across a changed statement which you prefer to keep in its original state, simply deactivate the applied rule(s) in the ‘Rules Used in Current Selection’ list for this statement. You may also configure or select a different profile for the cleanup.

Press Ctrl + Enter or click ‘Apply and Close’ to apply the result and return to the ADT editor; to discard the changes, press Esc or click ‘Cancel’.

(3)Read-only:
Press Ctrl + Shift + 5 or select menu ‘Source Code / Show Read-Only Preview With ABAP Cleaner…’:

This opens the interactive ABAP cleaner UI as described above, but the code will not be locked or changed. Nevertheless, changes to ABAP cleaner settings (selected profile, activated rules and options etc.) will be kept.

The read-only preview also allows you to paste other ABAP code (e.g. from SAP GUI) into the ABAP cleaner UI by pressing Ctrl + V or selecting menu ‘Code / From Clipboard’, or to read code from a file with ‘Code / From File…’.

2.尽量不直接从底层透明表拉数据

.尽量不直接从底层透明表拉数据 ,尽量用CDS视图代替底层数据表,根据业务需求选择适合的CDS view。
还有要注意的是,新的关键字WITH PRIVILEGED ACCESS可以关闭CDS的访问控制。
eg:

SELECT SalesOrganization AS ckorg,
           CompanyCode AS bukrs
         FROM i_salesorganization WITH PRIVILEGED ACCESS
         WHERE SalesOrganization IN @mt_r_vkorg
         INTO TABLE  @mt_vkorg.

你可能感兴趣的:(abap,S4-HANA,UNICORE)