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

Problem in Dcimal places

Hi,

I have an output value which is Rs.8,92,466.50.

The issue is if am using the variable to display as character am getting the output as Rs.892466.50.(without commas).

If i use float am getting an output as 8.9246650000000000E+05.

If i use i am getting commas 8,92,466 but the end part is truncated.

Please help me and suggest how 2 use the particular data type so that i can get my required output of <b>Rs.8,92,466.50.</b>

With regards

Vijay

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Dec 05, 2007 at 06:38 AM

    Hi Vijay

    Use the Pack Data type for the variable or set your User Profile in required format.

    Regards,

    Sree

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 06:37 AM

    Hi,

    Used packed data type.

    regards,

    Santosh thorat

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 06:37 AM

    j

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 05, 2007 at 06:38 AM

    Hi,

    declare that variable as type p with decimals 2

    data : lv_var type p decimals 2.

    otherwis use FM

    *--Call function module to convert cycle & offset from floating to

    • character

    CALL FUNCTION 'FLTP_CHAR_CONVERSION_FROM_SI'

    EXPORTING

    char_unit = v_unit

    decimals = lc_dec

    fltp_value_si = v_offset

    indicator_value = c_check

    IMPORTING

    char_value = v_cycle

    EXCEPTIONS

    no_unit_given = 1

    unit_not_found = 2

    OTHERS = 3.

    IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    Regards,

    Prashant

    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.