I created a master script that contains 2 child scripts.
The 1st child script creates a requisition.
The second child script approves the requisition.
The second script uses a database databank to retrieve the requisition number from the database.
SELECT * FROM (
SELECT TO_NUMBER(SEGMENT1) AS LAST_REQ FROM PO_REQUISITION_HEADERS_ALL
ORDER BY CREATION_DATE DESC)
WHERE ROWNUM = 1
The problem is the SQL does not return the most current requisition number. It returns an older number.
If i run the child scripts as stand alone scripts it works.
Why does the sql statement not return the requisition number created in the first child script.?????