Hi, I'm trying to device a query that will find a result based on three parameters.
1, A SUBSTRING from the Field "Name"
2, A EQUAL from the field "Customer_Number"
3, all should have the type "Customer_Type" (which is a lookup type)
The problem I have is that I want to do a "OR" between the 1 and 2, and a "AND" between 1-2 and 3. Basically (1 || 2) && 3 . Can this be done, and if so how?
So far my query looks like this:
<?xml version="1.0" encoding="UTF-8" ?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <pns:searchRecords xmlns:pns='urn:MDMSearchRecordsVi'> <ns1:query xmlns:ns1='urn:MDMSearchRecordsVi' xmlns:pns='urn:com.sap.mdm.ws.types.search'> <pns:recordCriteria> <pns:dataElementCriteria> <pns:fieldCode>Name</pns:fieldCode> <pns:simpleValueCriteria> <pns:expressionOperator>SUBSTRING</pns:expressionOperator> <pns:unit> </pns:unit> <pns:value>Acme</pns:value> </pns:simpleValueCriteria> </pns:dataElementCriteria> <pns:dataElementCriteria> <pns:fieldCode>Registration_Number</pns:fieldCode> <pns:simpleValueCriteria> <pns:expressionOperator>EQUAL</pns:expressionOperator> <pns:unit> </pns:unit> <pns:value>5560435413</pns:value> </pns:simpleValueCriteria> </pns:dataElementCriteria> <pns:dataElementCriteria> <pns:fieldCode>Customer_Type</pns:fieldCode> <pns:logicOperator> </pns:logicOperator> <pns:lookupValueCriteria> <pns:logicOperator> </pns:logicOperator> <pns:recordIdentifierCriteria> <pns:autoID>0</pns:autoID> <pns:recordId>2</pns:recordId> </pns:recordIdentifierCriteria> <pns:tableCode>Customers</pns:tableCode> </pns:lookupValueCriteria> <pns:taxonomyFieldCode> </pns:taxonomyFieldCode> </pns:dataElementCriteria> <pns:tableCode>Customers</pns:tableCode> </pns:recordCriteria> <pns:resultDefinition> <pns:fieldDefinition> <pns:fieldCode>Name</pns:fieldCode> <pns:loadAllAttributes>false</pns:loadAllAttributes> <pns:lookupLevel>0</pns:lookupLevel> </pns:fieldDefinition> <pns:fieldListType> </pns:fieldListType> <pns:languageFilter>English [US]</pns:languageFilter> <pns:pageNumber>0</pns:pageNumber> <pns:pageSize>10</pns:pageSize> <pns:retrieveRemoteKeys> <pns:retrieveRemoteKeys>false</pns:retrieveRemoteKeys></pns:retrieveRemoteKeys> <pns:sortDefinition> </pns:sortDefinition> <pns:tableCode>Customers</pns:tableCode> </pns:resultDefinition> </ns1:query>
Anyone know how to do this?
Edited by: Björn Bergenheim on Jul 25, 2008 3:27 PM