Application Development and Automation 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: 
Read only

number format

Former Member
0 Likes
987

Dear Experts,

In the MM01 screen in accounting 1 tab the standard price is displaying value like 15,177,443.

In my report i am getting the value like 151,774.43.

my requirement is i have print exactly like what it looks like in the screen and remember that the standard price value will differ for other record ie some case it is only 443, in some case 12679.

pls let me know how to code this to solve this problem,

thanks in advance

karthik

10 REPLIES 10
Read only

Former Member
0 Likes
961

Hi Karthik ,

in the write statement there is an addition called <b>currency</b> , which formats the amount based on the currency .

Try using this.

Regards

Arun

Read only

0 Likes
961

Dear Arun,

Could you pls give me th sample code for this, bez i didn't found currency addition in write statement

Read only

0 Likes
961

Hi Karthik ,

The format would be

write /: v_amount <b>currency 'EUR'</b>.

where v_amount is the variable which contains the amount.

Regards

Arun

Read only

0 Likes
961

Dear arun,

Thanks for the answer but i am using ALV grid to display the report in that case , i can't use the write statement. is there any other solution for this?

thanks in advance

Read only

0 Likes
961

Hi,

I am not sure.Just try this.

write v_amount currency 'EUR' to itab-amount.

Read only

0 Likes
961

Hi Karthik ,

I you all your amount are in same currency then there is a field in catalog called CURRENCY where you can put in the Currency unit .

Plese try using it.

Regards

Arun

Read only

0 Likes
961

Dear arun,

i tried all but it is not working. in the structure the domain is given like curr 11 ,2 decimals. do i need to change this domain or any function module is tere to covert to desired format

thanks in advance

karthik

Read only

0 Likes
961

Hi Karthik ,

In MM01 , please check what is the conversion exit used for the amount field.

Please tell me that,

Reagrds

Arun

Read only

former_member508729
Active Participant
0 Likes
961

HI Karthik,

You can achieve this using write statement

look at below code

data w_amount(16) type c.

write wa-price to w_amount currency wa_t001-currency.

hope this will help u.

regards

Ashutosh

reward points if helpfull.

Read only

Former Member
0 Likes
961

Karthik,

have u checked the currency code in configuration window? if so, the decimal is 2 then mutliply with 100 into the actual value , if 3 multiply with 1000 into actual... like that we have done.

imean 151,774.43 * 100 = 151,774,443.

if any solution getting this, i update u.