on 05-22-2008 3:28 PM
Someone know how can i make the next query using the MDM Api? How can i make this sentence using classes as FreeFormTableParameters, FreeFormFieldParametes...?
SELECT FIELD1, FIELD2 FROM PRODUCTS WHERE FIELD1="HELLO"
I dont speach english good... Sorry about that.
Thanks!
Hi Giancarlo,
something like this:
TableId mainTableId = new TableId(1);
// Define the result
ResultDefinition rd = new ResultDefinition(mainTableId);
// select all records
Search search = new Search(mainTableId);
// retrieve the records
RetrieveLimitedRecordsCommand limitingCommand = new RetrieveLimitedRecordsCommand(connections);
limitingCommand.setSession(sessionId);
limitingCommand.setResultDefinition(rd);
limitingCommand.setSearch(search);
//limitingCommand.setPageSize(10);
try {
limitingCommand.execute();
} catch (CommandException e) {
e.printStackTrace();
return;
}
System.out.println("Record count is " + limitingCommand.getRecords().getCount());
// To get fields....
Record[] rec= limitingCommand.getRecords().getRecords();
For i to rec.length
RecordId objrecId = taxoSubClassRecs<i>.getId();
Hope this help you.
Regards,
Vito
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Giancarlo,
please, read this post:
Here you can find how to get connections and sessionID.
Besides, you can read about MDM Java API here:
http://help.sap.com/javadocs/MDM/SP06/overview-summary.html
Hope this help.
Regards,
Vito
User | Count |
---|---|
85 | |
10 | |
9 | |
9 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.