Skip to Content
0
Oct 05, 2013 at 01:42 AM

How to convert comma to dot for price field in transformation using start routine or rule type routine?

32 Views

Hi all ,

i tried the following code using the function modules

1 ) CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_INTERNAL'

EXPORTING

CURRENCY =

AMOUNT_EXTERNAL =

MAX_NUMBER_OF_DIGITS = '20'

IMPORTING

AMOUNT_INTERNAL = price

* RETURN =

this function module is throwing an exception while i am executing the DTP .

2) function module HRGPBS_HER_FORMAT_AMOUNThi

This function module is not there in SE80 or SE37

3)

SELECT SINGLE DCPFM FROM USR01

INTO VAR_DCPFM WHERE BNAME EQ SY-UNAME.

IF VAR_DCPFM EQ 'X'.

REPLACE ALL OCCURRENCES OF ',' IN: FILEDNAME WITH ''.

TRANSLATE FILEDNAME USING ','.

ELSEIF VAR_DCPFM EQ ''.

REPLACE ALL OCCURRENCES OF '.' IN: FILEDNAME WITH ''.

TRANSLATE FILEDNAME USING '.'.

TRANSLATE FILEDNAME USING ',.'.

ELSEIF VAR_DCPFM EQ 'Y'.

TRANSLATE FILEDNAME USING ',.'.

ENDIF.

This program is showing syntax error .

Error : " fiedlname is must be of character data type "

But my field is CURR type .

4) I tried " replace all occurances " same syntax error is showing .

Can you please help me ?