PACKAGE BODY Schedule
PROCEDURE TASKJOBENTRY(PTASKID IN TTASKID)
SELECT F.ID, F.WHAT
FROM SMCONTROLTASKS T, SSCONTROLFUNCTIONS F
WHERE F.ID = T.FNID;
SmAutoExecMA(:pTaskID);
SELECT A.ID FROM SMDOCUMENTS D, SMAUCTIONS A
WHERE D.DOCTYPE = 'MA'
AND D.DOCTYPE = A.DOCTYPE
AND D.ID = A.ID
AND SYSDATE BETWEEN A.DATEBEGIN AND A.DATEEND
AND D.DOCSTATE = 2;
SELECT A.ID FROM SMDOCUMENTS D, SMAUCTIONS A
WHERE D.DOCTYPE = 'MA'
AND D.DOCTYPE = A.DOCTYPE
AND D.ID = A.ID
AND A.DATEEND <= SYSDATE
AND D.DOCSTATE = 3;