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
Hi Vijay
Use the Pack Data type for the variable or set your User Profile in required format.
Regards,
Sree
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