cancel
Showing results for 
Search instead for 
Did you mean: 

numeric value right justified

Former Member
0 Kudos

Dear friends,

i have output value in the report as below

0.013

10.000

i want the value like the below

0.013

10.000

so that , what shall i do. please provide the solution.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hELLO

do it like this

data: num(10), nume type i.

nume = 0.013.

write nume to num RIGHT-JUSTIFIED.

bye

Gabriel

Answers (4)

Answers (4)

Former Member
0 Kudos

Dear Rajendran,

if this value you get is to be used in a form then where ever you are putting the output there you may be having a variable for the output.

For Example - PRICE.

If you are in smartforms or sap scripts go to the Change Editor mode and then you can see that the variable is in Simple manner written as &PRICE&.

Change this variable from &PRICE& to <b>&PRICE(R)&</b> and it should solve you problem.

So if you get values like 1000000.018 and 124.745 then the outputs will look like as given below.

1000000.018

124.745

Hope this helps you. reward accordingly.

Thanks

venugopal

former_member196280
Active Contributor
0 Kudos

Try this for report program

Data : num type i value '0.013'.

Data : num_val(10).

*****num_val = num. "Char field will have value like this <b>'0.013-----'</b>

Write num TO num_val RIGHT-JUSTIFIED. "Char field will have value like this <b>'-----0.013'.</b>

***Print num_val.

If you want to print it in form

&num_val(8R)& "<b>'-----0.013'.</b>

or

Define tab space in paragraph format with right justified and use this paragraph format.

Reward points to all useful answers.

Regards,

SaiRam

Former Member
0 Kudos

If you are working on Form printing then refer below link :

http://help.sap.com/saphelp_47x200/helpdata/en/d1/80318f454211d189710000e8322d00/frameset.htm

I see your thread is opened at Form Printing

Simple example :

&symbol& -> 1234

&symbol(8R) -> 1234

http://help.sap.com/saphelp_47x200/helpdata/en/d1/80318f454211d189710000e8322d00/frameset.htm

Thanks

Seshu

Former Member
0 Kudos

If you put the right-justified for the field variable, you will get the answer

ie

for ex.

itab-value right-justified