on 02-23-2011 8:27 PM
Hi experts,
Im developing a mobile application using sap mi 7.1. The point is: Im trying to execute a query on a child node, and it is lauching the following exception :
java.lang.IllegalArgumentException: Character '32' not allowed in GUID
at this line:
rowList = dataFacade.getRows(query)
This is my app code:
public OrderLongTextAccess() {
super();
// SyncBO
sbd = descriptorFacade.getSyncBoDescriptor(Constants.MAM30_001);
// TopRow
rdOrderHeader = sbd.getTopRowDescriptor(); // ORDER_HEADER
// Child
rdOrderLongText = sbd.getRowDescriptor("060"); // ORDER_LONGTEXT
}
OrderLongTextBean orderLongTextBean = null;
Condition condition = null;
Query query = null;
RowList rowList = null;
// Execute Query
query = queryFactory.createQuery(rdOrderLongText, condition);
rowList = dataFacade.getRows(query);
I have tried many ways to solve it without success.
Another way I have tried:
Condition condition = null;
Query query = null;
RowCollection rowCollection = null;
// Execute Query
query = queryFactory.createQuery(rdOrderLongText, condition);
rowCollection = dataFacade.getRows(rdOrderLongText);
if (!Util.isEmpty(rowCollection)) {
MeIterator meIterator = rowCollection.iterator();
but the same Exception is launched at:
MeIterator meIterator = rowCollection.iterator()
Please, anyone that can help me?
Thanks in advance!
Best regards,
Danilo Rossatto
Hi Danilo,
Pay attention to the characteristic of the field , a example is if the field is descripted in DbVisualizer as VARCHAR with column size with 3, but the correct is viewed in MeRepMeta.xml , with the type C "Char" with 1 lenght.
Regards
Gustavo Habermann
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I usually use JQUERY. In there We would have the following example code:
you define the atttributes of the fields you would like to have as return structure
attribute = factory.createAttribute(descriptor.getFieldDescriptor("FIELDNAME"));
in following example the attribute is defined as an array of type JQueryAttribute[]
JQueryCondition cond = factory.createCondition(factory.createAttribute(getDescriptor().getFieldDescriptor("FIELDNAME")),
RelationalOperatorType.EQUALS,
QUERY);
JQueryResult queryresult = dataFacade().executeQuery(factory.createQuery(queryAttributes, cond));
MeIterator it = queryresult.iterator();
for (int i = 0; i < result.length; i++) {
result<i> = getNote((JQueryResultRow)it.next(), attributes);
}
Your NULL Condition is fine - it returns all items.
I Guess you missed the ExecuteQuery..... At least this I can see from your code.
Hope this helps.
Regards,
Oliver
Edited by: Oliver Kaluscha on Feb 23, 2011 10:16 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Oliver,
Tks for your answer.
I have resolved the question. The problem it was with a few datas in my database.
Firstly, i tried to do the way as you said. But in the end i left as it was after some changes in my database.
The query got succesfull without changes at the initial code.
Tks for the suggesttion.
Regards,
Danilo
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.