2006 Oct 13 8:23 AM
Hi all,
I want to get the netprice of a Purchase order item.
So, I have used the below select-query.
select netpr
from ekpo
into table gi_netpr
where ....
For one PO item I got value as 1.249,97.
But, when I see the netprice of a PO in ME22n tcode,
I see the value as 124.97 and currency is 'BEF'.
How to solve this ?
Thanks in advance.
Vishnu Priya
2006 Oct 13 10:08 AM
Hi
See table TCURX, here you can see the hit:
BEF -->CURRDEC = 0
It means the BEF currency doesn't use the decimal part, so the system <b>multiplies the amount for 100 when the amount has to be displayed</b> and, of course, <b>it divedes it for 100 when amount has to be stored</b> in database.
Try this piece of code:
data: netpr type netpr value '1249.97'.
write netpr currency 'BEF'.
So when you have to display an amount u have to use the currency too:
WRITE <AMOUNT> CURRENCY <CURRENCY>.
Max
Hi all,
I want to get the netprice of a Purchase order item.
So, I have used the below select-query.
select netpr
from ekpo
into table gi_netpr
where ....
For one PO item I got value as 1.249,97.
But, when I see the netprice of a PO in ME22n tcode,
I see the value as 124.97 and currency is 'BEF'.
How to solve this ?
Thanks in advance.
Vishnu Priya
2006 Oct 13 10:02 AM
Hi,
Please check own data under Menu:
(Sap Initial screen)
System->User Profile -> Own data
here click on defaults tab and check decimal notation.
this could be the reason why you are seeing the amounts differently.
Rgds,
HR
2006 Oct 13 10:04 AM
Hi.
Try this.
-
1.249,97 is inner value.
change it use:
write gi_netpr-netpr to xxx currency 'BEF'
2006 Oct 13 10:05 AM
Hello Vishnu Priya,
After getting the data into the itab.
Do the following.
DATA: begin of itab1 occurs 0,
L_F_NETWR(21) TYPE C,
end of itab1.
loop at itab.
WRITE: ITAB-NETWR TO ITAB1-L_F_NETWR.
append itab1.
clear itab1.
endloop.
If useful reward.
Vasanth
2006 Oct 13 10:05 AM
Also see if the Check Box for Fixed Point arithmetic is chosed in your program Attributes section.
Regards,
Ravi
2006 Oct 13 10:08 AM
Hi
See table TCURX, here you can see the hit:
BEF -->CURRDEC = 0
It means the BEF currency doesn't use the decimal part, so the system <b>multiplies the amount for 100 when the amount has to be displayed</b> and, of course, <b>it divedes it for 100 when amount has to be stored</b> in database.
Try this piece of code:
data: netpr type netpr value '1249.97'.
write netpr currency 'BEF'.
So when you have to display an amount u have to use the currency too:
WRITE <AMOUNT> CURRENCY <CURRENCY>.
Max
2006 Oct 13 10:37 AM
Vishnu
Along with your write statement use the addition of CURRENCY and the three digit ID along with that. You will get your desired output
Shane
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |