Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

To make a field left justified

Former Member
0 Kudos

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

5 REPLIES 5

former_member583013
Active Contributor
0 Kudos

WRITE:/ net_cost LEFT-JUSTIFIED.

Greetings,

Blag.

Former Member
0 Kudos

shift LEFT net_cost DELETING LEADING spaces.

WRITE:/ net_cost LEFT-JUSTIFIED.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

hi

WRITE:/ field LEFT-JUSTIFIED.

Regards

Gregory