Skip to Content
author's profile photo
Former Member

To make a field left justified

Hi

I have a field VBAP-NETPR (item value). - This should be left justified

I have defined the field

data: net_cost TYPE char50,

please can some suggest how to get it left justified

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • author's profile photo
    Former Member
    Posted on Aug 22, 2007 at 07:23 PM
    WRITE:/ net_cost LEFT-JUSTIFIED.
    

    Greetings,

    Blag.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 22, 2007 at 07:24 PM

    shift LEFT net_cost DELETING LEADING spaces.

    WRITE:/ net_cost LEFT-JUSTIFIED.

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 22, 2007 at 07:26 PM

    WRITE vbap-netpr TO net_cost CURRENCY VBAP-WAERK NO-GROUPING LEFT-JUSTIFIED.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 22, 2007 at 07:45 PM

    Hi,

    You can try with the follwoing:

    Data: net_cost like vbap-netpr value '1000'.

    Write: net_cost left-justified.

    Output will be:

    1,000.00 "this value is left justified

    If you use the data type as char, the value will always be left justified by default.

    For example:

    Data net_cost(10) type c value 'Hai'.

    Write net_cost.

    Output will be:

    Hai "left justified by default

    Hope this helps.

    Please reward if useful.

    Thanks,

    Srinivasa

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 22, 2007 at 07:52 PM

    hi

    WRITE:/ field LEFT-JUSTIFIED.

    Regards

    Gregory

    Add comment
    10|10000 characters needed characters exceeded