关闭

Parameter 的示例

标签: radiobuttonparametersstructurestringincludefunction
206人阅读 评论(0) 收藏 举报
分类:

PARAMETERS: NAME(8),
      AGE TYPE I,
      BIRTH TYPE D,
      TAX AS CHECKBOX default 'X',
      tax2 as checkbox,
      boy radiobutton group sex default 'X',
      girl radiobutton group sex.

tables ztabczw1.
SELECT-OPTIONS SysID FOR ztabczw1-sysid.
MOVE: 'I' to SysID-sign,  "I: 表筛选条件符合的资料 , E: 表筛选条件不符合的资料
'BT' TO SysID-OPTION,    "EQ(等于),NE(不等于),GT(大于),LE(小于),CP(包含),NP(不包含)
'1' TO SysID-LOW,    "最小值
'4' TO SysID-HIGH.   "最大值
APPEND SysID.

*MOVE: 'I' to SysID-sign,
*'EQ' TO SysID-OPTION,
*'1' TO SysID-LOW.
*APPEND SysID.
SELECTION-SCREEN skip 1.

SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: UserName FOR ztabczw1-username no intervals.
SELECTION-SCREEN COMMENT /1(30) Commstr for field UserName.
SELECTION-SCREEN END OF BLOCK 1.

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(10) InputNa.
SELECTION-SCREEN POSITION 15.
PARAMETERS NAMEs(10).
SELECTION-SCREEN COMMENT 30(10) InputBir.
SELECTION-SCREEN POSITION 50.
PARAMETERS BIRTHs TYPE D.
SELECTION-SCREEN END OF LINE.

INITIALIZATION.  "初始化事件
Commstr = 'Pls enter your name'.
InputNa = 'InputName'.
InputBir = 'InputBirthday'.
SET TITLEBAR 'COLLILABEL'.

AT SELECTION-SCREEN.  "进行用户输入数据的合法性检

start-of-selection. "单击 执行 按钮触发此事件
write: / name, AGE, BIRTH, 'tax=',TAX, 'tax2=',tax2,'boy=', boy, 'girl=',girl.
if TAX = 'X'.
  write / 'chuzhoawei'.
endif.

if tax2 = ''.
  write / 'I''M IS null'.
endif.

SELECT * FROM ztabczw1 WHERE Sysid IN SysID.
  WRITE: / ztabczw1-sysid, ztabczw1-username, ztabczw1-age, ztabczw1-birthdate.
ENDSELECT.

write / sy-ucomm.

*选择结束事件,通常在此事件中进行结果清单的输出
END-OF-SELECTION.
write / 'end of selection'.
write / SY-MANDT.

DATA: TEXT(20),
      LEN TYPE I.
TEXT = 'ABCDEFGHIJ'.
CALL function 'STRING_LENGTH'
EXPORTING STRING = TEXT
IMPORTING LENGTH = LEN.
WRITE / LEN.

skip.
DATA:       BEGIN OF USR_TABL OCCURS 0.
                INCLUDE STRUCTURE UINFO.
DATA:       END OF USR_TABL.
data L_OPCODE TYPE X.
L_OPCODE = 2.
CALL 'ThUsrInfo' ID 'OPCODE' FIELD L_OPCODE
    ID 'TAB' FIELD USR_TABL-*SYS*.
write: / 'L_OPCODE=', L_OPCODE.

LOOP AT USR_TABL.
  write: / USR_TABL-BNAME, USR_TABL-TCODE.
endloop.

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:12506次
    • 积分:267
    • 等级:
    • 排名:千里之外
    • 原创:14篇
    • 转载:3篇
    • 译文:0篇
    • 评论:2条
    文章分类
    文章存档
    最新评论
    SAP BLOGER