1 PACKAGE pqp_gb_tp_extract_functions AUTHID CURRENT_USER AS
2 -- /* $Header: pqgbtpxf.pkh 120.1 2006/02/06 05:49:05 bsamuel noship $ */
3 --
4 --
5 -- GET_CURRENT_EXTRACT_PERSON
6 --
7 -- Returns the ext_rslt_id for the current extract process
8 -- if one is running, else returns -1
9 --
10 FUNCTION get_current_extract_result RETURN NUMBER;
11 --
12 -- GET_CURRENT_EXTRACT_RESULT
13 --
14 -- Returns the person id associated with the given assignment.
15 -- If none is found,it returns NULL. This may arise if the
16 -- user calls this from a header/trailer record, where
17 -- a dummy context of assignment_id = -1 is passed.
18 --
19 --
20 FUNCTION get_current_extract_person
21 (p_assignment_id NUMBER -- context
22 ) RETURN NUMBER;
23 --
24 -- RAISE_EXTRACT_WARNING
25 --
26 -- "Smart" warning function.
27 -- When called from the Rule of a extract detail data element
28 -- it logs a warning in the ben_ext_rslt_err table against
29 -- the person being processed (or as specified by context of
30 -- assignment id ). It prefixes all warning messages with a
31 -- string "Warning raised in data element "||element_name
32 -- This allows the same Rule to be called from different data
33 -- elements.
34 -- Optionally seeded error messages may also be raised by
35 -- passing the error number.
36 --
37 -- usage example.
38 --
39 -- RAISE_EXTRACT_WARNING("No initials were found.")
40 --
41 -- RRTURNCODE MEANING
42 -- -1 Cannot raise warning against a header/trailer
43 -- record. System Extract does not allow it.
44 --
45 -- -2 No current extract process was found.
46 --
47 -- -3 No person was found.A Warning in System Extract
48 -- is always raised against a person.
49 --
50 --
51 --
52 FUNCTION raise_extract_warning
53 (p_assignment_id IN NUMBER -- context
54 ,p_error_text IN VARCHAR2
55 ,p_error_number IN NUMBER DEFAULT NULL
56 ,p_token1 IN VARCHAR2 DEFAULT NULL --added to pass tokens to messages.
57 ,p_token2 IN VARCHAR2 DEFAULT NULL --added to pass tokens to messages.
58 ) RETURN NUMBER;
59 --
60 FUNCTION raise_extract_error
61 (p_business_group_id IN NUMBER -- Context
62 ,p_assignment_id IN NUMBER -- context
63 ,p_error_text IN VARCHAR2
64 ,p_error_number IN NUMBER DEFAULT NULL
65 ,p_token1 IN VARCHAR2 DEFAULT NULL --added to pass tokens to messages.
66 ,p_fatal_flag IN VARCHAR2 DEFAULT 'Y' -- Default it to Y for existing pkgs
67 ) RETURN NUMBER;
68
69 --
70 END pqp_gb_tp_extract_functions;