You are here:
Lookup Objects and How They Work
A lookup object is a lightweight version of a regular business object. Use lookup objects to get access to a limited set of properties from another business object from another module, without loading the business object.
Required Editions
Unlike a regular business object, a lookup object doesn't contain any nested objects or list objects.For example, in an order business object (module: Order), some lookup objects are specified. These lookup objects can be used to obtain the simple properties for different customers associated with the order, such as the orderer, the delivery recipient, and the broker.
BusinessObject(BoOrder)
|---Simple Properties
|---Nested Objects
|---Lookup Objects
|---luOrderer (luOrderer)
|---luDeliveryRecipient (luCustomer)
|---luBrokerCustomer (luCustomer)
|---luOwner (luUser)
|---luResponsible (luUser)
|---List Objects
|---Methods
|---Validations
These lookup objects are defined in another app, the BusinessPartner app. If a user performs a lookup that returns a PKey for an orderer, this PKey indicates the lookup object that returns the properties for the orderer.
| Available in: Enterprise, Performance, and Unlimited Editions |
How Lookup Objects Work
A lookup object is declared in a business object. For example, a lookup object called luOrderer is declared in the BoOrder contract:
<ObjectLookups>
<ObjectLookup name="luOrderer" objectClass="LuCustomer" dataSourceProperty="ordererPKey" lookupProperty="pKey" loadMode="LoadImmediate"/>
<ObjectLookup name="luDeliveryRecipient" objectClass="LuCustomer" dataSourceProperty="deliveryRecipientPKey" lookupProperty="pKey" loadMode="LoadImmediate"/>
<ObjectLookup name="luBrokerCustomer" objectClass="LuCustomer" dataSourceProperty="brokerCustomerPKey" lookupProperty="pKey" loadMode="LoadImmediate"/>
</ObjectLookups>
luOrderer associates the attribute ordererPKey from the business object's data source with the lookup attribute, pKey. The LU contract in the Customer module, LuOrderer, defines the luOrderer attribute. luOrderer defines a list of simple properties of an orderer, which are queried from the LU data source, LU_Orderer_DS. These simple properties are:
<SimpleProperties>
<SimpleProperty id="true" name="pKey" type="DomPKey" dataSourceProperty="pKey" />
<SimpleProperty name="name" type="DomBpaName" dataSourceProperty="name" />
<SimpleProperty name="hitClosedListing" type="DomBool" dataSourceProperty="hitClosedListing" />
<SimpleProperty name="collectClosedListing" type="DomBool" dataSourceProperty="collectClosedListing" />
</SimpleProperties>
The identifying property is pKey, which has the previously mentioned value, ordererPKey from the definition of luOrderer in the business object <ObjectLookups> element. This pKey is used to retrieve the correct customer data via LU_Orderer_DS.
| Attribute | Description | Required |
|---|---|---|
| name | Specifies the unique name of the lookup object. | Yes |
| objectClass | Specifies the class that the lookup object is based. | Yes |
| dataSourceProperty | Specifies the name of the referenced property in the data source of the business object. | Yes |
| lookupProperty | Specifies the referenced object lookup used to load the nested object. | Yes |
| loadMode |
|
Yes |

