Skip to Content
author's profile photo Former Member
Former Member

How to write a field left justified Plus how to append spaces at end...

Hi all,

can anyone tell how to write a field left justified.

regards,

Bharaat

Message was edited by:

Bharat

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Jan 04, 2007 at 09:10 PM

    By default fields are written left justified, unless you are talking about a numerically type field. Exactly what are you trying to do?

    Regards,

    RIch Heilman

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      BEGIN OF outtab OCCURS 0,

      line(31),

      tag(2) VALUE ' ',

      END OF outtab.

      LOOP AT lt_int INTO ls_int.

      MOVE ls_int TO outtab-line.

      MOVE ' ' TO outtab-tag.

      APPEND outtab.

      ENDLOOP.

      I want 2 characters to be printed at end i.e two spaces.

      Regards,

      Bharat

  • author's profile photo Former Member
    Former Member
    Posted on Jan 04, 2007 at 09:13 PM

    Try:

    WRITE /001 'Hello world' LEFT-JUSTIFIED.

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 04, 2007 at 09:14 PM

    Except type I, P and F, output can be formatted using LEFT-JUSTIFIED with WRITE statement.

    Thanks,

    Santosh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 04, 2007 at 09:18 PM

    Hi Bharat,

    By default character fields are left justified and numeric fields are right justified.

    You can change this justification using WRITE with clause.

    WRITE: /(60) 'Left' LEFT-JUSTIFIED,

    /(60) 'Center' CENTERED,

    /(60) 'Right' RIGHT-JUSTIFIED.

    Thanks,

    Vinay

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.