You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Need Groovy script to avoid duplicate PO number within a Business unit

edited Mar 12, 2026 8:24AM in Order Management

Summary:

The requirement is to display a message if there is a duplicate Customer PO number is Entered within a Business unit.It is ok if the same PO exist in different Business unit.

I used the below groovy from an Oracle doc that restrict Across BU, how to modify the code to restrict within a BU.

++++

import oracle.apps.scm.doo.common.extensions.ValidationException;

String customerPONumber = header.getAttribute("CustomerPONumber");
String OrderNumber = header.getAttribute("OrderNumber");

if (customerPONumber == null || customerPONumber.trim().isEmpty() )
{
throw new ValidationException("Enter the PO number");
}

def vo = context.getViewObject("oracle.apps.scm.doo.processOrder.publicModel.partyMerge.view.HeaderPVO");

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!