14: , x_item_number OUT NOCOPY VARCHAR2
15: ) IS
16: l_val BOOLEAN;
17: l_nseg NUMBER;
18: l_seglist fnd_flex_key_api.segment_list;
19: l_segs1 fnd_flex_ext.segmentarray;
20: l_segs2 fnd_flex_ext.segmentarray;
21: l_fftype fnd_flex_key_api.flexfield_type;
22: l_ffstru fnd_flex_key_api.structure_type;
17: l_nseg NUMBER;
18: l_seglist fnd_flex_key_api.segment_list;
19: l_segs1 fnd_flex_ext.segmentarray;
20: l_segs2 fnd_flex_ext.segmentarray;
21: l_fftype fnd_flex_key_api.flexfield_type;
22: l_ffstru fnd_flex_key_api.structure_type;
23: l_segment_type fnd_flex_key_api.segment_type;
24: l_item_number VARCHAR2(32000);
25: l_delim VARCHAR2(1);
18: l_seglist fnd_flex_key_api.segment_list;
19: l_segs1 fnd_flex_ext.segmentarray;
20: l_segs2 fnd_flex_ext.segmentarray;
21: l_fftype fnd_flex_key_api.flexfield_type;
22: l_ffstru fnd_flex_key_api.structure_type;
23: l_segment_type fnd_flex_key_api.segment_type;
24: l_item_number VARCHAR2(32000);
25: l_delim VARCHAR2(1);
26: l_index NUMBER;
19: l_segs1 fnd_flex_ext.segmentarray;
20: l_segs2 fnd_flex_ext.segmentarray;
21: l_fftype fnd_flex_key_api.flexfield_type;
22: l_ffstru fnd_flex_key_api.structure_type;
23: l_segment_type fnd_flex_key_api.segment_type;
24: l_item_number VARCHAR2(32000);
25: l_delim VARCHAR2(1);
26: l_index NUMBER;
27: BEGIN
25: l_delim VARCHAR2(1);
26: l_index NUMBER;
27: BEGIN
28: -- find flex field type
29: l_fftype := fnd_flex_key_api.find_flexfield('INV', 'MSTK');
30: -- find flex structure type
31: l_ffstru := fnd_flex_key_api.find_structure(l_fftype, 101);
32: -- find segment list for the key flex field
33: fnd_flex_key_api.get_segments(l_fftype, l_ffstru, TRUE, l_nseg, l_seglist);
27: BEGIN
28: -- find flex field type
29: l_fftype := fnd_flex_key_api.find_flexfield('INV', 'MSTK');
30: -- find flex structure type
31: l_ffstru := fnd_flex_key_api.find_structure(l_fftype, 101);
32: -- find segment list for the key flex field
33: fnd_flex_key_api.get_segments(l_fftype, l_ffstru, TRUE, l_nseg, l_seglist);
34: -- get the corresponding clolumn for all segments
35: FOR l_loop IN 1..l_nseg LOOP
29: l_fftype := fnd_flex_key_api.find_flexfield('INV', 'MSTK');
30: -- find flex structure type
31: l_ffstru := fnd_flex_key_api.find_structure(l_fftype, 101);
32: -- find segment list for the key flex field
33: fnd_flex_key_api.get_segments(l_fftype, l_ffstru, TRUE, l_nseg, l_seglist);
34: -- get the corresponding clolumn for all segments
35: FOR l_loop IN 1..l_nseg LOOP
36: l_segment_type := fnd_flex_key_api.find_segment(l_fftype, l_ffstru, l_seglist(l_loop));
37: l_segs2(l_loop) := l_segment_type.column_name;
32: -- find segment list for the key flex field
33: fnd_flex_key_api.get_segments(l_fftype, l_ffstru, TRUE, l_nseg, l_seglist);
34: -- get the corresponding clolumn for all segments
35: FOR l_loop IN 1..l_nseg LOOP
36: l_segment_type := fnd_flex_key_api.find_segment(l_fftype, l_ffstru, l_seglist(l_loop));
37: l_segs2(l_loop) := l_segment_type.column_name;
38: END LOOP;
39:
40: -- get all segments from the item table
86: , p_locator_id IN NUMBER
87: , x_locator OUT NOCOPY VARCHAR2
88: ) IS
89: l_nseg NUMBER;
90: l_seglist fnd_flex_key_api.segment_list;
91: l_segs1 fnd_flex_ext.segmentarray;
92: l_segs2 fnd_flex_ext.segmentarray;
93: l_fftype fnd_flex_key_api.flexfield_type;
94: l_ffstru fnd_flex_key_api.structure_type;
89: l_nseg NUMBER;
90: l_seglist fnd_flex_key_api.segment_list;
91: l_segs1 fnd_flex_ext.segmentarray;
92: l_segs2 fnd_flex_ext.segmentarray;
93: l_fftype fnd_flex_key_api.flexfield_type;
94: l_ffstru fnd_flex_key_api.structure_type;
95: l_segment_type fnd_flex_key_api.segment_type;
96: l_locator VARCHAR2(32000);
97: l_structure_list fnd_flex_key_api.structure_list;
90: l_seglist fnd_flex_key_api.segment_list;
91: l_segs1 fnd_flex_ext.segmentarray;
92: l_segs2 fnd_flex_ext.segmentarray;
93: l_fftype fnd_flex_key_api.flexfield_type;
94: l_ffstru fnd_flex_key_api.structure_type;
95: l_segment_type fnd_flex_key_api.segment_type;
96: l_locator VARCHAR2(32000);
97: l_structure_list fnd_flex_key_api.structure_list;
98: l_nstru NUMBER;
91: l_segs1 fnd_flex_ext.segmentarray;
92: l_segs2 fnd_flex_ext.segmentarray;
93: l_fftype fnd_flex_key_api.flexfield_type;
94: l_ffstru fnd_flex_key_api.structure_type;
95: l_segment_type fnd_flex_key_api.segment_type;
96: l_locator VARCHAR2(32000);
97: l_structure_list fnd_flex_key_api.structure_list;
98: l_nstru NUMBER;
99: l_index NUMBER;
93: l_fftype fnd_flex_key_api.flexfield_type;
94: l_ffstru fnd_flex_key_api.structure_type;
95: l_segment_type fnd_flex_key_api.segment_type;
96: l_locator VARCHAR2(32000);
97: l_structure_list fnd_flex_key_api.structure_list;
98: l_nstru NUMBER;
99: l_index NUMBER;
100: l_delim VARCHAR2(1);
101: BEGIN
99: l_index NUMBER;
100: l_delim VARCHAR2(1);
101: BEGIN
102: -- find flex field type
103: l_fftype := fnd_flex_key_api.find_flexfield('INV', 'MTLL');
104:
105: -- find flex structure type
106: l_ffstru := fnd_flex_key_api.find_structure(l_fftype, 101);
107:
102: -- find flex field type
103: l_fftype := fnd_flex_key_api.find_flexfield('INV', 'MTLL');
104:
105: -- find flex structure type
106: l_ffstru := fnd_flex_key_api.find_structure(l_fftype, 101);
107:
108: -- find segment list for the key flex field
109: fnd_flex_key_api.get_segments(l_fftype, l_ffstru, TRUE, l_nseg, l_seglist);
110:
105: -- find flex structure type
106: l_ffstru := fnd_flex_key_api.find_structure(l_fftype, 101);
107:
108: -- find segment list for the key flex field
109: fnd_flex_key_api.get_segments(l_fftype, l_ffstru, TRUE, l_nseg, l_seglist);
110:
111: -- get the corresponding clolumn for all segments
112: FOR l_loop IN 1..l_nseg LOOP
113: l_segment_type := fnd_flex_key_api.find_segment(l_fftype, l_ffstru, l_seglist(l_loop));
109: fnd_flex_key_api.get_segments(l_fftype, l_ffstru, TRUE, l_nseg, l_seglist);
110:
111: -- get the corresponding clolumn for all segments
112: FOR l_loop IN 1..l_nseg LOOP
113: l_segment_type := fnd_flex_key_api.find_segment(l_fftype, l_ffstru, l_seglist(l_loop));
114: l_segs2(l_loop) := l_segment_type.column_name;
115: END LOOP;
116:
117: -- get all segments from the item table