on 02-27-2006 11:38 AM
Hi,
After creating the model and calling it I get error like this:
java.lang.ClassCastException: com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCException: List must contain AbstractList (ProxyList) of Type , not of !
Here's the code:
StringTokenizer tok = new StringTokenizer(abapCode, "n");Zselect.Zselect_List selectList = new Zselect.Zselect_List();while (tok.hasMoreTokens()) { Zselect line = new Zselect(); line.setText(tok.nextToken().trim()); selectList.addZselect(line);}wdContext.nodeZ_Rfc_Fetch_Data_Input().currentZ_Rfc_Fetch_Data_InputElement().modelObject().setSelect(selectList); // this is the line it complains aboutwdContext.nodeZ_Rfc_Fetch_Data_Input().currentZ_Rfc_Fetch_Data_InputElement().modelObject().setColumn_Header(false);
This used to work in SP14, but since updating to SP15 I'm getting this error.
Any help appreciated!
Regards,
Jari Pakarinen
Jari,
Very strange, code looks ok and should work.
However, as a workaround you may try:
StringTokenizer tok = new StringTokenizer(abapCode, "n");
Z_Rfc_Fetch_Data_Input query =
wdContext
.nodeZ_Rfc_Fetch_Data_Input()
.currentZ_Rfc_Fetch_Data_InputElement()
.modelObject();
while (tok.hasMoreTokens())
{
Zselect line = new Zselect();
line.setText(tok.nextToken().trim());
query.addRelatedModelObject("Select", line);
}
query.setColumn_Header(false);
Does this version works for you?
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Valery,
Same error after your changes.
This worked in SP14. Nothing else has changed.
Zselect_List extends com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCList
and DynamicRFCList extends com.sap.aii.proxy.framework.core.AbstractList
so everything should be ok here.
Do you know what the Type and mean here ?
Thanks,
Jari
Hi,
You are trying to set the "Select" not the "Select_List".
And also there is no need for model object at all to set the input paramters. Create an instance of the input elementm, bind it and then the set the input parameters.
Thanks and regards
RB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Code again:
StringTokenizer tok = new StringTokenizer(abapCode, "n");
Zselect.Zselect_List selectList = new Zselect.Zselect_List();
while (tok.hasMoreTokens()) {
Zselect line = new Zselect();
line.setText(tok.nextToken().trim());
selectList.addZselect(line);
}
wdContext.nodeZ_Rfc_Fetch_Data_Input().currentZ_Rfc_Fetch_Data_InputElement().modelObject().setSelect(selectList); // this is the line it complains about
wdContext.nodeZ_Rfc_Fetch_Data_Input().currentZ_Rfc_Fetch_Data_InputElement().modelObject().setColumn_Header(false);
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 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.