Ansicht
Dokumentation
Tip-No.: 1341 ( INFO1341 )
Problems with ABAP language element POSITION
Tip-No.: 1341
( INFO1341 )
TXBHW - Original Tax Base Amount in Local Currency
Addresses (Business Address Services)
This documentation is copyright by SAP AG.
Short text
Problems with ABAP language element POSITION
Tip-No.: 1341
Symptom
1. A POSITION specification before the first WRITE on a new page leads
to an undesired empty line when processing TOP-OF-PAGE.
Example:
a) WRITE 10 '1st field of a new page'.
...
TOP-OF-PAGE. WRITE: / 'Header':
results in: +----------------------------------------------------
| Header
| 1st field of a new page
|
...
b) POSITION 10. WRITE '1st field of a new page'.
...
TOP-OF-PAGE. WRITE: / 'Header'.
results in: +----------------------------------------------------
|
| Header
| 1st field of a new page
|
...
2. A WRITE ... TO after a POSITION specification causes a differnent
result than that of a subsequent WRITE.
Example: the current line width of a list is 80.
a) POSITION 75.
WRITE '123456789'. ---> '12345' appears from column 75
b) POSITION 75.
WRITE 'x' TO FELD.
WRITE '123456789'. ---> '123456789' at the beginning of a new
line
It is no longer cut off, but broken up.
Cause
Error in list processor.
Solution
Correction.
Until then ...
1. No POSITION after NEW-PAGE ...
2. Use POSITION directly before the WRITE.
ABAP Short Reference General Material Data
This documentation is copyright by SAP AG.
Length: 1722 Date: 20240329 Time: 031412 sap01-206 ( 15 ms )