码迷,mamicode.com
首页 > 其他好文 > 详细

多样式的用户交互对话框

时间:2017-09-24 16:15:54      阅读:171      评论:0      收藏:0      [点我收藏+]

标签:frame   cti   star   bsp   confirm   cancel   表数   dial   screen   

*POPUP_TO_CONFIRM_LOSS_OF_DATA:显示YES/NO的弹出窗口,提示用户未保存的数据将丢失
*POPUP_TO_CONFIRM_STEP:提示是否确认操作要弹出窗口
*POPUP_TO_CONFIRM_WITH_MESSAGE:可以显示定制的提示消息的确认窗口
*POPUP_TO_CONFIRM_WITH_VALUE:显示确认用户对某个特定对象操作的弹出窗口
*POPUP_TO_DECIDE:将待确认选项以单选按钮的方式显示的弹出窗口
*POPUP_TO_DECIDE_WITH_MESSAGE:带消息的确认窗口
*POPUP_TO_DISPLAY_TEXT:显示多行信息的窗口
*POPUP_TO_SELECT_MONTH:月份选择窗口
*POPUP_WITH_TABLE_DISPLAY:表格对象的确认窗口

SELECTION-SCREEN:BEGIN OF BLOCK dialog WITH FRAME TITLE text-001.
PARAMETERS:p1 RADIOBUTTON GROUP grp1 DEFAULT ‘X‘,
           p2 RADIOBUTTON GROUP grp1,
           p3 RADIOBUTTON GROUP grp1,
           p4 RADIOBUTTON GROUP grp1,
           p5 RADIOBUTTON GROUP grp1,
           p6 RADIOBUTTON GROUP grp1,
           p7 RADIOBUTTON GROUP grp1,
           p8 RADIOBUTTON GROUP grp1,
           p9 RADIOBUTTON GROUP grp1.
SELECTION-SCREEN:END OF BLOCK dialog.

DATA:answer TYPE c."接受窗口单击按钮返回值。A = Cancel,1 = 按钮1,2 = 按钮2

AT SELECTION-SCREEN.
  IF p1 ‘X‘.
    CALL FUNCTION ‘POPUP_TO_CONFIRM_LOSS_OF_DATA‘
      EXPORTING
        textline1    ‘LINE1‘
        textline2    ‘LINE2 ‘
        titel        ‘POPUP_TO_CONFIRM_LOSS_OF_DATA‘
        start_column 25
        start_row    6
      IMPORTING
        answer       = answer.
  ENDIF.
  IF p2 ‘X‘.
    CALL FUNCTION ‘POPUP_TO_CONFIRM_STEP‘
      EXPORTING
        textline1      ‘LINE1‘
        textline2      ‘LINE1 ‘
        titel          ‘POPUP_TO_CONFIRM_STEP‘
        cancel_display ‘X‘
      IMPORTING
        answer         = answer.
  ENDIF.
  IF p3 ‘X‘.
    CALL FUNCTION ‘POPUP_TO_CONFIRM_WITH_MESSAGE‘
      EXPORTING
        diagnosetext1 ‘SETEXT1‘
        textline1     ‘LINE1‘
        titel         ‘POPUP_TO_CONFIRM_WITH_MESSAGE‘.
  ENDIF.
  IF p4 ‘X‘.
    CALL FUNCTION ‘POPUP_TO_CONFIRM_WITH_VALUE‘
      EXPORTING
        objectvalue ‘POPUP_TO_CONFIRM_WITH_VALUE‘
        text_before ‘POPUP_TO_CONFIRM_WITH_VALUE‘
        titel       ‘POPUP_TO_CONFIRM_WITH_VALUE‘.
  ENDIF.
  IF p5 ‘X‘.
    CALL FUNCTION ‘POPUP_TO_DECIDE‘
      EXPORTING
        textline1    ‘TEXTLINE1‘
        text_option1 ‘TEXT_OPTION1‘
        text_option2 ‘TEXT_OPTION2‘
        titel        ‘POPUP_TO_DECIDE‘.
  ENDIF.
  IF p6 ‘X‘.
    CALL FUNCTION ‘POPUP_TO_DECIDE_WITH_MESSAGE‘
      EXPORTING
        diagnosetext1 ‘DIAGNOSETEXT1‘
        textline1     ‘TEXTLINE1‘
        text_option1  ‘TEXT_OPTION1‘
        text_option2  ‘TEXT_OPTION2‘
        titel         ‘POPUP_TO_DECIDE_WITH_MESSAGE‘
      IMPORTING
        answer        = answer.
  ENDIF.
  IF p7 ‘X‘.
    CALL FUNCTION ‘POPUP_TO_DISPLAY_TEXT‘
      EXPORTING
        titel     ‘POPUP_TO_DISPLAY_TEXT ‘
        textline1 ‘TEXTLINE1‘.
  ENDIF.
  IF p8 ‘X‘.
    CALL FUNCTION ‘POPUP_TO_SELECT_MONTH‘
      EXPORTING
        actual_month ‘200907‘.
  ENDIF.
  IF p9 ‘X‘.
    DATA:BEGIN OF zlurl OCCURS 0,
         url LIKE scarr-url,
      END OF zlurl.
    DATA:res TYPE i.
    SELECT * INTO CORRESPONDING FIELDS OF TABLE zlurl FROM scarr.
**显示传递的内表数据,CHOISE为用户选择数据行数回执信息
    CALL FUNCTION ‘POPUP_WITH_TABLE_DISPLAY‘
      EXPORTING
        endpos_col   50
        endpos_row   10
        startpos_col 20
        startpos_row 1
        titletext    ‘POPUP_WITH_TABLE_DISPLAY‘
      IMPORTING
        choise       = res
      TABLES
        valuetab     = zlurl.
  ENDIF.

多样式的用户交互对话框

标签:frame   cti   star   bsp   confirm   cancel   表数   dial   screen   

原文地址:http://www.cnblogs.com/zxiu/p/7587242.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!