Hi everyone.
We are using IFS Applications 8. I would like to automatically send an email when the expiration date of certain products is less than 60 days away.
We have already developed a PL/SQL procedure that queries this data. Now, we want this procedure to be triggered every day at 8 PM. If the procedure returns any results, an email should be sent to the relevant recipients.
We are considering a few approaches such as:
-
Scheduling the procedure using Database Task or Scheduled ReportT
-
Trigger an existing Event Action
Could you please advise which of these is more appropriate or commonly used in IFS8 for similar automation?
We want to make sure we’re aligning with IFS standards as much as possible.
Thanks in advance!
PROCEDURE Send_Expiry_Alert_364_365 IS
v_message VARCHAR2(32767);
BEGIN
v_message := 'The expiration date of the following products will be within 60 days:' || CHR(10);
FOR rec IN (
SELECT
part_no,
ifsapp.inventory_part_api.get_description(contract, part_no) AS descp,
expiration_date
FROM
ifsapp.inventory_part_in_stock
WHERE
part_no IN ('SRF0-000000364', 'SRF0-000000365')
AND expiration_date IS NOT NULL
AND expiration_date <= TRUNC(SYSDATE) + 60
)
LOOP
v_message := v_message ||
CHR(10) || '- ' || rec.part_no || ' | ' || rec.descp || ' | Son K.T: ' || TO_CHAR(rec.expiration_date, 'DD.MM.YYYY');
END LOOP;
/* Client_SYS.Add_Info(v_message);*/
END Send_Expiry_Alert_364_365;








