gpt4 book ai didi

abap - 类型池或常量类?

转载 作者:行者123 更新时间:2023-12-04 18:22:36 25 4
gpt4 key购买 nike

Type-pool 和为常量创建类有什么区别?什么是更好的?我的问题是针对一大组常量并可供其他组访问。

谢谢

编辑 - 感谢您的回答,我会改进我的问题。我需要一些东西来存储常量,我将在程序或其他类中使用它们。基本上,我想知道使用类型池或带常量的类(仅)是否更好。我可以拥有多个类或类型池。

最佳答案

documentation提到这一点:

Since it is possible to also define data types and constants in the public visibility section of global classes, type groups are obsolete and should no longer be created. Existing type groups can still be used.

一个合理命名的接口(interface)与你想要的常量是要走的路。另一个好处是 ABAP OO 强制执行更多规则。

关于abap - 类型池或常量类?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53399283/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com