cancel
Showing results for 
Search instead for 
Did you mean: 

Data type?

Former Member
0 Kudos

What is the best data type for quantity / amount fields ?

I am using 'string' type .. but is it better to use xsd:decimal?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

It depends on your scenario.

First of all, it won't be checked until you do a mapping.

If your receiver needs a really clean XML Structure and it must be a decimal, a decimal would be better.

If it doesn't count, you can use String because it is a String what you get.

If you want to use Proxies, I am not sure if the Field Types will be the same in the Java Code or if any field is a String.

Regards

Philipp

Former Member
0 Kudos

I am actually mapping the string to QUANTITY field in RFC (which is XSD decimal). I guess there shouldn't be any issues using XSD:STRING.

thanks

moorthy
Active Contributor
0 Kudos

There will not be any issue.But you may get Runtime Error . Because data type mismatch. for this use Java Userdefined function to make sure that your input Quantity field is valid to map with the target field.

So you can check for Special Characters etc in the source structure.

Regards,

Moorthy

moorthy
Active Contributor
0 Kudos

Hi,

As per now, there is no validation happens for the data facets. SO you can go for String type. And if you want to validate, it is easier with using some java functions in the mapping.

Regards,

Moorthy