2009 Mar 07 10:01 AM
Dear All,
I am displaying one internal table on screen in table control.
It has several QUAN (quantity) and CURR (currency) fields with values in decimals...
But I want to display values before decimal point i.e. if it is 13.000, I want to display only 13.
Is there any setting on screen field level that I can do ?
You valuable suggestions are most welcome ...........
Thanks...................
Dear All,
I am displaying one internal table on screen in table control.
It has several QUAN (quantity) and CURR (currency) fields with values in decimals...
But I want to display values before decimal point i.e. if it is 13.000, I want to display only 13.
Is there any setting on screen field level that I can do ?
You valuable suggestions are most welcome ...........
Thanks...................
2009 Mar 07 10:31 AM
hi,
use variable on screen based on abap dictionary (se11) which has no decimal places...
(search it by domain with no decimals places)
regards, darek
2009 Mar 07 1:10 PM
declare it as a character on the screen ...and do like this...in the coding
data: v_dec type p decimals 3 value '13',
v_char type char10,
v_ext type char5.
v_char = v_dec.
write:/ v_char.
split v_char at '.' into v_char v_ext .
condense v_char.
concatenate v_char '.' into v_char.
write:/ v_char.
2009 Mar 07 1:46 PM
Hi Ubhaka,
just Declare all your QUAN (quantity) and CURR (currency) fields with the TYPE I that is integers..
so that you can remove decimal points...
or else you can do one more thing
DATA : lv_num type p decimals 3 value '50.326',
lv_final type i.
lv_final = FLOOR( lv_num ).
Now lv_final will have the only 50.ie. use the FLOOR funtionality
Thanks!
Edited by: Prasanth on Mar 7, 2009 7:17 PM
2009 Mar 07 2:56 PM
try CEIL(m)
or
DATA: fld1 TYPE P DECIMALS 2,
fld2 TYPE P DECIMALS 2 VALUE '5.99'.
fld1 = FLOOR( fld2 ).
WRITE: / 'FLOOR:', fld1.
out put: 5or
PARAMETER:
p_input TYPE konv-kbetr DEFAULT '28.99'.
DATA: w_out TYPE konv-kbetr,
w_unit TYPE vtbfima-runit VALUE 2.
CALL FUNCTION 'FIMA_NUMERICAL_VALUE_ROUND'
EXPORTING
i_rtype = '-'
i_runit = w_unit
i_value = p_input
IMPORTING
e_value_rnd = w_out.
WRITE:/ 'Input:',p_input,
/ 'Output:',w_out.
2009 Mar 07 4:27 PM
Try this
IF p_fieldname = 'DELQTY'. " In fieldcatalog when you pass field name use decimals option also
ls_fieldcat-decimals = '000000'.
ENDIF.
2009 Apr 10 5:49 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |