cancel
Showing results for 
Search instead for 
Did you mean: 

Attribute value is not valid

Former Member
0 Kudos

After executing an RFC, I want to get a table of elements that is passed as the Output.

As soon as I try to get the first element of the Output table, via xxxNode.getElementAt(index), I receive this error:

Attribute value is not valid for attribute 'Flag_Stam_Orig' of model class 'it.prova.mctciat_rfc.checkprintstatus_sr00.Zmctbpm_Rfc_Output_Print_A' 
 
 com.sap.tc.cm.base.model.BaseGenericModelClass.setAttributeValue(BaseGenericModelClass.java:327) 
 
 com.sap.tc.cm.arfc2.model.ARFC2GenericModelClass.unmarshalFromJCoRecord(ARFC2GenericModelClass.java:287) 
 
 com.sap.tc.cm.arfc2.model.ARFC2ModelObjectCollection.doUnMarshalAt(ARFC2ModelObjectCollection.java:97) 
 
 com.sap.tc.cm.arfc2.model.ARFC2ModelObjectCollection.get(ARFC2ModelObjectCollection.java:120) 
 
 com.sap.tc.webdynpro.progmodel.context.ModelElementList.getElement(ElementList.java:1726) 
 
 com.sap.tc.webdynpro.progmodel.context.Node.getElementAtInternal(Node.java:387) 
 
 com.sap.tc.webdynpro.progmodel.context.Node.getElementAt(Node.java:395) 
 
 it.prova.mctciat_rfc_client_man.rfcclientmanagercomp.RFCClientManagerComp.callSpecifiedRFC(RFCClientManagerComp.java:1163)

Before calling .getElementAt(index) I use xxxNode.size() to get the number of returned elements and then I execute a for loop in which I visit all the elements of node XXX.

Can someone help me?

Thank you,

Pietro

Edited by: pietro.m on Dec 3, 2010 2:10 PM

Accepted Solutions (1)

Accepted Solutions (1)

former_member185879
Active Contributor
0 Kudos

Hello Pietro,

1. Check the type of the attribute and try to set the value according to that. that is check whether it is String/Boolean or etc...

2. Clear the Adaptive RFC Cache Once and check

3. Execute the RFC and check what is the value you are getting in that particular attribute?

Regards

Nizamudeen SM

Former Member
0 Kudos

Hi Nizamudeen,

thank you for your reply.

1) I don't know what to check. I've imported the RFC model, created the context nodes bound to the RFC and executed the RFC. I don't call any setter method. I'm only trying to visit the content of the node.

2) I've tried invalidating the cache to no avail

3) The value I'm getting is a CHAR (1) that can take 3 possible values and in java is represented as a string

I'm clueless...

Pietro

former_member185879
Active Contributor
0 Kudos

Hello Pietro,

Can you provide the RFC structures and full exception list also how you are getting that value, can you post that code.

Regards

Nizamudeen SM

Former Member
0 Kudos

I've solved the problem.

At first the attribute generating the error was defined ABAP-side as a custom domain based on CHAR (1) type that allowed only two possible values: "O" or "X". But the ABAP function returned only " " (empty space) or "X".

So we tried to add "O" to the set of the legitimate values, but that did not solve the problem.

Next we got rid of the custom type and custom domain and we defined the parameter as a simple CHAR (1).

That made the problem disappear and, best of all, I can't still figure why. Anyway, the problem is solved and that is all that matters now.

*I'm sorry to say this in a SAP forum, but SAP's approach to type checking sucks really hard.*

It is not possible that the ABAP side does not check types and the Java side raises these kind of errors (and, please note that it is not allowed to change a model type in Java).

Anyway, thank you Nizamudeen for helping me.

Edited by: pietro.m on Dec 7, 2010 9:41 AM

Answers (0)