Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

reg : FM to convert to internal format

former_member200874
Participant
0 Kudos

Hi All

For numeric values, I want to know if there is any function module to convert user entered values to the internal format as per user setting.

Thanks in advance

-jawahar

8 REPLIES 8

former_member181962
Active Contributor
0 Kudos

Numeric values don't have internal and external formats.

They will be stored and displayed the same way.

Can you explain your requirement in more detail?

Regards,

Ravi

0 Kudos

Hi Ravi

There is a particular way numeric values ( i mean, quantities like net weight and gross weight)gets stored as per the user setting. Like in india 3,000.00 , in US

they follow 3.000,00. Is n't it? Our thousands separator ',' for us is decimal point for them.

Whichever way user enters, I want to convert to the internal format as per user setting.

for this do we have to manually code anything or any standard FM is there for this?

If we have to code anything for it, How to go about it?

Am I clear for u? if not pls don't hesitate to ask me

Thank u for responding

0 Kudos

Hi Jawahar,

in that case you can take character variable and move that to quantity field, based on user settings conversion will take automatically.

REPORT  ZTEST.
data: a(10) type c,
      quan type menge.

a = '1000.00'.
move a to quan.

Regards

vijay

0 Kudos

Hi vijay

thank you for responding.

We are close to it.

But when supplying the value, you actually

said a = '1000.00'. If i replace '.' separator with

',' separator , it goes to exception and says

'Unable to interpret '1000,00' as a number.

I mean this itself again depends on user setting or country setting.

We have to know beforehand whether it's '.' or ',' for separating the mantissa and decimal value.

So how to go about it?

What is that table which actually stores user settings?

Regards

-jawahar

0 Kudos

Hi,

for user setting check the Transaction SU01 and find.

while giving input you should give '.' but based on your settings automatic conversion will takes place.

Regards

vijay

0 Kudos

Table USR01

field DCPFM

Regards

Raja

0 Kudos

Jawahar,

See if this helps you..

a = '1000.00'.

WRITE a TO quan.

former_member188685
Active Contributor
0 Kudos

Hi,

what is that numeric values, is it your own user defined values, or is DDIC related ..if so just give the field name.

Regards

vijay