Need to copy Data in Flexfield from PR to PO flexfield
Hi,
I create trigger to copy insert data from PR flexfield to PO flexfield when use auto create function
following this statement
CREATE OR REPLACE TRIGGER "APPS"."UPDATE_FLEXFIELD_PO" AFTER
INSERT OR UPDATE ON PO.PO_HEADERS_ALL FOR EACH Row
DECLARE
V_PO_REQ_ID NUMBER;
V_COUNT_PO_REQ_ID number;
V_SHIP_TO_LOCATION VARCHAR2(240);
BEGIN
select REQ_DISTRIBUTION_ID,count(REQ_DISTRIBUTION_ID)
into V_PO_REQ_ID,V_COUNT_PO_REQ_ID
from po_distributions_all
where po_header_id = :New.PO_HEADER_ID
group by REQ_DISTRIBUTION_ID;
IF(:New.ATTRIBUTE4 IS NULL and V_COUNT_PO_REQ_ID = 1) THEN