cancel
Showing results for 
Search instead for 
Did you mean: 

data type xsd:decimal

Former Member
0 Kudos

Hi,

If you declare a field type as "xsd:decimal" and activate proxy, it makes the ABAP technical type as "String" of type xsd:decimal.

similarly if u make that variable with a entry in total no of digits then it gets activated with xsd:decimal and ABAP type DECIMAL.

I tested on 7.1 and 7.0 SP13. same problem.

I dont see this problem with integer. has any one noticed this?

is this a bug or has SAP has some reason before making this functionality?

Has any one faced the similar problem earlier?

Venkat.

Edited by: Venkat A on Jul 8, 2009 12:54 AM.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member183777
Active Contributor
0 Kudos

Standard definition of xs:decimal is unlimited number of digits. So to properly convert xs:decimal type for all cases, you would need to use String type, because ABAP decimal type has limitations.

prasannakrishna_mynam
Contributor
0 Kudos

Hello Venkat,

While converting xsd:decimal to ABAP's DECIMAL type, the source decimal has condition like Decimal with fractionDigits<=14, totalDigits<=31, It has specified in sap help. If the source xsd:decimal is with in this limits then only it'll convert into ABAP's DECIMAL type. For xsd:int there is so such conditions or limits to convert, that is the reason why xsd:int to ABAP INT conversion works fine in your case. For xsd:decimal other than the specifid range it might convert into String, perhaps that was what hapnning in your case,it's not bug.

Regards,

Prasanna

Former Member
0 Kudos

any specific reason for this condition?

If I want to have a range higher or lesser than this?

There is no point declaring decimal for which SAP transforms and sends string .

Can you please provide me the exact link?

Many thanks,

Venkat.

prasannakrishna_mynam
Contributor
0 Kudos

Hi Venkat,

The reason behind this, i don't have idea, you can refer the below link where the conversion range has specified.

http://help.sap.com/saphelp_nw70/helpdata/en/de/705c3c3806af06e10000000a11402f/content.htm

Regads,

Prasanna

Former Member
0 Kudos

thanks Prasanna.

hello experts, does any one know why string value is declared as ABAP type for decimal value lying outside the specified range?

Thanks,

Venkat.

former_member181962
Active Contributor
0 Kudos

Hi venkat ,

31 Digits of decimal with 14 decimal digits would give you the possibility of handling a number as big as

9999999999999999.99999999999999

In real life scenarios, i do not think anyone would be dealing with such astronomically large values, unless you are dealing with the weight of earth or the distance between stars ..:) and 14 decimals of precision is also very rare, unless you want to measure the diameter of an atom or something...

I know my answer is based on the premise of common sense, I would wait along with you for a more technical answer.

Regards,

Ravi Kanth Talagana

Former Member
0 Kudos

here in my scenario, it would be sufficient to deal human weight only... Hence, i dont need such a huge numbers

I wasnt aware of this fact about pi decimal to abap string and declared the field as "decimal"only without any range for which ABAP type was string which is not processing if we send decimal values.

Venkat

former_member181962
Active Contributor
0 Kudos

Hi venkat,

When you say "Not processing" what exactly is happening?

By the way, this a server proxy correct?

So, when you send a decimal value from XI to the Proxy, then it is treated as a string and what happens next?

Regards,

Ravi

Former Member
0 Kudos

MONI, RWB Mesg monitor - shows succesful.

The CC shows :

Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException

Scenario 1:

with XI - Decimal ABAP - String - Error message as above

Scenario 2:

with XI - Decimal ABAP - String - on PI for decimal fields I did a UDF with parseFloat.

Result : working

Scenario 3:

With PI- Decimal ( with total digits and fractions ) , ABAP - DEC .

without above UDF in PI

Result : Same error message

Scenario 4:

With PI- Decimal ( with total digits and fractions ) , ABAP - DEC .

with above UDF in PI

Result : Same error message

Only scenario 2 is working now.

I am confused to trade the exact problem.