on 02-26-2008 5:57 AM
Hi all,
I want to round off a value in smartform. I have a field which has a data type FLTP length 16 and dec 16.
If the value of the field is 459600, then it displays something like 4,596 + E7 but I want to display it like 4,59600.
I am using a smartform.
How can I do it?
Points will be awarded immediately.
Regards,
Nikhil Moghe
Hi,
Try using the formatting options to avoid the exponential sequence.
like &itab-fld1(E0)& or &itab-fld1(E)&
Chk out and reward if helpful!!
Regards,
Narendra.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use THis FM
&----
*& Form sub_fltp_to_char *
&----
This form converts cycle from floating to character format *
-
FORM sub_fltp_to_char .
*--Local constants
CONSTANTS: lc_dec TYPE i VALUE 0.
*--Clear Variable
CLEAR v_cycle.
IF NOT v_unit IS INITIAL.
*--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.
ENDIF. "IF NOT v_offset IS INITIAL.
ENDFORM. "sub_fltp_to_char
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.