on 07-28-2005 6:03 PM
Hi,
We are facing a problem with one of our programs. It has to do with Decimal Notation.If you change the decimal as type p decimals 3 then execute the program the value becomes 10 times the original value. If you change it to type p decimals 2 then the value is corrrect after converting to currency. Any inputs are appreciated.
REPORT ZAVEEK.
DATA: l TYPE p DECIMALS 2 VALUE '234.567',
charout(16) TYPE c,
charout1(16) TYPE c.
WRITE: l TO charout CURRENCY 'GBP'.
MOVE l TO charout1.
WRITE: / l,
/ charout,
/ charout1.
regards
Aveek
When writing using a currency, the system will always move the decimal point where it thinks it should be regardless of where its add before the write statement. What is your requirement here.
Regards,
Rich Heilman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
We have a process order variance custom report at our client site. The problem is strange as it reduces the value by 10 times in the development server and increases the value by 10 times in the pre-prod server.
I need to make sure that the value after writing to currency is accurate when we check the activity cost report ( KSBT ) and the custom report to get the right fiscal values in the process order variance Report.
wa_h_act-stdu = wa_h_act-vgwxx *
( wa_h_act-togxx / wa_h_act-toexx ).
WRITE : wa_h_act-stdu TO l_std CURRENCY v_waers
NO-GROUPING.
This always increases by 10 times in both the servers.
However the value is accurate in the development server and inaccurate in the pre-prod server. Could it be the program or the set up of the master data in costing.
regards
Aveek
Hi,
According to SAP:
-
Correct format for currency specified in the field w.
Treats the contents of f as a currency amount. The currency specified in w determines how many decimal places this amount should have.
The contents of w are used as a currency key for the table TCURX; if there is no entry for w, the system assumes that the currency amount has 2 decimal places.
The Currency key GBP is not maintained in either of the 2 systems in the table TCURX.
Still it differs in value in both systems.
How do we set up the currency ?
regards
Aveek
Or you can move it to a decimal 2 field before the write.
report zrich_0001.
data: l type p decimals 3 value '234.567',
p type p decimals 2,
charout(16) type c,
charout1(16) type c.
p = l.
write: p to charout currency 'USD'.
move l to charout1.
write: / l,
/ charout,
/ charout1.
Regards,
Rich Heilman
Hi,
I have tried this earlier and it works fine. However the calculated values from ksbt and the custom report do not provide the correct answer in the development server but does return a correct value in the pre-prod server with the type p decimals 2. I have also tried type p decimals 0 and it returns the same value as type p decimals 2. The currency GBP is not maintained in either of the 2 SAP systems. Any clues.
regards
Aveek
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.