cancel
Showing results for 
Search instead for 
Did you mean: 

XSD Data Type to ABAP Proxy Tech. Type

Former Member
0 Kudos

I am working with an ABAP development team who is creating PROXYs from the Service Interfaces I have setup in the ESR (PI 7.11). I have been asked to set the type of a numeric field by the ABAP developer as this:

"Yeah we can convert from string to currency but sap internally stores currency with 3 decimals so we may got to do some multiplications and divisions based on how many decimals sender passes. If you could create a numeric with 3 decimals that is ideal."

The XSD type as xsd:decimal, but in the proxy it seems to create Tech. Type = STRING.

I can apply formatting rules in the message mapping, but developer is convinced that the Service Interface can have the correct ABAP Tech. Type. I do not find any messages in this forum, so not sure what to do.

Thank you for your time.

Accepted Solutions (1)

Accepted Solutions (1)

former_member241146
Active Participant
0 Kudos

Hi Tadd.

This is happening because you didn't define a size for field (totalDigits and fractionDigits), so the ABAP creates a type without size (STRING type). If you use size, its´ll create a correct type in ABAP system.

Regards.

Bruno.

Answers (2)

Answers (2)

Former Member
0 Kudos

A colleague provided a reference to another post on similar topic which linked to:

[http://help.sap.com/saphelp_nw70/helpdata/en/c8/7e5e3c754e476ee10000000a11405a/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/c8/7e5e3c754e476ee10000000a11405a/frameset.htm]

stefan_grube
Active Contributor
0 Kudos

In WAS 6.20 it worked for me like this:

xsd type decimal, details totalDigits = 7, fractionDigits = 2

ABAP type dec 7,2

But I do not know how it is in a system based on WAS 6.40 or higher

stefan_grube
Active Contributor
0 Kudos

Internal ABAP types like packed or float cannot be created by ABAP proxy.

I recommend to use String for any type. Inside XML you will have a String representation anyway, but you will encounter less issues in converting from XML to ABAP internal types.

I work a lot with currency fields, it is no problem at all. Inside ABAP you mave currency field to string field, the decimals are correct.

If course, in mapping you have to create a decimal field, but this would not be any change, if you had a decimal type in ABAP.