Service Manager / Service Center Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

RetrieveChangeList by query instead of by changeID

Honored Contributor Honored Contributor

RetrieveChangeList by query instead of by changeID

[ Edited ]

Hi all,

we are trying to retrieve a list of changes with a certain pattern in the field briefDescription. So far I retrieve changes by changeID, that was never a problem but with a query I keep getting return code 9 (no more records).

Mayby the syntax for that query is still not correct, though I tried several variants.

Setting the changeID to an existing one and leaving the query empty works, leaving changeID empty and entering anything as a query results in return code 9.


My issue is, that i would need something like "briefDescription like '%AUF00125487%', just not in Oracle syntax but in a syntax SM will accept as an "epert query".


To get an idea of what I am trying to:


publicstaticvoid main(String[] args) {

int returnCode = 0;


String changeID;

changeID  =


String query;

//query = "";

//query = "update.time>'08/01/2013 06:36:03' and update.time < '08/28/2013 06:37:03'";

query =


//query = " index( 'AUF00125487', brief.description)>0";



try {

long start = System.currentTimeMillis();



RetrieveChangeList rcl =

new RetrieveChangeList();

MyChangeList mcl = rcl.myQueryChangeList(changeID, query);

String[] statusName = mcl.getStatus();

Date[] wunschtermin = mcl.getTargetDate();

String stringTermin = wunschtermin[0].toString();"statusName=" + statusName[0].toString());"stringTermin=" + stringTermin);

long stop = System.currentTimeMillis();"Reading from source took " + (stop - start) + "ms");"Return Code: " + returnCode);


catch (RemoteException re) {

returnCode = 1;


catch (NamingException ne) {

returnCode = 1;


catch (Exception e) {

returnCode = 1;



Any ideas where I need to look for the problem?

Best regards