Skip to Content
0
May 24 at 07:41 AM

SAP CAP Java: Bug in CQNParser

155 Views

Wanted to report a bug. Not sure if this is the right place, but couldn't find another place to report this.

I'm using the CQN parser in CAP Java.

I have a CQN generated by a Fiori Elements application, so I assume it was generated correctly.

This is the query:

 {"SELECT":{"from":{"ref":["MainService.SalesOrders"]},"count":true,"columns":[{"ref":["ID"]},{"ref":["VBELN"]},{"ref":["AUART"]},{"ref":["VKORG"]},{"ref":["VTWEG"]},{"ref":["SPART"]},{"ref":["SOLDTO"]},{"ref":["SHIPTO"]},{"ref":["IsActiveEntity"]},{"ref":["HasActiveEntity"]}],"where":[{"ref":["IsActiveEntity"]},"is",{"val":false},"or",{"ref":["SiblingEntity","IsActiveEntity"]},"is","null"],"orderBy":[{"ref":["ID"]},{"ref":["IsActiveEntity"]}],"limit":{"rows":{"val":30}}}}

I converted this query to a string and then tried parsing it back to CQN as follows:

CqnSelect myCqn = context.getCqn();
String cqnString = myCqn.toString();
CqnSelect = Select.cqn(cqnString);

This code results in the following error:

ChangeSet 7 as cancelled: Unexpeceted token "false" at position 2. Expecting "null". (service 'MainService', event 'READ', entity 'MainService.SalesOrders')

However, this "false" at position 2 {"ref":["IsActiveEntity"]},"is",{"val":false}, is exactly as the application originally generated it. I didn't change this at all.