on 06-07-2010 6:15 PM
Hi Friends,
We are facing an issue with invoice forms where the decimal separator comes as ' , ' (COMMA)instead as ' . '(DOT).
We can't change the country level settings in this scenario as its not being accepted by the customer.We have tried settiing incorrect country(for eg X) with the correct country(for eg Y) based on a condition. This works fine but there is a danger of it inheriting other values as well from correct countr (Y) like Procedure,Exch.rate type,Intrastat code etc
Could you please suggest solution to this issue.
Many thanks,
Rajiv
Hi,
Decimal Separators are user-specific data, and varies from user to user. You can to manipulate this in your code as below:
VALUE_CHAR = VALUE. "move the amount variable to character variable
SELECT SINGLE DCPFM INTO W_DCPFM FROM USR01 WHERE BNAME EQ SY-UNAME.
CASE W_DCPFM.
WHEN 'X'. "Format 1,234,567.89
REPLACE ALL OCCURRENCES OF ',' in VALUE_CHAR WITH space.
CONDENSE VALUE_CHAR NO-GAPS.
MOVE VALUE_CHAR to VALUE.
WHEN 'Y'. "Format 1 234 567,89
REPLACE ALL OCCURRENCES OF ',' in VALUE_CHAR WITH '.'.
CONDENSE VALUE_CHAR NO-GAPS.
MOVE VALUE_CHAR to VALUE.
WHEN OTHERS. "Format 1.234.567,89
REPLACE ALL OCCURRENCES OF '.' in VALUE_CHAR WITH space.
REPLACE ALL OCCURRENCES OF ',' in VALUE_CHAR WITH '.'.
CONDENSE VALUE_CHAR NO-GAPS.
MOVE VALUE_CHAR to VALUE.
ENDCASE.
Regards,
Birendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Its a smartform
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.