如何让我的数据显示在我的 ALV 中?
我想我可能缺少导出参数(来自我的函数调用 POV)。
在REUSE_ALV_GRID_DISPLAY
函数调用中,我传递的参数是: 导出:
i_callback_program,
i_callback_pf_status_set,
i_callback_user_command,
is_layout,
it_fieldcat,
i_save
Tables:
t_outtab
以及异常和处理。
我已经检查过我传递的内部表是否有数据,确实如此。
我认为我提供的信息就足够了,但如果您确实需要查看代码,我会这样做。
我是菜鸟,任何帮助将不胜感激。
谢谢。
I'm thinking that I'm probably missing an export parameter (from my Function Call POV).
In the REUSE_ALV_GRID_DISPLAY
function call, the parameters I pass around are:
Exporting:
i_callback_program,
i_callback_pf_status_set,
i_callback_user_command,
is_layout,
it_fieldcat,
i_save
Tables:
t_outtab
And the exceptions plus handling.
I've checked that the internal table that I pass has data and it does.
I think the information I put up will suffice but if you really need to see the code, I'll do so.
I'm a noob and any help would be appreciated.
Thanx.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
将输出内部表传递给 FM 参数“t_outtab”。
它将打印您的数据输出。
Pass the output internal table to the FM Parameter "t_outtab".
It will print your data output.
使用 ALV 的方法有多种,因此我们可能确实需要有关您的代码的更多信息来提供帮助。
如果在程序中声明了该结构,那么您必须创建一个字段目录。
以下代码可以作为基础:
然后调用表单来创建字段目录,并在函数调用的 it_fieldcat 参数中使用它。
在 Dynpro 中,您声明一个具有给定名称(“ALV_CONT”)的自定义容器。然后在 dynpro 的 PBO 中初始化容器并在其中放入 ALV 对象:
在 PBO 中
希望有帮助,
问候 纪尧姆
·帕特里
There are several ways to use ALV, so we may indeed need more info on your code to help.
If the structure is declared in the program, then you have to create a field catalog.
the following code can serve as basis :
you then call the form to create the field catalog, and use it in the it_fieldcat parameter of the function call.
In your Dynpro you declare a custom container with a given name ("ALV_CONT"). Then in then PBO of the dynpro you initialize the container and put an ALV objct inside :
in PBO
Hopes this help,
Regards
Guillaume PATRY
编辑:哦,还有一件事 - 如果您确实处于 POV(处理 Value-Request = F4),请注意您可以做的事情是有限的。在开始选择后立即在简单报告中尝试您的代码,如果有效,请在 POV 模块中尝试相同的代码。
===
如果您不传递结构名称,则必须确保传递完整的 (!) 字段目录,否则 ALV 网格可能会开始不稳定工作或根本无法工作。使用功能模块 LVC_FIELDCATALOG_MERGE 和 LVC_FIELDCAT_COMPLETE(按此顺序)获取可与类或 REUSE_ALV_GRID_DISPLAY_LVC 一起使用的 LVC 字段目录。
EDIT: Oh, and another thing - if you're really in POV (process on Value-Request = F4), be aware that there are limitations to what you can do. Try your code in a simple report right after START-OF-SELECTION, and if that works, try the same code in a POV module.
===
If you don't pass a structure name, you have to ensure that you pass a complete (!) field catalog, otherwise the ALV grid might start to work erratically or not at all. Use the function modules LVC_FIELDCATALOG_MERGE and LVC_FIELDCAT_COMPLETE (in this order) to get a LVC field catalog that can be used with the classes or REUSE_ALV_GRID_DISPLAY_LVC.
这里有几个人建议使用 REUSE_ALV_GRID_DISPLAY。我确信这是一种常见的完成事情的方法(我自己曾经使用过它),但是我最近参加了 sap delta 课程,他们强烈建议不要再使用它了(你可以查一下,REUSE_ALV_GRID_DISPLAY 是SAP 不再提供官方支持)。
相反,请使用 CL_SALV_TABLE,此处的文档: http://help.sap .com/erp2005_ehp_04/helpdata/EN/d7/b22041aa7df323e10000000a155106/frameset.htm
其实用起来也比较方便。
A couple people here suggested using the REUSE_ALV_GRID_DISPLAY. I'm sure this is a common way to get things done (I used to use it myself), but I've taken a sap delta course recently and they strongly suggested to not use it anymore (you can look it up, REUSE_ALV_GRID_DISPLAY is not officialy supported by SAP anymore).
Instead, use CL_SALV_TABLE, documentation here: http://help.sap.com/erp2005_ehp_04/helpdata/EN/d7/b22041aa7df323e10000000a155106/frameset.htm
It's actually rather convenient to use too.
感谢您的努力,但事实证明,我犯的错误是在构建字段目录时没有将字段名称大写。这样的新手错误。我想我很快就不会再犯同样的错误了。
-米格
Thanks for the effort but as it turned out, the mistake I did was that I didn't capitalize field names in building the Field Catalog. Such a newbie mistake. I guess I won't be doing that mistake again any time soon.
-migs