One of the small irritations of Maximo is the need to constantly select the storeroom for PR/PO Lines, even though it seems like Maximo ought to be able to figure it out for you. This little crossover domain will automatically populate the ‘Location’ field based on (a) the default storeroom for the PR/PO site and (b), if unable to determine, then the storeroom that has the greatest quantity on hand.
First, set up the domain as follows.
1. Navigate to the Domains application (Main Menu > System Configuration > Platform Configuration > Domains).
2. Click the ‘New Domain’ button, then select ‘New Crossover Domain’.
3. In the ‘Crossover Domain’ section, click the ‘New Row’ button. Fill in all applicable fields.
Domain: POPRLINELOC
Description: Default Storeroom for Storeroom PR/PO Lines
Object: INVENTORY
Validation Where Clause (as one line): inventoryid = (SELECT TOP 1 inventory2.inventoryid FROM inventory inventory2 LEFT OUTER JOIN invbalances ON inventory2.itemnum = invbalances.itemnum AND inventory2.itemsetid = invbalances.itemsetid AND inventory2.[location] = invbalances.[location] LEFT OUTER JOIN [locations] ON locations.[type] = 'STOREROOM' AND inventory2.[location] = locations.[location] AND locations.siteid = :siteid WHERE inventory2.itemnum = :itemnum ORDER BY ROW_NUMBER() OVER(ORDER BY COALESCE(locations.isdefault, 0) DESC, COALESCE(NULLIF(COALESCE(NULLIF(inventory2.binnum, invbalances.binnum), '1'), NULLIF(inventory2.binnum, invbalances.binnum)), '0') DESC, COALESCE(invbalances.curbal, 0) DESC))
NOTE: This SQL is a bit longer than necessary because it is designed to return the best option for ‘Bin Location’ as well as the storeroom. Since the bin location is not specified on the PR or PO line, full implementation of this functionality is beyond the scope of these instructions. However, the SQL will work with no significant performance cost.
4. In the ‘Crossover Fields’ section, click the ‘New Row’ button. Fill in all applicable fields.
Source Field: LOCATION
Destination Field: STORELOC
Accept NULL Value: Checked
No Overwrite: Unchecked
5. Click the ‘OK’ button.
Then add the domain to the PRLINE and POLINE objects in the ‘Database Configuration’ application.
1. Navigate to the Database Configurationapplication (Main Menu > System Configuration > Platform Configuration > Database Configuration).
2. Filter for the PRLINE object and open it.
3. Navigate to the ‘Attributes’ tab, expand the filters, and filter for the ITEMNUM attribute.
4. Expand the attribute details and specify populate the ‘Domain’ field with the domain that you created in the previous step (POPRLINELOC).
5. Repeat steps 2 through 4, this time for the POLINE object.
6. Return to the ‘List View’ tab.
7. From the ‘Select Action’ menu, select ‘Apply Configuration Changes’.
8. Click the ‘Start Configuring the Database’ button.
9. Click the ‘OK’ button to confirm that the process has started.
10. Click the ‘OK’ button to return to the application. You may need to wait a few minutes for database configuration to finish before the change will be applied.
Comments