- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
-- Data Blocks
-- TYPE: TRIGGER
-- OBJECT: BUTTONS
-- NAME: WHEN-RADIO-CHANGED
DECLARE
BEGIN
IF :buttons.instalments = 'I' THEN
create_instalments; -- Payment by instalment selected
ELSIF :buttons.instalments = 'F' THEN
check_instalments; -- Full payment selected
END IF;
END;
-- Meanwhile in Program Units
PROCEDURE create_instalments IS
BEGIN
INSTALMENT_PLAN_PKG.CREATE_CLIENT_PLAN(
:header.astpd_client_group_id, -- p_client_id
:header.revenue_type_id, -- p_revenue_type
:header.assessment_year, -- p_assessment_year );
END;
-- Meanwhile in Packages (Hello Oracle)
PROCEDURE CREATE_CLIENT_PLAN( /*some parameters here*/) IS
/*some variable and cursor declarations here*/
BEGIN
FOR r_plan IN c_plan
LOOP
FOR r_plan_options IN c_plan_option(r_plan.plan_id)
LOOP
INSERT INTO CLIENT_PLAN ( /* fields here */)
VALUES (/* stuff here */);
create_client_plan_instalments(/* parameters here and YES there IS another FOR-LOOP-INSERT in proc body*/);
END LOOP; --End of r_plan loop
END LOOP; -- End r_plan_options loop
END;
Комментарии (1) RSS
Добавить комментарий