如何从 STXL.CLUSTD 中解码 SAP 文本?
我知道 !读取 STXL.CLUSTD 的“正确”方法是通过 SAP ABAP 函数。但很抱歉,我们正遭受性能问题的严重困扰。我们已经决定直接使用数据库 (Oracle),而且我们还没有任何计划来恢复我们的决定,因为到目前为止一切都进展顺利。
然而,我们遇到过这个问题。 STXL.CLUSTD 字段中的文本以无法理解的格式存储。我们通过google找不到任何有关其编码格式的信息。有人可以提示我如何解码 STXL.CLUSTD 中的文本吗?
谢谢
I know ! The "proper" way to read STXL.CLUSTD is through SAP ABAP function. But I'm sorry, we are suffering badly from performance problem. We have already make our decision to go directly to the database (Oracle), and we don't have any plan to revert our decision yet since everything goes so much better so far.
However, we've came across this issue. The text in STXL.CLUSTD field was stored in an incomprehensible format. We cannot find any information about its encoding format via google. Anybody can hint me how to decode text from STXL.CLUSTD ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
简短版本:你不知道。使用功能模块READ_TEXT。
长版本:您正在查看所谓的簇表。请参阅http://help.sap.com/saphelp_47x200/helpdata/详情参见/fc/eb3bf8358411d1829f0000e829fbfe/frameset.htm。您看到的数据是文本的内部表示,在某种程度上与 ABAP 内核内部处理数据的方式相关。如果没有元数据,这些数据就没有任何意义。如果以不兼容的方式更改原始结构,则无法再读取数据。哦,我是否提到过数据不包含对元数据的引用?当读取这些表的内容时,即使是在ABAP中,你也需要知道原始的源数据结构,否则你就注定失败。如果没有元数据以及内核如何在运行时处理这些数据类型的知识,您将很难破译这些内容。
个人观点:直接访问 SAP R/3 系统下面的数据库是一个非常糟糕的主意,因为这不仅绕过了所有安全措施,而且还使您非常容易受到数据库的所有结构更改的影响。直接访问数据库的唯一真正原因不是缺乏性能,而是缺乏(ABAP)知识,这应该是可以治愈的:-)
Short version: You don't. Use the function module READ_TEXT.
Long version: You're looking at a so-called cluster table. See http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3bf8358411d1829f0000e829fbfe/frameset.htm for the details. The data you see is an internal representation of the text, somehow related to the way the ABAP kernel handles the data internally. This data does not make any sense without the metadata. If you change the original structure in an incompatible way, the data can no longer be read. Oh, and did I mention that the data does not contain a reference to the metadata? When reading the contents of these tables, even in ABAP, you need to know the original source data structure, otherwise you're doomed. Without the metadata and the knowledge of how the kernel handles these data types at runtime, you'll have a hard time deciphering the contents.
Personal opinion: Direct access to the database below the SAP R/3 system is a really bad idea since this not only bypasses all safety measures, but it also makes you very vulnerable to all structural changes of the database. The only real reason for accessing the database directly is not lack of performance, but lack of (ABAP) knowledge, and that should be curable :-)
您绝对可以在不运行任何 ABAP 代码或调用 RFC 或 BAPI 等的情况下读取集群和池。这是一个非常好的方法,高性能且易于使用。
我不喜欢人们在 StackOverflow 中推销他们的产品,但是“必须使用 ABAP 访问 SAP 数据”的信息已经过时了 7 年多了。
谢谢,
Bill MacLean,
You can definitely read clusters and pools without running any ABAP code, or invoking RFC's or BAPI's, etc. it is a very good approach, highly performant, and easy to use.
I don't like people flogging their products in StackOverflow, but the information that you must use ABAP to access SAP data has been outdated for over 7 years now.
Thanks,
Bill MacLean