‎2007 Apr 26 9:24 AM
I have in my perfil the number format like 1.000,6 but when i execute a sapscript it shows 1000.6.
I have tried to convert this number with BAPI_CURRENCY_CONV_TO_EXTERNAL function, but when i execute from se37 it works, but not in my program, if i try to overwrite the variable with 1.000,6 it says that it doesn´t recognizes my number like a numerical number, can anybody help me please?
Thanks in advance
regards
‎2007 Apr 26 9:28 AM
HI,
you can avoid it by writing the statement
SET COUNTRY 'US'.
In case of US, comma will be thousands separator and period is decimal separator
Regards
Sailaja.
‎2007 Apr 26 9:28 AM
HI,
you can avoid it by writing the statement
SET COUNTRY 'US'.
In case of US, comma will be thousands separator and period is decimal separator
Regards
Sailaja.
‎2007 Apr 26 9:30 AM
DATA: char1(30).
DATA: char2(30).
WRITE: p1 TO char1 EXPONENT 0 DECIMALS 3.
CONDENSE char1 NO-GAPS.
WRITE: p3 TO char2 EXPONENT 0 DECIMALS 3.
CONDENSE char2 NO-GAPS.
‎2007 Apr 26 9:30 AM
Check the SAP Script code which displays the VARIABLE... check the format specified there... and change over there... don't give any additions. directlt give fieldname and check
Like... if your variable is NETWR then use &NETWR& only...
‎2007 Apr 26 9:34 AM
Hi
The input format of a decimal number is alway XXXXX.Y, the output format depends on the kind of the number, if you have an amount it'll depen dispd on the currency.
U should use a structure where it's defined the currency field for the control of the amount field, in this way the system convert'll automatically the output format, if you can't do it, you can try to use a char field for the output:
DATA: AMOUNT_CHAR(20).
WRITE <AMOUNT> CURRENCY <CURR> TO AMOUNT_CHAR.
Max