Creating an LOV:
Select the LOVs node in the Object Navigator and then click on the Create icon. This will opens the New LOV dialog box along with the following elements:
The Query Text
When you create a record group at the similar time as the LOV that is the default action, then the new record group will be query-based. On that way, it will execute a SQL SELECT statement to populate the group from the database.
The query text in which you supply in the New LOV dialog box describes the following:
- The query on that the new record group will be based
- Possibly, the return items for values in the LOV (This can be defined by the INTO clause but you can supply this information more conveniently later)
The query text must involve a SELECT and FROM clause. Optional clauses involve the following:
- INTO
- WHERE
- GROUPS BY
- ORDERS BY
Query Text Example
The following query text sample shows sales people's IDs, names and there departments from the S_EMP table. (The Department numbers are for display purposes only and are not returned through the LOV)
SELECT last_name, id, dept_id
FROM s_emp
WHERE title = 'Sales Representative'
ORDER BY last_name
Query Text Example
The given New LOV Query Text retrieves and shows the names and IDs of customers. A Receiving items will be defined for the LOV later.
SELECT name, id
FROM s_customer
ORDER BY name