You are on page 1of 7

MODULE:

Oracle Purchasing.

PROBLEM STATEMENT
How to setup the default where clause on a form? Example. Receiving Form?

SOLUTION
In this example, attempt is made to limit the results to the V1-New York City deliver to location only and always.

1. Confirm the results block

Junaid Iftikhar Ahmed | Sr.Oracle Solution Architect & PM| BCS-SE, MBA-FIN, SCM-EXP

Use Help/Diagnostics/Examine to locate the form record block that is showing the results. In this case - the form block is RCV_TRANSACTIONS.

2. Define Personalization
While in the form - choose Help/Diagnostics/Custom Code/ Personalize from the top text menu.

Junaid Iftikhar Ahmed | Sr.Oracle Solution Architect & PM| BCS-SE, MBA-FIN, SCM-EXP

Choose the condition of 'When New Form Instance'.

Junaid Iftikhar Ahmed | Sr.Oracle Solution Architect & PM| BCS-SE, MBA-FIN, SCM-EXP

In the actions Sequence is 10 Type is Property Object Type - Block Target Object - RCV_TRANSACTIONS (The block from earlier) Property Name - DEFAULT_WHERE

Junaid Iftikhar Ahmed | Sr.Oracle Solution Architect & PM| BCS-SE, MBA-FIN, SCM-EXP

Now, choose Get Value button. This will actually pull in the default where clause for the form, as it is currently, image above. This is the current where clause in the form found from pressing the 'Get Value' button. receipt_source_code IN ('INVENTORY','INTERNAL ORDER','VENDOR') and ((RCV_ENTER_RECEIPTS_V.SOURCE_TYPE_CODE = 'VENDOR' OR RCV_ENTER_RECEIPTS_V.SOURCE_TYPE_CODE = 'ASN' OR RCV_ENTER_RECEIPTS_V.SOURCE_TYPE_CODE = 'INTERNAL')) and ((NVL(RCV_ENTER_RECEIPTS_V.closed_code,'OPEN') NOT IN ('CLOSED', 'CLOSED FOR RECEIVING')))

Now, confirm the field name in the RCV_ENTER_RECEIPTS_V. For this example, deliver_to_location_id is going to be used. Its possible to use the Help/Diagnostics/Examine as well to find out the value for the deliver_to_location_id that should be used.
Junaid Iftikhar Ahmed | Sr.Oracle Solution Architect & PM| BCS-SE, MBA-FIN, SCM-EXP

Modify the default where clause to include the deliver_to_location_id. receipt_source_code IN ('INVENTORY','INTERNAL ORDER','VENDOR') and deliver_to_location_id = 204 and ((RCV_ENTER_RECEIPTS_V.SOURCE_TYPE_CODE = 'VENDOR' OR RCV_ENTER_RECEIPTS_V.SOURCE_TYPE_CODE = 'ASN' OR RCV_ENTER_RECEIPTS_V.SOURCE_TYPE_CODE = 'INTERNAL')) and ((NVL(RCV_ENTER_RECEIPTS_V.closed_code,'OPEN') NOT IN ('CLOSED', 'CLOSED FOR RECEIVING')))

Input the new DEFAULT_WHERE clause - seen above. - Save the personalization - Close the form completely

Junaid Iftikhar Ahmed | Sr.Oracle Solution Architect & PM| BCS-SE, MBA-FIN, SCM-EXP

Test and find that the default where clauses is properly invoked.

Junaid Iftikhar Ahmed | Sr.Oracle Solution Architect & PM| BCS-SE, MBA-FIN, SCM-EXP

You might also like