SAP Database - The Unofficial SAP Knowledge Base

Free Business and Tech Magazines and eBooks

ABAP Programs: Setting the layout position of fields

Print This Post Email This Post Written by admin on Nov 14th, 2007 | Filed under: ABAP Programs

REPORT ZSOURCE0804.

DATA: POS TYPE I,
LEN TYPE I.

WRITE AT 5 ‘position 5′.
POS = 20.
WRITE AT POS ‘position 20′.
POSITION 40.
WRITE ‘position 40′.

POS = 10. LEN = 20.
NEW-LINE.
WRITE AT POS(LEN) ‘position 10, length 20′.

~~~~~ End of post ~~~~~

———————
ABAPer, mail: abap.community@gmail.com http://abaplearner.blogspot.com

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

  1. ABAP Programs: Inserting lines at a specified position REPORT ZSOURCE1206.* Work area for a database tableTABLES CUSTOMERS.* Types for later useTYPES: BEGIN OF T_CUSTOMER_CITY, ID LIKE CUSTOMERS-ID, CITY LIKE CUSTOMERS-CITY, END OF T_CUSTOMER_CITY.* Internal table with two columnsDATA...
  2. ABAP Programs : Using the Basic Layout Formats REPORT ZSOURCE0801. * Simple output containing the current dateWRITE: ‘This is the current date:’, SY-DATUM. * Displaying fields according to their typeDATA: STRING(20), INT TYPE I, PACKED_NUMBER TYPE P DECIMALS...
  3. ABAP Programs: Using system fields REPORT ZSOURCE0409. WRITE: / ‘Current date’, SY-DATUM, / ‘Current table index’, SY-TABIX, / ‘Loop counter’, SY-INDEX, / ‘System return code’, SY-SUBRC.———————ABAPer, mail: abap.community@gmail.com http://abaplearner.blogspot.com ...
  4. ABAP Programs: Copying fields REPORT ZSOURCE0701. * move fieldsDATA: NAME(25), COUNTER TYPE I.DATA: SOURCE LIKE NAME, TARGET LIKE SOURCE.MOVE: ‘Edison’ TO NAME, 17 TO COUNTER.MOVE SOURCE TO TARGET.* Using the compute command (keyword can...
  5. ABAP Programs: Converting character fields REPORT ZSOURCE0703. * Truncating fields or padding with blanksDATA: SHORT_NAME(8), LONG_NAME(16).MOVE ‘Washington’ TO: SHORT_NAME, LONG_NAME.WRITE: / SHORT_NAME, LONG_NAME. * Take care of intermediate stepsLONG_NAME = SHORT_NAME = ‘Washington’.WRITE: / SHORT_NAME,...



This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Leave a Reply

  • Subscribe to RSS

  • Free Ebooks