cancel
Showing results for 
Search instead for 
Did you mean: 

ContextConfigurationException: Wrong amount type (not decimal).....

Former Member
0 Kudos

Hello All,

I'm facing this problem "com.sap.dictionary.runtime.DdException: Wrong amount type (not decimal): Unit service cannot be instantiated

"..it seems to be a problem with one of the structure that is linked to one of my sub - model nodes (specificly bapidlvitem) if you see...the error is something to do with the context generation. I'm using a standard bapi "Bapi_delivery_getlist" and the str that have the problem is "et_delivery_item" of type bapidlvitem. It has some attributes but what i've figured out is that one of them is decimal, the other ones are string...so i dont know what to do because the problem appear when i create the model node with that subnode ("et_delivery_item") if i dont include that subnode, all works fine...and i really need that subnode because i have to use it in my application. Please someone help me

Regards,

MC

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member197348
Active Contributor
0 Kudos

Hi Mariana,

The problem is you are passing String value to a decimal attribute.Try like this:

wdContext.<yournode>Element().set<yourAttribute>(new BigDecimal(yourStringAttribute));

If you want more help, provide your context structure also.

Regards,

Siva

Former Member
0 Kudos

hi,

well its strange because i'm not using the context, i mean, the error shows up only when i'm mapping my model node in my controller. I'm not passing anything to that model node and i'm not doing anything on the source code level :-(. Any idea ?

KR,

MC

former_member187439
Active Participant
0 Kudos

Hope you solved it. Even if you dont pass value to the field, if the function module in which this field is present in binded in your code, you will see this error.

Note that, this happens, if a "complex structure" or invalid field is present in one of the Function modules you are using. In such cases, it is not necessary that you set or retrieve value from that field. Just binding or mapping of that FM itself leads to such errors. All that needs to be taken care is, in any of the function modules used in WebDynpro, no such test fields should be added.