on 06-09-2011 6:45 PM
Hi, Experts:
My environment is Netweaver CE 7.1, and NWDS version is 7.1.0.081107100357. I have created a component to use Adaptive RFC2 model-BAPI_MATERIAL_GET_DETAIL, and code as below:
try
{
MaterialListModel materialListModelModel = new MaterialListModel();
Bapi_Material_Get_Detail_Input bapi_Material_Get_Detail_Input = new Bapi_Material_Get_Detail_Input(materialListModelModel);
// Bapi_Material_Get_Detail_Output output = new Bapi_Material_Get_Detail_Output(materialListModelModel);
// Bapimatdoa material_General_Data = new Bapimatdoa(materialListModelModel);
// output.setMaterial_General_Data(material_General_Data);
bapi_Material_Get_Detail_Input.setMaterial(wdContext.currentSearchElement().getMaterial());
wdContext.nodeBapi_Material_Get_Detail_Input().bind(bapi_Material_Get_Detail_Input);
wdContext.currentBapi_Material_Get_Detail_InputElement().modelObject().execute();
// for(int i = 0; i < wdContext.nodeMaterial_General_Data().size(); i++)
// {
// //IMaterial_DetailElement MatDetail = wdContext.createMaterial_DetailElement();
// //IMaterial_General_DataElement MatData = wdContext.currentMaterial_General_DataElement();
// //MatDetail.setBase_Uom("PA");
//// MatDetail.setBase_Uom(MatData.getBase_Uom());
//// MatDetail.setBasic_Matl(MatData.getBasic_Matl());
//// MatDetail.setMatl_Desc(MatData.getMatl_Desc());
//// MatDetail.setMatl_Group(MatData.getMatl_Group());
//// MatDetail.setMatl_Type(MatData.getMatl_Type());
// //wdContext.nodeMaterial_Detail().addElement(MatDetail);
wdComponentAPI.getMessageManager().reportSuccess(wdContext.currentMaterial_General_DataElement().getMatl_Desc());
// }
wdContext.nodeOutput().invalidate();
}
catch(ARFC2ModelExecuteException e)
{
wdComponentAPI.getMessageManager().reportException(e.getMessage());
}
Once I run the application, the error as below:
com.sap.tc.cm.base.exception.BaseModelRuntimeException: Class 'java.lang.String' of new attribute value is not assignment compatible for attribute 'Emptiesbom' of type 'boolean' in model class 'com.sap.demo.wdrfc2.materiallistmodel.Bapimatdoa'
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)
... 83 more
As my understanding, the field Emptiesbom is Char 1 in R/3 system, then after import to NWDS, it's changed to boolean type, so how can I change the field type in NWDS's model structure, or it's belong to the NWDS bug?
Thanks in advanced.
Finished`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Were you able to resolve this issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.