考试1
Posted salah
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了考试1相关的知识,希望对你有一定的参考价值。
OP-OF-PAGE.
WRITE: / ‘考试页-页眉‘.
END-OF-PAGE.
WRITE: / ‘考试页-页脚‘.
START-OF-SELECTION.
FORMAT COLOR = 6.
WRITE:AT /1(30) SY-ULINE.
WRITE:AT /1(1) SY-VLINE.
WRITE: AT 2(28) ‘考试‘ INVERSE ON CENTERED.
WRITE:AT 30(1) SY-VLINE.
WRITE:AT /1(30) SY-ULINE.
FORMAT COLOR OFF.
TYPES:BEGIN OF TYP_TAB,
NAME TYPE CHAR20,
SEX TYPE CHAR4,
ASS TYPE P DECIMALS 2,
END OF TYP_TAB.
DATA GT_TAB TYPE TABLE OF TYP_TAB .
DATA GS_TAB TYPE TYP_TAB.
GS_TAB-NAME = ‘张三‘.
GS_TAB-SEX = ‘男‘.
GS_TAB-ASS = ‘20000‘.
APPEND GS_TAB TO GT_TAB.
GS_TAB-NAME = ‘李四‘.
GS_TAB-SEX = ‘男‘.
GS_TAB-ASS = ‘30000‘.
APPEND GS_TAB TO GT_TAB.
GS_TAB-NAME = ‘王五‘.
GS_TAB-SEX = ‘女‘.
GS_TAB-ASS = ‘50000‘.
APPEND GS_TAB TO GT_TAB.
GS_TAB-NAME = ‘张三‘.
GS_TAB-SEX = ‘男‘.
GS_TAB-ASS = ‘20000‘.
INSERT GS_TAB INTO TABLE GT_TAB.
GS_TAB-NAME = ‘李四‘.
GS_TAB-SEX = ‘男‘.
GS_TAB-ASS = ‘30000‘.
INSERT GS_TAB INTO TABLE GT_TAB.
GS_TAB-NAME = ‘王五‘.
GS_TAB-SEX = ‘女‘.
GS_TAB-ASS = ‘50000‘.
INSERT GS_TAB INTO TABLE GT_TAB.
LOOP AT GT_TAB INTO GS_TAB.
IF SY-TABIX = 1.
WRITE :AT /1(34) SY-ULINE.
WRITE: AT /1(1) SY-VLINE.
WRITE: AT 2(10) ‘姓名‘CENTERED.
WRITE: AT 12(1) SY-VLINE.
WRITE:AT 13(10) ‘性别‘CENTERED.
WRITE:AT 23(