Skip to Content
author's profile photo Former Member
Former Member

Issue with 'JPY' currency loading from flatfile

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 05, 2006 at 12:27 PM

    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 😔

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Oct 05, 2006 at 11:59 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 09:02 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.