SAP经典输出报告重新分配标准工具栏按钮/向下滚动页面 [英] SAP classical output report reassigning standard toolbar buttons/scrolling down a page

查看:53
本文介绍了SAP经典输出报告重新分配标准工具栏按钮/向下滚动页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 SAP 经典输出报告,它可以有可变数量的页面,并且每个页面可以具有可变数量的行.我希望能够一次向上或向下滚动页面.标准工具栏为此提供了一个按钮,但这不起作用,因为我没有指定页面的行数 - 它只是向下滚动几行.使用

I have an SAP classical output report that can have a variable number of pages and each page can have variable number of lines. I want to be able to scroll up or down a page at a time. The standard toolbar provides a button for this but this doesn't work as I'm not specifying how many lines to a page - it just scrolls down a few lines instead. Using

SCROLL LIST FORWARD 1 PAGES INDEX 0.

虽然达到了要求的效果.有没有办法重新分配标准工具栏上的按钮以触发运行该代码的事件?或者实现类似的东西?

Achieves the required effect though. Is there any way to reassign the button on the standard toolbar to have it trigger an event that runs that code? Or something that achieves similar?

我想我可以做类似的事情

I was thinking I could do something like

AT USER-COMMAND.
    CASE sy-ucomm.
        WHEN 'pgdn'.
            SCROLL LIST FORWARD 1 PAGES INDEX 0.
     ENDCASE.

但我还没能让它工作.

推荐答案

我认为您必须创建一个 GUI 状态.像这样:

I think you have to create a GUI status. Like this:

然后设置 GUI 状态并编写命令:

Then you set the GUI Status and program the commands:

report  zscroll.

data lines type i.

start-of-selection.
set pf-status 'ZSCROLL_GUI'. " Set GUI status

while lines <= 100. " Print sample data
  write / lines.
  add 1 to lines.
endwhile.

at user-command. " Your code here
    case sy-ucomm.
        when 'EXIT'.
          leave screen.
        when 'PGDN'.
          "Your code
        when 'PGUP'.
          "Your code
     endcase.

结果是这样的:

最后,您单击菜单或工具栏中的按钮,您将看到AT USER-COMMAND"事件正在运行:

Finally you click a button from menu or tool bar and you will see the event 'AT USER-COMMAND' working:

希望能帮到你

这篇关于SAP经典输出报告重新分配标准工具栏按钮/向下滚动页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆