oracle form enable_date when_avlidate_item
PROCEDURE enable_date(
p_event VARCHAR2
) IS
BEGIN
IF p_event = 'KEY-LISTVAL' THEN
day_picker.setup('RESET');
day_picker.setup('After current date', :main.disable_date + 1, NULL);
day_picker.show;
ELSIF p_event = 'WHEN-VALIDATE-ITEM' THEN
IF :main.disable_date IS NOT NULL
AND :main.disable_date < :main.enable_date THEN
fnd_message.set_name('FND', 'AUDIT-START END DATE2');
fnd_message.set_token('START', :main.enable_date);
fnd_message.set_token('END', :main.disable_date);
fnd_message.show;
RAISE form_trigger_failure;
END IF;
END IF;
END enable_date;
PROCEDURE disable_date(
p_event VARCHAR2
) IS
BEGIN
IF p_event = 'KEY-LISTVAL' THEN
day_picker.setup('RESET');
day_picker.setup('After current date', NULL, :main.enable_date - 1);
day_picker.show;
ELSIF p_event = 'WHEN-VALIDATE-ITEM' THEN
IF :main.enable_date IS NOT NULL
AND :main.enable_date > :main.disable_date THEN
fnd_message.set_name('FND', 'AUDIT-START END DATE2');
fnd_message.set_token('START', :main.enable_date);
fnd_message.set_token('END', :main.disable_date);
fnd_message.show;
RAISE form_trigger_failure;
END IF;
END IF;
END disable_date;