SAP Database

ABAP Programs: Tabular Lists

Print This Post Email This Post Written by admin on Jan 15th, 2008 | Filed under: ABAP Programs

REPORT ZSOURCE1706 NO STANDARD PAGE HEADING.
CONSTANTS MY_LINE_SIZE TYPE I VALUE 40.
DATA SQUARE TYPE I.
NEW-PAGE LINE-SIZE MY_LINE_SIZE.
ULINE.
FORMAT COLOR COL_HEADING.
WRITE: / SY-VLINE,
‘Numbers and their squares’,
AT MY_LINE_SIZE SY-VLINE.
FORMAT COLOR OFF.
ULINE.

DO 20 TIMES.
SQUARE = SY-INDEX ** 2.
WRITE: / SY-VLINE,
SY-INDEX COLOR COL_KEY,
SY-VLINE,
SQUARE,
AT MY_LINE_SIZE SY-VLINE.
ENDDO.
ULINE.

If you like this post, you may as well like these too:

  1. ABAP Programs: Using colors REPORT ZSOURCE0807. * Display the header using an appropriate color (grayish blue)WRITE ‘Header’ COLOR COL_HEADING. * Switch the standard colorFORMAT COLOR COL_TOTAL. * Make the color less brightWRITE /...
  2. ABAP Programs: Customizing pages * suppress the standard header of a pageREPORT ZSOURCE0802 NO STANDARD PAGE HEADING.. * Define a counter for the output pageDATA COUNTER(9) TYPE N. * Start a new page...
  3. ABAP Programs: Internal flow of control (if, case, do, while) REPORT ZSOURCE0902. * Declarations for later useTABLES CUSTOMERS.DATA: COLOR(10) VALUE ‘yellow’, N(4) TYPE N VALUE ‘123′, P TYPE P, C4(4) VALUE ‘124′, C5(5) VALUE ‘00124′, SQUARE_NUMBER TYPE I, X...
  4. ABAP Programs: Converting number fields * Using numeric texts and packed numbersDATA: NO_EMPLOYEES(4) TYPE N, NO_ROOMS TYPE P, EMPLOYEES_PER_ROOM TYPE P DECIMALS 2.EMPLOYEES_PER_ROOM = NO_EMPLOYEES / NO_ROOMS. * Rounding with integers and packed numbersDATA:...
  5. ABAP Programs: Simple examples of field conversion REPORT ZSOURCE0702. * Converting to numbers during computationsDATA: NUMBER_1(4) VALUE ‘1771′, NUMBER_2(3), RESULT TYPE I. NUMBER_2 = ‘005′.RESULT = NUMBER_1 + NUMBER_2.WRITE / RESULT. NUMBER_2 = ‘ 5′.RESULT =...



Leave a Reply

  • Help Support CRY