cancel
Showing results for 
Search instead for 
Did you mean: 

URGENT: Illegal Argument Exception for RAW data type

Former Member
0 Kudos

I am getting this error in the following scenario.

I want to save the text fields from an interactive form to SAP through RFC enabled function module. The type in the model and controller is byte[]. I have converted the string attribute from view to save to the model. But the model dictionary in Web Dynpro project (model) has this type as Binary (meta data model through EFC). The type in SAP is RAW. I am going nuts since a week to solve this.

IS this a bug? I am using NW04s - SP12. and NWDS 7.0.9

<b>Exception Details:</b>

The initial exception that caused the request to fail, was:

java.lang.IllegalArgumentException

at com.sap.dictionary.runtime.DdTypeBinary.format(DdTypeBinary.java:60)

at com.sap.dictionary.runtime.DdTypeBinary.toString(DdTypeBinary.java:64)

at com.sap.tc.webdynpro.clientserver.data.DataContainer.doFormat(DataContainer.java:1405)

at com.sap.tc.webdynpro.clientserver.data.DataContainer.getAndFormat(DataContainer.java:1098)

at com.sap.tc.webdynpro.clientimpl.xdp.renderer.data.XfdRenderer.renderAttributes(XfdRenderer.java:370)

... 41 more

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Issue with the RAW data types is resolved now. I have changed the data type of the field into String in the dictionary (web dynpro).. I have changed the corresponding getters and setter functions from byte[] to string. And everything working fine now. I got the Illegal Argument exception initially because I was trying to display the binary data type fields on the adobe form or view which I am not supposed to do.

Also it is better to create separate view attributes in the context to get the values rather than mapping the model attributes directly in the form or view.

Thank you one and all.

Regards

Vasu