首页 > 其他分享 >ABAP屏幕控制

ABAP屏幕控制

时间:2023-05-15 13:56:45浏览次数:31  
标签:控制 SY &---------------------------------------------------------------------

下拉框 

*&---------------------------------------------------------------------*
*&      Form  P_SET_SELECTION
*&---------------------------------------------------------------------*
*       设置移动类型搜索帮助
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM P_SET_SELECTION .
  TYPES :BEGIN OF TY,
   COL1 TYPE CHAR3 ,
   COL2  TYPE CHAR20 ,
  END OF TY.
  DATA ITAB TYPE TABLE OF TY.
  ITAB = VALUE #(
                  ( COL1 = 'Z09' COL2 = '成本中心领用')
                  ( COL1 = 'Z11' COL2 = '线边退料')
                  ( COL1 = 'Z13' COL2 = '成品工废、料废订单消耗领用')
                  ( COL1 = 'Z15' COL2 = '成品返工领用')
                  ( COL1 = 'Z16' COL2 = '项目领用')
                  ( COL1 = 'Z18' COL2 = '废品消耗领用' )
                  ( COL1 = 'S61' COL2 = '备件消耗领用' ) ).


CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
  EXPORTING
*   DDIC_STRUCTURE         = ' '
    RETFIELD               = 'COL1'
*   PVALKEY                = ' '
   DYNPPROG               = SY-REPID
   DYNPNR                 = SY-DYNNR
   DYNPROFIELD            = 'COL1'
*   STEPL                  = 0
   WINDOW_TITLE           = 'WINDOW--TITLE'
*   VALUE                  = ''
   VALUE_ORG              = 'S'"C表示cell,S表示structure
*   MULTIPLE_CHOICE        = 'X'"多项选择,用于SELECT-OPTIONS
*   DISPLAY                = 'F'"C则只能显示,不能选择
   CALLBACK_PROGRAM       = sy-repid
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
* IMPORTING
*   USER_RESET             =
  TABLES
    VALUE_TAB              = ITAB
*   FIELD_TAB              = FIELD_TAB
*   RETURN_TAB             =
*   DYNPFLD_MAPPING        =
 EXCEPTIONS
   PARAMETER_ERROR        = 1
   NO_VALUES_FOUND        = 2
   OTHERS                 = 3
          .
IF SY-SUBRC <> 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
————————————————
版权声明:本文为CSDN博主「踩沙滩」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/yang362046076/article/details/52785140

 

标签:控制,SY,&---------------------------------------------------------------------
From: https://www.cnblogs.com/Anyohh233/p/17401646.html

相关文章