SAP Select Screen 代码的实现

report  ztest131 message-id zmsg line-size 136 line-count 33
no standard page heading.

tables: ekko,mkpf.

define screen_hide_po.
  loop at screen.
    if screen-group1 'PO'.
      screen-active 0.
      screen-input 1.
      screen-output 0.
      screen-invisible 0.
      modify screen.
    endif.
  endloop.
end-of-definition.
define screen_show_po.
  loop at screen.
    if screen-group1 'PO'.
      screen-active 1.
      screen-input 1.
      screen-output 1.
      screen-invisible 0.
      modify screen.
    endif.
  endloop.
end-of-definition.

selection-screen begin of block 001 with frame title text-001.
selection-screen begin of line.
selection-screen position 10.
parameters:
p_po radiobutton group rad1 user-command p_po default 'X'.
selection-screen comment 13(18text-002 for field p_po .
selection-screen position 37.
parameters:
p_mr radiobutton group rad1.
selection-screen comment 40(18stext-03 for field p_mr.
selection-screen end of line.
selection-screen end of block 001 .

at selection-screen output.

  case sy-langu.
    when 'M'.
    when 'E'.
* sTEXT-02 = 'MRP Orders'.
      stext-03 'PO Orders'.
    when '1'.
* sTEXT-02 = '生产'.
      stext-03 '采购'.
    when others.
* sTEXT-02 = '生产'.
      stext-03 '采购'.
  endcase.

*屏幕控制
  perform screen_control.
** 对选屏进行权限检查
* PERFORM AUTHORITY_CHECK. " 权限校验

*&---------------------------------------------------------------------*
*& Form SCREEN_CONTROL
*&---------------------------------------------------------------------*
* 屏幕控制
*----------------------------------------------------------------------*
form screen_control .
  if p_po 'X'.
    screen_show_po.
  else.
    screen_hide_po.
  endif.
endform. " SCREEN_CONTROL

*查询对象
selection-screen begin of block 002 with frame title text-004.
select-options:
s_ebeln for ekko-ebeln modif id po no-extension no intervals, "采购订单号
s_budat for mkpf-budat modif id po, "入库时间
s_mblnr for mkpf-mblnr no-extension no intervals , "物料凭证号
s_mjahr for mkpf-mjahr no-extension no intervals. "会计年度
selection-screen end of block 002 .
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值