Well, I would rather use custom containers for things like tableviews. If you are working with the standard Dynpros you can just add a button in the dynpro designer and implement the behaviour you would like. To give a more detailled answer, I would need to know what you are planning to do. Of course you can also create a ALV grid and modify the buttons which are displayed there. Maybe you elaborate a little bit more what you're planning to do and then I can give you a recommendation.
Yes, this is possible - check out class CL_GUI_TOOLBAR and the associated documentation (like http://help.sap.com/printdocu/core/Print46c/de/data/pdf/BCCITOOLBAR/BCCITOOLBAR.pdf) and sample programs. AFAIR there's a demo program that lets you assemble a toolbar dynamically, I just don't remember the name. You'll usually want to insert some kind of splitter first, then add the toolbar to one side of the container so that you can place other elements like trees or tables next to it.
发布评论
评论(2)
好吧,我宁愿使用自定义容器来处理表格视图之类的东西。如果您使用标准 Dynpro,您只需在 dynpro 设计器中添加一个按钮并实现您想要的行为。为了给出更详细的答案,我需要知道您打算做什么。当然,您也可以创建 ALV 网格并修改其中显示的按钮。也许你详细说明一下你打算做什么,然后我可以给你一个建议。
Well, I would rather use custom containers for things like tableviews. If you are working with the standard Dynpros you can just add a button in the dynpro designer and implement the behaviour you would like. To give a more detailled answer, I would need to know what you are planning to do. Of course you can also create a ALV grid and modify the buttons which are displayed there. Maybe you elaborate a little bit more what you're planning to do and then I can give you a recommendation.
是的,这是可能的 - 查看类 CL_GUI_TOOLBAR 和相关文档(例如 http://help.sap.com/printdocu/core/Print46c/de/data/pdf/BCCITOOLBAR/BCCITOOLBAR.pdf)和示例程序。 AFAIR 有一个演示程序可以让你动态地组装一个工具栏,我只是不记得名字了。您通常需要先插入某种分隔符,然后将工具栏添加到容器的一侧,以便您可以在其旁边放置其他元素,例如树或表格。
Yes, this is possible - check out class CL_GUI_TOOLBAR and the associated documentation (like http://help.sap.com/printdocu/core/Print46c/de/data/pdf/BCCITOOLBAR/BCCITOOLBAR.pdf) and sample programs. AFAIR there's a demo program that lets you assemble a toolbar dynamically, I just don't remember the name. You'll usually want to insert some kind of splitter first, then add the toolbar to one side of the container so that you can place other elements like trees or tables next to it.