首页 > 其他分享 >abap-屏幕选择

abap-屏幕选择

时间:2023-03-28 22:33:47浏览次数:37  
标签:SELECTION char1 TYPE SCREEN 选择 abap MODIF 屏幕 PARAMETER

REPORT zparmeters1.
TYPE-POOLS:slis.
TABLES vbak.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETER p1 TYPE char1 AS CHECKBOX USER-COMMAND flag.
PARAMETER p2 TYPE char10.
PARAMETER p3 TYPE char1 RADIOBUTTON GROUP g1 MODIF ID f1.
PARAMETER p4 TYPE char1 RADIOBUTTON GROUP g1 MODIF ID f1.
PARAMETER p5 TYPE char1 RADIOBUTTON GROUP g1 MODIF ID f1.
PARAMETER p6 TYPE char1 RADIOBUTTON GROUP g2 MODIF ID f1.
PARAMETER p7 TYPE char1 RADIOBUTTON GROUP g2 MODIF ID f1.
SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
PARAMETER p8 TYPE string VISIBLE LENGTH 20.
PARAMETER p9 TYPE char5 AS LISTBOX VISIBLE LENGTH 10.
PARAMETER p10 TYPE char12 MATCHCODE OBJECT  user_comp.
SELECT-OPTIONS p11 FOR vbak-vbeln NO INTERVALS DEFAULT 10 TO 20.
SELECTION-SCREEN END OF BLOCK b2.




*屏幕初始值
INITIALIZATION.



*界面显示后的事件
AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.

    IF p1 = ''.
      IF screen-group1 = 'F1'.
        screen-active = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDIF.

  ENDLOOP.


START-OF-SELECTION.

  PERFORM getdata.
*&---------------------------------------------------------------------*
*&      Form  GETDATA
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM getdata .




DATA tables TYPE TABLE OF ztcategory.     "数据字典分类表
DATA layout TYPE slis_layout_alv.         "Layout布局对象
DATA wa TYPE slis_fieldcat_alv.           "字段对象
DATA list TYPE TABLE OF slis_fieldcat_alv."字段集合

SELECT *
  INTO CORRESPONDING FIELDS OF TABLE tables
    FROM ztcategory

   ORDER BY zeid ASCENDING.


wa-key = 'x'."是否是主键
wa-fieldname = 'ZEID'."编号
wa-ref_fieldname = 'ZEID'. "参考字段编号
wa-ref_tabname = 'ZTCATEGORY'. "参考数据表
wa-seltext_m = '编号'.
wa-just = 'C'.
APPEND wa TO list.
CLEAR wa.

wa-fieldname = 'ZECREATEDATE'."创建日期
wa-ref_fieldname = 'ZECREATEDATE'. "参考字段
wa-ref_tabname = 'ZTCATEGORY'. "参考数据表
wa-seltext_m = '创建日期'.
APPEND wa TO list.

wa-fieldname = 'ZECREATETIME'."创建时间
wa-ref_fieldname = 'ZECREATETIME'.
wa-ref_tabname = 'ZTCATEGORY'.
wa-seltext_m = '创建时间'.
APPEND wa TO list.

wa-fieldname = 'ZECODE'.
wa-ref_fieldname = 'ZECODE'.
wa-ref_tabname = 'ZTCATEGORY'.
wa-seltext_m = '状态码'.
wa-just = 'C'.
APPEND wa TO list.


wa-fieldname = 'ZECATNAME'.
wa-ref_fieldname = 'ZECATNAME'.
wa-ref_tabname = 'ZTCATEGORY'.
wa-seltext_m = '分类名称'.
wa-just = 'L'.
APPEND wa TO list.

wa-fieldname = 'ZESORT'.
wa-ref_fieldname = 'ZESORT'.
wa-ref_tabname = 'ZTCATEGORY'.
wa-seltext_m = '数字排序'.
wa-just = 'C'.
APPEND wa TO list.

wa-fieldname = 'ZESTATUS'.
wa-ref_fieldname = 'ZESTATUS'.
wa-ref_tabname = 'ZTCATEGORY'.
wa-seltext_m = '当前状态'.
wa-just = 'L'.
APPEND wa TO list.

wa-fieldname = 'ZEREMARK'.
wa-ref_fieldname = 'ZEREMARK'.
wa-ref_tabname = 'ZTCATEGORY'.
wa-seltext_m = '描述说明'.
wa-just = 'L'.
APPEND wa TO list.

wa-fieldname = 'ZECONTENT'.
wa-ref_fieldname = 'ZECONTENT'.
wa-ref_tabname = 'ZTCATEGORY'.
wa-seltext_m = '状态描述'.
wa-just = 'L'.
APPEND wa TO list.



*===================================================================


layout-zebra = 'X'.
layout-colwidth_optimize = 'X'.
layout-detail_popup = 'X'.
layout-colwidth_optimize = 'X'.
layout-detail_titlebar = '客户状态分类详细'.
layout-f2code = '&ETA'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
 EXPORTING
*   I_INTERFACE_CHECK                 = ' '
*   I_BYPASSING_BUFFER                = ' '
*   I_BUFFER_ACTIVE                   = ' '
   I_CALLBACK_PROGRAM                = sy-repid
*   I_CALLBACK_PF_STATUS_SET          = ' '
*   I_CALLBACK_USER_COMMAND           = ' '
*   I_CALLBACK_TOP_OF_PAGE            = ' '
*   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
*   I_CALLBACK_HTML_END_OF_LIST       = ' '
*   I_STRUCTURE_NAME                  =
*   I_BACKGROUND_ID                   = ' '
*   I_GRID_TITLE                      =
*   I_GRID_SETTINGS                   =
   IS_LAYOUT                         = layout
   IT_FIELDCAT                       = list
*   IT_EXCLUDING                      =
*   IT_SPECIAL_GROUPS                 =
*   IT_SORT                           =
*   IT_FILTER                         =
*   IS_SEL_HIDE                       =
*   I_DEFAULT                         = 'X'
*   I_SAVE                            = ' '
*   IS_VARIANT                        =
*   IT_EVENTS                         =
*   IT_EVENT_EXIT                     =
*   IS_PRINT                          =
*   IS_REPREP_ID                      =
*   I_SCREEN_START_COLUMN             = 0
*   I_SCREEN_START_LINE               = 0
*   I_SCREEN_END_COLUMN               = 0
*   I_SCREEN_END_LINE                 = 0
*   I_HTML_HEIGHT_TOP                 = 0
*   I_HTML_HEIGHT_END                 = 0
*   IT_ALV_GRAPHICS                   =
*   IT_HYPERLINK                      =
*   IT_ADD_FIELDCAT                   =
*   IT_EXCEPT_QINFO                   =
*   IR_SALV_FULLSCREEN_ADAPTER        =
* IMPORTING
*   E_EXIT_CAUSED_BY_CALLER           =
*   ES_EXIT_CAUSED_BY_USER            =
  TABLES
    t_outtab                          = tables
* EXCEPTIONS
*   PROGRAM_ERROR                     = 1
*   OTHERS                            = 2
          .
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.





ENDFORM.                    " GETDATA

 

标签:SELECTION,char1,TYPE,SCREEN,选择,abap,MODIF,屏幕,PARAMETER
From: https://www.cnblogs.com/hua900822/p/17267029.html

相关文章

  • 游戏运营商如何选择游戏服务器?
    游戏对服务器的性能需求选择:1.服务器需要具备高性能、高弹性一款游戏一般在上线初期就进入高峰期,在线的玩家数量众多,需要快速读写大量信息,数据并发量大,交互高,需要大量高配......
  • PrimeFaces主题选择器
    PrimeFaces主题选择器作者:chszsPrimeFaces集成了ThemeRollerCSS框架,而且预置了37种主题样式。可以使用在线的ThemeRoller主题产生器工具生成自定义的主题。应用一个主题到P......
  • 选择排序
    欢迎关注fish的公众号:fish码农成长之旅相信大家对扑克牌并不陌生,当我们在齐牌的时候是不是会按照大小顺序进行排列,选择排序的过程就跟扑克牌差不多一样的直观简单。其......
  • 又发现一个开源商城项目,谷粒商城外又多了个选择
    官网地址:https://magestack.cn刚果商城是个从零到一的C端商城项目,包含商城核心业务和基础架构两大模块。参照商城系统原型,推出用户、消息、商品、订单、优惠券、支付、......
  • CSS之伪类选择器,属性选择器
    一.结构伪类选择器伪类选择器一般的格式是使用冒号来表示  :一般其它的伪类选择器很少使用,但是a标签的个性化都是使用的伪类选择器来个性化,所以对于a标签的个性化需要......
  • extjs4 grid获取选择行的数据
    班门弄斧而已,说的不对,大家见谅。上次是获取点击tree的一个节点,获取节点的数据。现在是grid点击一行或者是选中一行,获取该行的数据,在api中看到其实是一行的。//已经获......
  • ABAP READ内表新老语法对比
    1、读取内表行新语法740新语法中,对标READ,提出了新的语法,如下:1.1、根据字段值查找"-----------------------------@斌将军-----------------------------"老语法READ......
  • 怎么选择选择论坛服务器的配置
    怎么选择选择论坛服务器的配置流量预估:首先要考虑的是论坛的流量预估。如果预计论坛流量会非常大,那么需要选择高性能的服务器,以确保论坛能够处理大量的用户请求,并且保证访......
  • 是时候选择一款富文本编辑器了(wangEditor)
    需要一款富文本编辑器,当然不能自己造轮子。本来想使用cnblog也在用的TinyMCE,名气大,功能全。但是发现TinyMCE从4.0开始,不再支持直接下载。所以还是决定选用wangEdit......
  • 《少数派报告》中的隔空3D操控方式从屏幕走入现实【视频】
    在这个项目小组发布的一个超酷视频中,他们可以用手套创建3D的物体,并可随意的移动它们,或是改变它们的形状,而更酷的是其他人可以让用同样的设备人加入到这个三维空间中,并一同......