on 10-05-2006 12:49 PM
I load a flatfile into an ODS. Amounts with currencies like JPY and PTE are loaded into the ODS a factor 100 to small. For example the flatfile has an amount in JPY '00000000003445.00' and this shows up in the ODS as 34.45. (it should be 3445.00).
While searching SDN and OSS I found some notes on the <b>display</b> of currencies with more or less than 2 decimals, but a problem during loading seems to be different from that one.
Hi,
Write this code in Start routine of Trtansfer Rule.
************************
if TRAN_STRUCTURE-CURRNECY = 'JPY' or 'PTE'.
TRAN_STRUCTURE-AMOUNT = TRAN_STRUCTURE-AMOUNT * 100.
Endif.
************************
Code can have some error..try to solve it..
Regards,
San!
Away from my system
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you have to upload the flat file using the currency conversion flag in your InfoPackage. A prerequisit is the unit for each amount in the unit column of your transfer structure and the maintenance of the table TCURX (number of decimals of the different currencys). During the upload the amounts with currency JPY are mulipied by 100.
Cheers!
Tanja
Dear SDN colleagues,
I found a solution: SAP always loads keyfigures wrong if the valuta has less than 2 decimal places. That is, if you load JPY 2443 then this will appear as JPY 24.43 in an ODS or CUBE. However when you build a query then the figure is automatically corrected for display.
Now, if one wants to calculate with these keyfigures then the calculations will go wrong because no automatic correction will take place. In this case you must correct manually (ABAP) by multipying by a factor to compensate for the decimal notation.
The ABAP to do this correctly is this:
DATA:
l_currdec LIKE tcurx-currdec,
shift(2) TYPE p,
corfac TYPE /bi0/oiamount. "17 with 2 decimals.
* Collect number of decimals as quickly as possible.
SELECT SINGLE currdec FROM tcurx
INTO l_currdec
WHERE currkey = COMM_STRUCTURE-currency.
IF sy-subrc = 0.
shift = 2 - l_currdec.
corfac = 10 ** shift.
result = COMM_STRUCTURE-my_kf * corfac.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This flag IS marked in my situation. Nevertheless, if I want to perform calculations on the data (i.e. in the update rules between 2 ODSes) I must correct for the effect described above.
My dataflow goes from
Flatfile -> ODS -> CUBE1 -> Query1
---> CUBE2 -> Query2
Between ODS and CUBE2 is an ABAP that does a (non-standard) currency conversion to EUR. In this ABAP I must correct for the effect otherwise Query2 reports the results a factor 100 to low. In query1 the data in document currency is reported correctly without correction.
Hi Jans,
I guess your User settings has the Decimal Setting set to ','(comma). Please change your flat file currency value to 3445,00. This should solve your problem.
We can change the decimals to '.' from ',' in the User Settings as well.
Regards,
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.