SAP 将数据从应用程序传递到屏幕。 “表格”如何显示?工作?

发布于 2024-12-01 18:27:29 字数 175 浏览 0 评论 0原文

我不太明白TABLES语句在ABAP中是如何工作的。从一些示例代码中我看到语句后面的表名是一个已经存在的字典结构。这是它的唯一使用方法吗?因为我永远不确定我需要哪种结构。

一旦声明完毕,我如何将其传递到实际屏幕?我希望它像 HIDE 方法一样简单,我无法理解这个问题。

I don't quite understand how the TABLES statement works in ABAP. From a few example codes I've seen that the tablename afther the statement is an already existing dictionary structure. Is this the only way it can be used? Because I'm never sure which structure it is that I need.

And once it is declared how do I pass this to the actual screen? I wish it were as straight forward as the HIDE method, I can't get my head around this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

滥情空心 2024-12-08 18:27:29

tables 语句只是为您提供指定的字典结构的单行工作区域。它允许您将结构的字段用作选择选项,并使表的结构可用作程序中的变量。

如果您尝试将结构写入 abap 列表,您可以按如下方式使用它:

tables: aufk.

select single * from aufk into aufk
  where aufnr = some_order_number.  

"I'm pretty sure the into clause is optional 
"because of the tables statement, but including it to be explicit.

write / aufk.

如果您尝试使用 ABAP dynpro 显示字段,则应确保读取 PBO 中的字段并添加字段从词典到屏幕。

The tables statement just provides you with a single-line work area of the dictionary structure that you specify. It allows you to use fields of the structure as select-options and make the structure of the table available as a variable in your program.

If you are trying to write the structure to an abap list you could use it as follows:

tables: aufk.

select single * from aufk into aufk
  where aufnr = some_order_number.  

"I'm pretty sure the into clause is optional 
"because of the tables statement, but including it to be explicit.

write / aufk.

If you are trying to display the field using ABAP dynpro, you should make sure that you read the field in the PBO and add the field(s) to the screen from the dictionary.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文