diff --git a/java/src/main/java/com/genexus/sap/EnterpriseConnect.java b/java/src/main/java/com/genexus/sap/EnterpriseConnect.java index 0c1aec521..fb4815b46 100644 --- a/java/src/main/java/com/genexus/sap/EnterpriseConnect.java +++ b/java/src/main/java/com/genexus/sap/EnterpriseConnect.java @@ -217,7 +217,20 @@ public void setValue(String parameterName, IGxJSONAble value) String key = (String)keys.next(); int jcoType = jStruct.getMetaData().getType(key); - if( jObj.get(key) instanceof String ) + if (jcoType == JCoMetaData.TYPE_BYTE) + { + if ( jStruct.getMetaData().getLength(key) <= 4) + { + jStruct.setValue(key, jObj.getInt(key)); + } + else if ( jStruct.getMetaData().getLength(key) <= 8) + { + jStruct.setValue(key, jObj.getLong(key)); + } + else + jStruct.setValue(key, jObj.getString(key).getBytes()); + } + else if( jObj.get(key) instanceof String ) { jStruct.setValue(key, jObj.getString(key)); }