zoukankan      html  css  js  c++  java
  • ABAP WRITE

    1、空行

    WRITE /.

    2、AS CHECKBOX

    DATA: check1 TYPE c LENGTH 1 VALUE 'X', 
          check2 TYPE c LENGTH 1 VALUE ' '. 
    
    START-OF-SELECTION. 
      WRITE: / check1 AS CHECKBOX, 'Checkbox 1', 
             / check2 AS CHECKBOX, 'Checkbox 2'. 
    
    AT LINE-SELECTION. 
      READ: LINE 1 FIELD VALUE check1, 
            LINE 2 FIELD VALUE check2. 

    3、AS ICON

    WRITE / icon_green_light AS ICON.
    WRITE / icon_green_light.
    WRITE: / '@09@'. "id
    WRITE: / icon_yellow_light. "name
    WRITE: / '@S_TL_Y@'. "内部名称

    4、AS SYMBOL  //SHOWSYMB

    WRITE / sym_left_hand AS SYMBOL.

    附录:SYMB

    TYPE-POOL SYM .
    INCLUDE >SYMBOL<.
    
    * !!! Keep this in sync with CL_ABAP_LIST_SYMBOLS !!!
    
    ***              Definition of List Symbols                          ***
    
    *SYM_length                    ASCII_Code                  Print   ASCII
    *     Name of symbol                 Comment                      Screen
    
    SYM_1 SYM_SPACE              ' ' ."  SPACE                            32
    SYM_1 SYM_PLUS_BOX           '!' ."  box with plus inside      +   +  33
    SYM_1 SYM_MINUS_BOX          '"' ."  box with minus inside     -   -  34
    SYM_1 SYM_PLUS_CIRCLE        '#' ."  circle with plus inside   +   +  35
    SYM_1 SYM_MINUS_CIRCLE       '$' ."  circle with minus inside  -   -  36
    SYM_1 SYM_FILLED_SQUARE      '%' ."  filled square             *   *  37
    SYM_1 SYM_HALF_FILLED_SQUARE '&' ."  half-filled square        c   c  38
    SYM_1 SYM_SQUARE            '''' ."  empty square              o   o  39
    SYM_1 SYM_FILLED_CIRCLE      '(' ."  filled circle             *   *  40
    SYM_1 SYM_HALF_FILLED_CIRCLE ')' ."  half-filled circle        c   c  41
    SYM_1 SYM_CIRCLE             '*' ."  empty circle              o   o  42
    SYM_1 SYM_FILLED_DIAMOND     '+' ."  filled diamond            #   #  43
    SYM_1 SYM_DIAMOND            ',' ."  empty diamond             #   #  44
    * * *  Do not use ASCII-CODE   45 here (is reserved for list-processor)!
    SYM_1 SYM_BOLD_X             '.' ."  diagonal cross (cancel)   X   X  46
    SYM_2 SYM_NOTE               '/ '."  word balloon, note        Q  (}  47
    SYM_1 SYM_DOCUMENT           '0' ."  document                  D   D  48
    SYM_1 SYM_CHECKED_DOCUMENT   '1' ."  document with checkmark   D   D  49
    SYM_2 SYM_DOCUMENTS          '2 '."  double documents          D  DD  50
    SYM_2 SYM_FOLDER             '3 '."  folder                    [  [  51
    SYM_2 SYM_PLUS_FOLDER        '4 '."  folder with plus inside   +  [+  52
    SYM_2 SYM_MINUS_FOLDER       '5 '."  folder with minus inside  -  [-  53
    SYM_2 SYM_OPEN_FOLDER        '6 '."  open folder               V  /  54
    SYM_1 SYM_BOLD_MINUS         '7' ."  bold minus sign           -   -  55
    SYM_1 SYM_BOLD_PLUS          '8' ."  bold plus sign            +   +  56
    SYM_2 SYM_CHECKBOX           '9 '."  selected checkbox         x  [x  57
    SYM_2 SYM_RADIOBUTTON        ': '."  selected radiobutton      O  (o  58
    SYM_1 SYM_LEFT_TRIANGLE      ';' ."  triangle pointing left    <   <  59
    SYM_1 SYM_RIGHT_TRIANGLE     '<' ."  triangle pointing right   >   >  60
    SYM_1 SYM_UP_TRIANGLE        '=' ."  triangle pointing up      ^   ^  61
    SYM_1 SYM_DOWN_TRIANGLE      '>' ."  triangle pointing down    v   v  62
    SYM_2 SYM_LEFT_HAND          '? '."  hand pointing left        <  <=  63
    * * *  Do not use ASCII-CODE   64 here (is reserved for list-processor)!
    SYM_1 SYM_LEFT_ARROW         'A' ."  left arrow                <   <  65
    SYM_1 SYM_RIGHT_ARROW        'B' ."  right arrow               >   >  66
    SYM_1 SYM_UP_ARROW           'C' ."  up arrow                  ^   ^  67
    SYM_1 SYM_DOWN_ARROW         'D' ."  down arrow                v   v  68
    SYM_1 SYM_CHECK_MARK         'E' ."  check mark                x   x  69
    SYM_1 SYM_PENCIL             'F' ."  pencil                    /   /  70
    SYM_2 SYM_GLASSES            'G '."  glasses                   %  oo  71
    SYM_1 SYM_LOCKED             'H' ."  closed padlock            O   O  72
    SYM_1 SYM_UNLOCKED           'I' ."  open padlock              C   C  73
    SYM_2 SYM_PHONE              'J '."  telephone                 T  (T  74
    SYM_2 SYM_PRINTER            'K '."  printer                   P  (P  75
    SYM_2 SYM_FAX                'L '."  fax machine               F  (F  76
    SYM_1 SYM_ASTERISK           'M' ."  asterisk, *               *   *  77
    SYM_2 SYM_RIGHT_HAND         'N '."  hand pointing right       >  =>  78
    SYM_2 SYM_SORTED_UP          'O '."  sorted ascending            |  79
    SYM_2 SYM_SORTED_DOWN        'P '."  sorted descending         /  |/  80
    SYM_2 SYM_CUMULATED          'Q '."  cumulated                 S      81
    SYM_1 SYM_DELETE             'R' ."  delete mark               D      82
    SYM_2 SYM_EXECUTABLE         'S '."  executable                X      83
    SYM_2 SYM_WORKFLOW_ITEM      'T '."  workflow-object           W      84
    SYM_2 SYM_CAUTION            'U '."  caution                   !      85
    SYM_1 SYM_FLASH              'V' ."  express, urgent           Z      86
    SYM_2 SYM_LARGE_SQUARE       'W '."  large empty square        [  []  87
    SYM_1 SYM_ELLIPSIS           'X'. "  ellipsis (...)            >   >  88
    * * *  Do not use ASCII-CODE  124 here (is reserved for list-processor)!

    5、AS LINE

    Constant Meaning
    line_space Blank
    line_top_left_corner Top left corner
    line_bottom_left_corner Bottom left corner
    line_top_right_corner Top right corner
    line_bottom_right_corner Bottom right corner
    line_horizontal_line Horizontal line
    line_vertical_line Vertical line
    line_left_middle_corner T section turned to the left
    line_right_middle_corner T section turned to the right
    line_bottom_middle_corner Reversed T section
    line_top_middle_corner T section
    line_cross Cross
    WRITE: /10 line_top_left_corner      AS LINE NO-GAP,
               line_top_middle_corner    AS LINE NO-GAP,
               line_top_right_corner     AS LINE.
    write: /10 line_left_middle_corner   AS LINE NO-GAP,
               line_cross                AS LINE NO-GAP,
               line_right_middle_corner  AS LINE.
    write: /10 line_bottom_left_corner   AS LINE NO-GAP,
               line_bottom_middle_corner AS LINE NO-GAP,
               line_bottom_right_corner  AS LINE.

     6、

    WRITE - ext_format_options
    Syntax
    ... [COLOR       {[=]{color [ON]}|OFF}|{= col}]
        [INTENSIFIED [{ON|OFF}|{= flag}]]
        [INVERSE     [{ON|OFF}|{= flag}]]
        [HOTSPOT     [{ON|OFF}|{= flag}]]
        [INPUT       [{ON|OFF}|{= flag}]]
        [FRAMES      [{ON|OFF}|{= flag}]]
        [RESET] ...

    DATA sum TYPE i.
    
    FORMAT COLOR COL_NORMAL.
    
    DO 10 TIMES.
      WRITE / sy-index.
      sum = sum + sy-index.
      WRITE sum COLOR COL_TOTAL.
    ENDDO.
    ULINE.
    WRITE sum UNDER sum COLOR COL_GROUP.
  • 相关阅读:
    UVA 1386 Cellular Automaton
    ZOJ 3331 Process the Tasks
    CodeForces 650B Image Preview
    CodeForces 650A Watchmen
    CodeForces 651B Beautiful Paintings
    CodeForces 651A Joysticks
    HUST 1601 Shepherd
    HUST 1602 Substring
    HUST 1600 Lucky Numbers
    POJ 3991 Seinfeld
  • 原文地址:https://www.cnblogs.com/miaosj/p/10383442.html
Copyright © 2011-2022 走看看