on 08-18-2009 2:24 PM
Dear All,
I am trying to retrieve Equipment detail for an Equipment using Adaptive RFC 2 Model and the BAPI_EQUI_GETDETAILS.
When I try to run the application (call the backend for Bapi execution) I receive the following error message:
com.sap.tc.cm.base.exception.BaseModelRuntimeException: Class 'java.lang.String' of new attribute value is not assignment compatible for attribute 'Read_Curef' of type 'boolean' in model class 'com.sap.demo.mainreq.model.equidetailmodel.Bapi_Itob_Eq_Only'
at com.sap.tc.cm.base.model.BaseGenericModelClass.setAttributeValue(BaseGenericModelClass.java:306)
at com.sap.tc.cm.arfc2.model.ARFC2GenericModelClass.unmarshalFromJCoRecord(ARFC2GenericModelClass.java:287)
at com.sap.tc.cm.arfc2.model.ARFC2GenericModelClass.checkOrInitiateUnMarshalling(ARFC2GenericModelClass.java:205)
at com.sap.tc.cm.arfc2.model.ARFC2GenericModelClass.getRelatedModelObject(ARFC2GenericModelClass.java:402)
at com.sap.tc.cm.arfc2.gci.ARFC2TypedModelClass.getRelatedModelObject(ARFC2TypedModelClass.java:113)
The attribute Read_Curef is of Type Char1 in the backend and is a boolean in the Web Dynpro structure/Model.
Any idea?
Thanks a lot.
Regards,
Ridouan
hi
the attribute which is of type char , when coming to webdynpro it becomes string ,
you can do one thing , the attribute which of type char for rfc , checl the domain type for the attribute
change it also to char , i guess it is some thing as boolean there . may be you can take the help of the abaper
and solve this issue.
converting a string to boolean and assigning will not really help you.
can just need to change the domain type of the attribute and restart the server.
this should solve your problem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have an workaround to convert boolean to string explicitily as follows:-
boolean b = wdContext.currentContextElement.getBoolean();
String s = new Boolean(b).toString();
//assign string to model attribute
wdCotext.currentBapielement().setElement(s);
Regards
Raghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.