Skip to Content
avatar image
Former Member

currency

Hi,

I am getting Negetive currency value from File(Ex -100)

but wheni done some changes its not showing it as -Ve amount.

Can any one tell how to resolve this problem

Sample code is below.

l_curr = -100.
final = l_curr * 10 .

<b>My Req resule is -1000.

But its giving as 1000.</b>

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Oct 31, 2007 at 10:46 AM

    Vamsikrishna,

    Check the length of the variable FINAL that you are using to store the currency value.

    K.Kiran.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 31, 2007 at 11:00 AM

    data:

    w_val1 type TCURR_CURR,

    w_val2 type TCURR_CURR.

    w_val1 = -100.

    w_val2 = w_val1 * 10.

    write: w_val2.

    it is working fine...

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 31, 2007 at 11:10 AM

    hi vamsikrishna,

    try to declare variable type I or P.

    Regards

    Allan Cristian

    Add comment
    10|10000 characters needed characters exceeded