+ -

Pages

Saturday, July 26, 2014

Positioned Write in Report

WRITE UNDER

Syntax: WRITE <f> under <g>

Field f is outputted under field <g>

Example:


WRITE AT 10 text-001.
WRITE AT 20 text-002.
new-line.

LOOP AT gi_rapport into g_rapport.

  WRITE g_rapport-field1 under text-001.
  WRITE g_rapport-field2 under text-002.
ENDLOOP.

RESERVE...BACK

The rapport should look like this:

2030  John Dowe     This is
      Myroad 12     a text
      Mytown        for
                    John Dowe

LOOP AT mytable.
  RESERVE 10 LINES.
  WRITE: / '2030'.

  WRITE: / 'John Dowe'.
  WRITE: / 'Myroad 12'.
  WRITE: / 'Mytown'.

* Go back to the top   
  BACK.  

  WRITE: / 'This is'.
  WRITE: / 'a text'.
  WRITE: / 'for'.
  WRITE: / 'John Dowe'.

ENDLOOP.

Note: That you have to fill up with empty rows in the last column untill there is
      at least as many rows as in column 2 
      

Horizontal and vertical positioning


Horizontal position: POSITION <col>

col = Column no. Retrieve curretn column number witj SY-COLNO

Vertical positioning:

SKIP TO LINE <n>

Retrieve the current linenumber with SY-LINNO


Example:

SKIP TO LINE 10.
POSITION 20.
WRITE 'Test'
5 ABAP Tips: Positioned Write in Report WRITE UNDER Syntax: WRITE <f> under <g> Field f is outputted under field <g> Example: WRITE AT 10 text-001. WRITE AT...

No comments:

Post a Comment

< >