惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
罗磊的独立博客
博客园 - 聂微东
T
The Blog of Author Tim Ferriss
博客园 - 司徒正美
Stack Overflow Blog
Stack Overflow Blog
F
Fortinet All Blogs
A
About on SuperTechFans
腾讯CDC
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed
IT之家
IT之家
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
宝玉的分享
宝玉的分享
C
Check Point Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
爱范儿
爱范儿
Microsoft Security Blog
Microsoft Security Blog
月光博客
月光博客
T
Tailwind CSS Blog
The Cloudflare Blog
Hugging Face - Blog
Hugging Face - Blog

Wriprin Blog

🐿️ SAP GUI 账户密码重置「Note」 🧑🏻‍💻 MCU - C51 单片机「实例」 🌳 Linux - tree 生成目录树「Note」 🗂️ SAP 通过 OData Service 反查 CDS View 位置 & 视图「Workaround」 🐌 Android Studio Gradle 无限 Build「假死」 🧑🏻‍💻 Android Studio 开发环境搭建 & 配置 🤖 Android Studio 默认配置路径修改 🐌 SAP ALV & 导出 Excel 负号前置「实例」 🍵 Java 调用 SAP RFC 接口「实例」
📒 SAP ABAP SY-REPID 变化「Note」
Wriprin · 2023-02-02 · via Wriprin Blog

6.10 前(知悉)

SAP-ABAP-SY-REPID-STAIN-01.png

SY-CPROG

The name of the calling program in an external routine, otherwise the name of the current program.
  • 外部例程中调用程序的名称,否则为当前程序的名称

SY-REPID

Name of the current ABAP program. For externally-called procedures, it is the name of the main program of the procedure. If you pass SY-REPID as an actual parameter to an external procedure, the formal parameter does not contain the name of the caller, but that of the main program of the procedure. To avoid this, assign SY-REPID to an auxiliary variable and use that in the call, or use the system field SY-CPROG.
  • 当前 ABAP 程序的名称。对于外部调用的程序,为程序的主程序名。如果将 SY-REPID 作为实际参数传递给外部过程,则形式参数不包含调用者的名称,而是包含该过程的主程序的名称。为避免这种情况,请将 SY-REPID 分配给辅助变量并在调用中使用它,或者使用系统字段 SY-CPROG

6.10 后(记住)

SAP-ABAP-SY-REPID-STAIN-02.png

Replacement of the system field sy-repid

系统字段 sy-repid 不再是 ABAP 程序中结构 SY 或 ABAP 字典中结构类型 SYST 的组成部分。相反,从 6.10 版开始,每个程序都包含预定义常量 sy-repid 和 syst-repid,它们都包含当前程序的名称

  • 因此,过时的类型引用 LIKE syst-repid 和 TYPE sy-repid 仍然是可能的

除了在外部过程调用方面有相当大的性能改进外,这个新特性还有一个好处,即:

  • sy-repid 现在也可以作为参数传递给外部过程
  • 形式参数设置为调用者的名称而不是主程序的名称,这意味着不再需要辅助变量

如果 ABAP 程序引用以前的结构 syst,这种不兼容的更改可能会导致问题,例如:

DATA my_syst type syst.
... my_syst-repid ... ... my_syst-repid ...

ASSIGN COMPONENT 'REPID' OF STRUCTURE sy TO ...

本文链接:https://blog.cnix.cc/index.php/archives/124/