cancel
Showing results for 
Search instead for 
Did you mean: 

Converting ECC Decimal data type to MII

Former Member
0 Kudos

Hi All

While querying data from backend i am getting values for a column like this 12,500.12.This when i try to use in my BLS transaction in MII i get weird values due to conversion.Is there a way to format this value so that i get end result as 12500.12.The data type used in the FM is Dec for this column.

Please suggest.

Regards

Shweta

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Shweta,

if the character for the decimal point is "." and the thousands seperator character is ",", then you

can use the Expression Function number(). This function will return what you are expecting.

For more information's, please take a look into the HELP.

BR

Pedro

Former Member
0 Kudos

Hi Pedro

I cannot convert it to a number as i would have to do further calculations with a decimal number only.I have it converted from the backend.

Regards

Shweta

Former Member
0 Kudos

Shweta,

the function number() will return a numerical value, including decimal values. You can

read it in the link HELP above and see it in the screen below. Of course converting

in the source system is safer.

BR

Pedro

Former Member
0 Kudos

Thanks Pedro may be i wasn't using it correctly.Can keep it in mind going forward.

0 Kudos

The number format returned is based on the profile for the user that you are authenticating with ERP in your credential alias with.  If you modify the profile on the ERP side for the user it will automatically return the values in your expected format.  This way you can setup and manage technical users for the various regions rather than building in little format work arounds.

Hope this helps,

Sam

HariCS23
Contributor
0 Kudos

Hello Shweta,

1. Write XSLT transformation.

or

2. I believe you can convert that to string ,use stringreplace function  as Padma told and then cast it back to decimal . Hope this helps.

Thanks

Hari

former_member204240
Active Participant
0 Kudos

Hi Shwetha,

Can you try this.

stringreplace("12,500.12",",","")

Instead of value pass the row where you getting data.

Regards,

Padma Rao

Former Member
0 Kudos

Hi Padma

The data type for this column is decimal and not string.Also I can not change this to string as I need to add certain values to it later. .Any other pointers?

Regards

Shweta

former_member204240
Active Participant
0 Kudos

Sorry I dono whether you can escape comma.

But If the data is coming from ECC FM then you can ask to send data without comma.It is easy to convert decimal notation in ABAP.