You are on page 1of 6

Step 1 :

Login as sysadmin
And create subscription for the event.
Navigation : Workflow Administrator Web Applications > Administrator Workflow >
Business Events.
Query the event (Example : oracle.apps.po.autocreate.pocreated) & Click on
Subscription

First time click on Create Subscription Button.


Once created, for further modifications, click on the pencil icon for editing the
subscription.

Enter the subscription details (like Phase, Action type) as shown below.

Click on Next.

Enter the Package.Function name which has the custom logic in PL/SQL Rule
Function column.

Step 2:
Here is the Sample custom hook package with custom logic. Please compile the
same in the corresponding database instance. This will create the Package.Function
mentioned in the above subscription in the database.

Final_Hook_packagecode.sql

This above custom logic inserts a value to attribute1 in po_headers_all


(SUVASUDE_HOOK) and po_lines_all (SUVASUDE_HOOK_lines) table. Also it doubles
the requisition price in PO.

Step 3:

Here is the example to verify the custom logic. Check the requisition price and
autocreate the requisition to PO. And check whether the PO price is doubled the
requisition price. Also check whether the attribute1 in PO headers and PO lines are
populated with the custom values mentioned in the function.
1. Purchasing Responsibility
Requisition Summary > Query the requisition. Check the Requisition Price :
490.

2. Autocreate this requisition line to PO using Autocreate Form.


Purchasing Responsibility > Autocreate > Query the requisition 9518 line #1.
Autocreate to PO.

3. After autocreate this requisition 9518 line #1 to a PO 6760,

4. Check the PO line Price. PO Price is doubled.

5. Check the PO headers Attribute1 value.


Navigation : Help > Diagnostics > Examine.

PO headers > Attribute1 has the value inserted (SUVASUDE_HOOK).

6. Check the PO lines Attribute1 value.


Navigation : Help > Diagnostics > Examine
PO LINES > Attribute1 has the value inserted (SUVASUDE_HOOK_lines).

You might also like