Skip to Content
avatar image
Former Member

Correspondence print amount with wrong format

Hi expert,

i use the 'write to' statement to move the amount from a type P variable to a type C varaible, so that the display amount C will have the comma. Previouly i think the only one thing impact the format is the user defalut decimal notation.

but in our testing system it dosen't follow the user defalut decimal notation setting, when i use the write to sentence, whatever your decimal notation setting is , it only use on fomat.

Any suggetion on this?

is there any other place can control the amount display fomat?

or Usually how your guys to disply the amount with comma?

any feedback will be appreciate

thansk in advance.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 04, 2008 at 07:17 AM

    wanna,

    When ever you use the write to syntax the properties of the sydtem settings are taken over. This is for sure.

    just try to totally log off from the total system and then check again , it must work.

    regards,

    ravi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2008 at 10:03 AM

    It's bec's you are assigning the value of a packed variable to a character variable.So, the value will be stored in the character variable in the internal format of your packed variable irrespective of the system default format. Try to assign the value to some numeric type fields only.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      thanks for you guys.

      I followed to do this. but it doesn't works.

      One more thing surprised me. when i debug the write to snytax , enven with same amount the result format was different. is it relate to the customer master setting? because the copprosndance from different customer.

      thansk

  • avatar image
    Former Member
    Sep 05, 2008 at 06:34 AM

    You can try the following -

    amount is type P ,

    l_amt is type char20

    If amount is not initial.

    write amount to l_amt .

    shift l_amt deleting leading space.

    endif.

    and then display l_amt in smartform .

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Srinivas,

      Just go to the Conditions tab of that text element.

      put your condition there to check if it is not initial.

      like. wa_final-zamount ne space.

      Always try to open a new thread for your question

      so that it will be solved faster as points would be available for that.

      Regards,

      Ravi Kiran.

  • avatar image
    Former Member
    Sep 09, 2008 at 03:36 AM

    thanks to all for your effort.

    Add comment
    10|10000 characters needed characters exceeded