cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_EQUI_GETDETAIL issue

former_member192766
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

former_member192766
Participant
0 Kudos

Hi,

Thanks for your good answer.

The attribute is indeed of type char length 1, the domain name is X with description Yes/No (X/).

The domain is also of type char length 1 but the attribute becomes boolean in Web Dynpro.

Thanks a lot.

Regards,

Ridouan

Former Member
0 Kudos

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

former_member192766
Participant
0 Kudos

Hi Raghu,

Thanks for your quick answer.

I didn't mention that I do not use this attribute.

The attribute is just got imported with the Model.

Regards,

Ridouan

Former Member
0 Kudos

Hi,

Again you create a model and while creating the model you uncheck this attribute.

Regards,

Sunaina Reddy T

former_member192766
Participant
0 Kudos

Hi,

The attribute is a member of a structure, I can not exclude these attribute while importing/creating an Adaptive RFC 2 Model.

I do not bind the mentioned attribute, I don't need these attribute but it's part of the structure.

Thanks,

Ridouan