on 03-22-2010 10:30 AM
Hello,
I need some input (preferably code sample) of how to fetch non-qualified and qualified record data from MDM
non-qualifier : country (lookup)
qualifier: date
I want all main table records where the country is not null
I guess I need a free form search with picklist?
Thank you
Best Regards
Olof
Hi Olof,
Please refer similar thread as given below:
Working with Qualified Look-ups:
http://help.sap.com/saphelp_mdm550/helpdata/en/46/2b62d0f2b54f07e10000000a114a6b/content.htm
Refer page 4 and 5,
Hope this helps...
Regards,
Mandeep Saini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mandeep,
thank you for the reply, I've read the links you sent, but still not able to get it right
This below gives no records in return. I wan't all records that have the qualifier and non-qualifer.
Thanks.
// the main table, hard-coded
TableSchema tableSchema = schema.getTableSchema("Products");
Search objSearch = new Search(tableSchema.getTable().getId());
// Qualified lookup field
FieldId qualifiedLookupField = getFieldID("Products", "reg_countries_test");
// Gets the schema of the qualified table
TableSchema qualifiedTableSchema = getSchema().getTableSchema("reg_countries");
//Gets the lookup value of the corresponding value
SearchConstraint searchConstraint = null;
SearchDimension searchDimension = new QualifierSearchDimension(qualifiedTableSchema.getFieldId("Registered_Country"),qualifiedLookupField);
// I Wan't all records that have qualifier / non-qualifier
searchConstraint = new BooleanSearchConstraint(false);
SearchParameter searchParameter = new SearchParameter(searchDimension, searchConstraint);
objSearch.addSearchItem(searchParameter);
ResultDefinition resultDef = new ResultDefinition(tableSchema.getTable().getId());
resultDef.setSelectFields(tableSchema.getFieldIds());
RetrieveLimitedRecordsCommand limitingCommand = null;
try {
limitingCommand = new RetrieveLimitedRecordsCommand(getConnections());
limitingCommand.setResultDefinition(resultDef);
limitingCommand.setSearch(objSearch);
limitingCommand.setSession(getRepositorySession());
limitingCommand.execute();
} catch (SessionException e) {
} catch (CommandException ce) {
}
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.