FUNCTION GET_MODE_ASSGINMENT_F(P_ASSIGNMENT_ID NUMBER, P_DATE DATE)
RETURN VARCHAR2 AS
lb_correction BOOLEAN;
lb_update BOOLEAN;
lb_update_override BOOLEAN;
lb_update_change_insert BOOLEAN;
lc_dt_ud_mode varchar2(200);
L_ERROR varchar2(2000);
BEGIN
dt_api.find_dt_upd_modes
( p_effective_date => P_DATE,
p_base_table_name => 'PER_ALL_ASSIGNMENTS_F',
p_base_key_column => 'ASSIGNMENT_ID',
p_base_key_value => P_ASSIGNMENT_ID,
-- Output data elements
-- --------------------------------
p_correction => lb_correction,
p_update => lb_update,
p_update_override => lb_update_override,
p_update_change_insert => lb_update_change_insert );
IF ( lb_correction = TRUE )
THEN lc_dt_ud_mode := 'CORRECTION';
end if;
IF ( lb_update = TRUE )
THEN lc_dt_ud_mode := 'UPDATE';
END IF;
IF ( lb_update_override = TRUE )
THEN lc_dt_ud_mode := 'UPDATE_OVERRIDE';
end if;
IF (lb_update_change_insert = TRUE)
THEN lc_dt_ud_mode := 'UPDATE_CHANGE_INSERT';
end if;
RETURN lc_dt_ud_mode;
EXCEPTION WHEN OTHERS THEN
L_ERROR := SQLERRM;
END;
No comments:
Post a Comment