cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Decimal Format

Former Member
0 Kudos

Hi,

Well I have a problem in printing SAP Script. Although the Dec Pt Format setting in the Country Master is set to 1,234,567.89, and also the user setting default is also the same. But the SAP Script Form is printing or sending the Decimal format in 1.234.567,89. Why should this be happening.

Regards

Yao Chhang

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Yao,

This is happening due to the user data maintanence.

please goto system -> userprofile ->owndata

and change the settings as desired.

Hope this helps

Former Member
0 Kudos

Hi Yao Chhang,

THIS PROCEDURE IS WITHOUT CHANGING DEFAULT SETTINGS :

Report YH642_TEST.

TABLES:

mard.

DATA : W_mard_labst type p decimals 3,

w_dt1(18).

data:

W_N TYPE I.

SELECT SINGLE * FROM MARD INTO MARD WHERE LABST = '10000.00'.

WRITE: mard-labst .

W_mard_labst = mard-labst.

WRITE:/ W_mard_labst .

w_dt1 = w_mard_labst .

write W_mard_labst to w_dt1.

W_N = STRLEN( W_DT1 ).

W_N = W_N - 4.

REPLACE ALL OCCURRENCES OF ',' IN W_DT1 WITH '.' .

REPLACE ALL OCCURRENCES OF '.'

IN SECTION OFFSET W_N LENGTH 4 OF W_DT1 WITH ','.

WRITE: / W_DT1.

Hope this resolves your query.

Reward all the helpful answers.

Regards

anversha_s
Active Contributor
0 Kudos

u can try like this.

data: l_amnt(100) type c.

l_amnt = '1.234.567,89'.

replace all occurrences of ',' in l_amnt with '#'.

replace all occurrences of '.' in l_amnt with ','.

replace all occurrences of '#' in l_amnt with '.'.

write : l_amnt.

Former Member
0 Kudos

in scripts also set

set country 'IN'.

Regards

Prabhu