ITPub博客

首页 > 数字化转型 > ERP > SAP Select Screen 的实现代码

SAP Select Screen 的实现代码

原创 ERP 作者:gavin 时间:2019-05-25 22:36:06 0 删除 编辑

*&---------------------------------------------------------------------*
*& Report ZREPORT2
*&
*&---------------------------------------------------------------------*
*& Gavin, 2008.09.13 Initial
*&
*&---------------------------------------------------------------------*

REPORT ZREPORT2.

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(18) TEXT-002 FOR FIELD P_PO .
SELECTION-SCREEN POSITION 37.
PARAMETERS:
P_MR RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN COMMENT 40(18) sTEXT-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 .

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/20037923/viewspace-1013256/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 移动类型
请登录后发表评论 登录
全部评论

注册时间:2003-01-05

  • 博文量
    109
  • 访问量
    81212