1 PACKAGE ARP_FLEX AUTHID CURRENT_USER AS
2 /* $Header: ARPLFLXS.pls 115.5 2002/11/20 01:56:40 dbetanco ship $ */
3
4 /*---------------------------------------------------------------------------+
5 | PUBLIC HANDLES |
6 | These handles are automatically initialised during package startup |
7 | |
8 +---------------------------------------------------------------------------*/
9
10 -- General Ledger Accounts Structure for current SOB
11 function gl return number;
12
13 -- Sales Tax Location Flexfield for current SOB
14 function location return number;
15
16
17 /*---------------------------------------------------------------------------+
18 | PUBLIC FUNCTIONS |
19 +---------------------------------------------------------------------------*/
20
21 function setup_flexfield( application_id in number,
22 flex_code in varchar2,
23 structure_id in number ) return number;
24
25
26 /*---------------------------------------------------------------------------+
27 | PUBLIC FUNCTION |
28 | expand |
29 | |
30 | DESCRIPTION |
31 | |
32 | Generate a flexfield lexical string given a flexfield handle, expanding |
33 | keyword tokens. |
34 | |
35 | TOKEN EXPANSION - Tokens are marked with a % either side of the word |
36 | |
37 | COLUMN - Name of Column in Code Combinations table |
38 | NUMBER - Segment Number |
39 | QUALIFIER - Segment Qualifier(s) |
40 | POSITION - Position of segment within flexfield structure |
41 | |
42 | TOKEN MODIFIERS - If any token is prefixed with a modifier then either |
43 | the previous or last token is fetched. |
44 | |
45 | NEXT - Gets information for next physical segment |
46 | PREVIOUS - Gets information for the previous segment |
47 | |
48 | EXAMPLE |
49 | ar_flex.expand( ar_flex.gl, ' || ', 'cc.%COLUMN%' ) |
50 | -- cc.SEGMENT1 || cc.SEGMENT2 || cc.SEGMENT3 |
51 | |
52 | ar_flex.expand( ar_flex.gl, ' and ', 'cc.%COLUMN% = t%NUM%.SEGMENT') |
53 | -- cc.SEGMENT1 = t1.SEGMENT and |
54 | cc.SEGMENT2 = t2.SEGMENT and |
55 | cc.SEGMENT3 = t3.SEGMENT |
56 | |
57 | KNOWN BUGS: |
58 | Future versions of replicate will support segment qualifiers |
59 | Expansion is CASE sensitive, all token must be in upper case. |
60 | |
61 | MODIFICATION HISTORY |
62 | 22-Mar-93 Nigel Smith Created. |
63 | |
64 | |
65 +---------------------------------------------------------------------------*/
66
67
68
69 function expand( flex_handle in number,
70 separator in varchar2,
71 word in varchar2 ) return varchar2;
72
73 function expand( flex_handle in number,
74 qualifiers in varchar2,
75 separator in varchar2,
76 word in varchar2 ) return varchar2;
77
78
79 function active_segments( flex_handle in number ) return number ;
80
81 end ARP_FLEX ;