‎2007 Dec 24 6:55 AM
Hi,
How can i control the decimal notation of a currency field in SAPScript?? I have already set the a proper setting in user profile, but the currency still shown in different notation.
Regards,
Kit
‎2007 Dec 24 7:50 AM
Have a look look, may it help u.
&VAR& = 1,356.470
&VAR(.1)& = 1,356.5
&VAR(.4)& = 1,356.4700
&VAR(.0)& = 1,357
Reward if useful
Regards
ANUPAM
‎2007 Dec 24 7:33 AM
‎2007 Dec 27 4:28 AM
Hi Selva,
Could you describe more about the currency key??
Regards,
Kit
‎2007 Dec 27 9:35 AM
Hi everyone,
My problem is that the number 28300 is displayed as 28.300,00. What i expect is 28,300.00.
Thanks!
Regards,
Kit
‎2007 Dec 27 9:59 AM
‎2007 Dec 27 10:04 AM
I had already made this changes. One more thing.. the value that show in the form is a calculation field with type KONV-KBETR.
‎2007 Dec 27 10:19 AM
Try following code.... modify according to your need
FORM f_convert_num CHANGING ch_num.
DATA : w_dcpfm LIKE usr01-dcpfm,
w_num1(30) TYPE c,
w_off TYPE i.
*FIELD_NUM = 1,233.50 OR FIELD_NUM = 1.233,50 OR FIELD_NUM = 1 233,50
****************************************
MOVE ch_num TO w_num1.
SELECT SINGLE dcpfm
FROM usr01
INTO w_dcpfm
WHERE bname EQ sy-uname.
IF sy-subrc EQ c_zero.
ENDIF.
IF w_dcpfm EQ c_checked.
REPLACE ALL OCCURRENCES OF c_comma IN: w_num1 WITH c_blank.
ELSEIF w_dcpfm EQ c_blank.
REPLACE ALL OCCURENCES OF c_dot IN: w_num1 WITH c_hash.
REPLACE ALL OCCURENCES OF c_comma IN: w_num1 WITH c_dot.
REPLACE ALL OCCURENCES OF c_hash IN: w_num1 WITH c_comma.
REPLACE ALL OCCURRENCES OF c_comma IN: w_num1 WITH c_blank.
ELSEIF w_dcpfm EQ c_yes.
TRANSLATE w_num1 USING c_commadot.
CONDENSE w_num1.
TRANSLATE w_num1 USING c_spacecomma.
FIND c_dcomma IN w_num1 MATCH OFFSET w_off.
w_off = 30 - w_off.
SHIFT w_num1 BY w_off PLACES RIGHT.
REPLACE ALL OCCURRENCES OF c_comma IN: w_num1 WITH c_blank.
ENDIF. "End of w_dcpfm check
CONDENSE w_num1.
MOVE w_num1 TO ch_num.
ENDFORM. " f_convert_num
‎2007 Dec 27 10:45 AM
Hi,
Check if t005x-xdezp has been set to 'X' for the country under consideration.
I hope this helps,
Regards
Raju Chitale
‎2007 Dec 24 7:50 AM
Have a look look, may it help u.
&VAR& = 1,356.470
&VAR(.1)& = 1,356.5
&VAR(.4)& = 1,356.4700
&VAR(.0)& = 1,357
Reward if useful
Regards
ANUPAM
‎2007 Dec 27 10:49 AM
Hi,
You can use the command
/: Set country 'US'
You will get , as thousand separator and . as decimal separator
If it does not meet your requirement, then change the country which meets yours.
Regards
Sailaja.
‎2007 Dec 28 2:34 AM
Hi,
Thx for your reply.
Now i can display the separator and dot correctly. But, i found that the calculation is not correct. I use two fields to compute the total and the result is not correct. They are quantity(Currency length 13 decimal 3) and price (length 11 decimal 2).
Example:
price: 283.00
quantity: 100.000
total: 28300000.00
Regards,
Kit
‎2007 Dec 28 3:21 AM
Hi,
Thx everyone. I resolved it by setting the fixed point program attribute.
Kit
‎2015 Jun 11 6:51 AM