Leave List-Processing 新解

来源:互联网 发布:淘宝如何避免同款 编辑:程序博客网 时间:2024/05/22 17:13
 
report  ztest_list_processor no standard page heading.
* Data
data: ls_spfli type spfli.
parameters: p_name type char20 default 'ENTRY1'.
initialization.
  clear: ls_spfli.
top-of-page."当有write语句时,top-of-page才会被执行
  write:  ' Carrid', 20 'Connid' ,50 'Cityto'.
at selection-screen output.
  write:/ 'at selection-screen output.'. "在这里输出没用
at selection-screen.
  write:/ 'at selection-screen.'. "在这里输出没用
  if p_name = 'ENTRY1'.
    message 'Pass entry1!' type 'S'.
    set pf-status space. " 设置 Gui_status,很有用
    leave to list-processing. "从Program-processor将control传递给list-processor,马上回到输出界面
  endif.
start-of-selection.
  if p_name = 'ENTRY2'.
    message  'Can not Pass entry2!' type 'S'.
    leave list-processing. "从list-processor将control传递给Program-processor,马上回到initialization事件
  endif.
*---Get and output data
  "如果control 在list-processor,当点返回按钮时,会退出当时屏幕,也就会退出list-processor,control又回到program-processor
  select carrid
         connid
         cityto
    into corresponding fields of ls_spfli
    from spfli.
    write:/ ls_spfli-carrid,
            ls_spfli-connid,
            ls_spfli-cityto.
  endselect.
end-of-selection.
  write:/ 'end-of-selection.'.