117: Lnu_array_counter Number Default Null;
118: err_num Number;
119: Lnu_cache_index Number Default Null;
120: Begin
121: --* dbms_output.put_line('Get_Parent_Value +');
122: --* dbms_output.put_line(p_application_id||' - '||p_id_flex_code||' - '||p_id_flex_num||' - '||p_child_value_set_id);
123: --* Check if the fa_rx_flex_parent_seg_t cache exists
124: Lnu_cache_index := fa_rx_flex_par_seg_t.FIRST;
125: --* dbms_output.put_line('for first , Lnu_cache_index = '||Lnu_cache_index||' total = '||fa_rx_flex_par_seg_t.count);
118: err_num Number;
119: Lnu_cache_index Number Default Null;
120: Begin
121: --* dbms_output.put_line('Get_Parent_Value +');
122: --* dbms_output.put_line(p_application_id||' - '||p_id_flex_code||' - '||p_id_flex_num||' - '||p_child_value_set_id);
123: --* Check if the fa_rx_flex_parent_seg_t cache exists
124: Lnu_cache_index := fa_rx_flex_par_seg_t.FIRST;
125: --* dbms_output.put_line('for first , Lnu_cache_index = '||Lnu_cache_index||' total = '||fa_rx_flex_par_seg_t.count);
126: WHILE Lnu_cache_index IS NOT NULL
121: --* dbms_output.put_line('Get_Parent_Value +');
122: --* dbms_output.put_line(p_application_id||' - '||p_id_flex_code||' - '||p_id_flex_num||' - '||p_child_value_set_id);
123: --* Check if the fa_rx_flex_parent_seg_t cache exists
124: Lnu_cache_index := fa_rx_flex_par_seg_t.FIRST;
125: --* dbms_output.put_line('for first , Lnu_cache_index = '||Lnu_cache_index||' total = '||fa_rx_flex_par_seg_t.count);
126: WHILE Lnu_cache_index IS NOT NULL
127: LOOP
128: --* dbms_output.put_line('record content fa_rx_flex_parent_seg_t('||Lnu_cache_index||')');
129: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_application_id = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_application_id);
124: Lnu_cache_index := fa_rx_flex_par_seg_t.FIRST;
125: --* dbms_output.put_line('for first , Lnu_cache_index = '||Lnu_cache_index||' total = '||fa_rx_flex_par_seg_t.count);
126: WHILE Lnu_cache_index IS NOT NULL
127: LOOP
128: --* dbms_output.put_line('record content fa_rx_flex_parent_seg_t('||Lnu_cache_index||')');
129: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_application_id = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_application_id);
130: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_id_flex_code = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_code);
131: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_id_flex_num = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_num);
132: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_flex_value_set_id = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_flex_value_set_id);
125: --* dbms_output.put_line('for first , Lnu_cache_index = '||Lnu_cache_index||' total = '||fa_rx_flex_par_seg_t.count);
126: WHILE Lnu_cache_index IS NOT NULL
127: LOOP
128: --* dbms_output.put_line('record content fa_rx_flex_parent_seg_t('||Lnu_cache_index||')');
129: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_application_id = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_application_id);
130: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_id_flex_code = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_code);
131: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_id_flex_num = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_num);
132: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_flex_value_set_id = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_flex_value_set_id);
133: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_parent_segment_num = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_parent_segment_num);
126: WHILE Lnu_cache_index IS NOT NULL
127: LOOP
128: --* dbms_output.put_line('record content fa_rx_flex_parent_seg_t('||Lnu_cache_index||')');
129: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_application_id = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_application_id);
130: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_id_flex_code = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_code);
131: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_id_flex_num = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_num);
132: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_flex_value_set_id = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_flex_value_set_id);
133: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_parent_segment_num = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_parent_segment_num);
134: --* Check if the record exists in cache.
127: LOOP
128: --* dbms_output.put_line('record content fa_rx_flex_parent_seg_t('||Lnu_cache_index||')');
129: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_application_id = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_application_id);
130: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_id_flex_code = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_code);
131: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_id_flex_num = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_num);
132: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_flex_value_set_id = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_flex_value_set_id);
133: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_parent_segment_num = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_parent_segment_num);
134: --* Check if the record exists in cache.
135: If ( fa_rx_flex_par_seg_t(Lnu_cache_index).fap_application_id = p_application_id and
128: --* dbms_output.put_line('record content fa_rx_flex_parent_seg_t('||Lnu_cache_index||')');
129: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_application_id = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_application_id);
130: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_id_flex_code = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_code);
131: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_id_flex_num = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_num);
132: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_flex_value_set_id = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_flex_value_set_id);
133: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_parent_segment_num = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_parent_segment_num);
134: --* Check if the record exists in cache.
135: If ( fa_rx_flex_par_seg_t(Lnu_cache_index).fap_application_id = p_application_id and
136: fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_code = p_id_flex_code and
129: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_application_id = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_application_id);
130: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_id_flex_code = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_code);
131: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_id_flex_num = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_num);
132: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_flex_value_set_id = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_flex_value_set_id);
133: --* dbms_output.put_line('fa_rx_flex_parent_seg_t(Lnu_cache_index).fap_parent_segment_num = '||fa_rx_flex_par_seg_t(Lnu_cache_index).fap_parent_segment_num);
134: --* Check if the record exists in cache.
135: If ( fa_rx_flex_par_seg_t(Lnu_cache_index).fap_application_id = p_application_id and
136: fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_code = p_id_flex_code and
137: fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_num = p_id_flex_num and
137: fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_num = p_id_flex_num and
138: fa_rx_flex_par_seg_t(Lnu_cache_index).fap_flex_value_set_id = p_child_value_set_id
139: )
140: Then
141: --* dbms_output.put_line('present in cache');
142: Lnu_array_counter := fa_rx_flex_par_seg_t(Lnu_cache_index).fap_parent_segment_num;
143: --* dbms_output.put_line('Lnu_array_counter = '||Lnu_array_counter);
144: Exit;
145: End If;
139: )
140: Then
141: --* dbms_output.put_line('present in cache');
142: Lnu_array_counter := fa_rx_flex_par_seg_t(Lnu_cache_index).fap_parent_segment_num;
143: --* dbms_output.put_line('Lnu_array_counter = '||Lnu_array_counter);
144: Exit;
145: End If;
146:
147: Lnu_cache_index := fa_rx_flex_par_seg_t.NEXT(Lnu_cache_index);
147: Lnu_cache_index := fa_rx_flex_par_seg_t.NEXT(Lnu_cache_index);
148: END LOOP;
149:
150: If p_seg_array.FIRST Is Null Then
151: --* dbms_output.put_line('Get_Parent_Value return' ||Lvr_Parent_Value);
152: --* dbms_output.put_line('Get_Parent_Value -');
153: Return(Lvr_Parent_Value);
154: End If;
155:
148: END LOOP;
149:
150: If p_seg_array.FIRST Is Null Then
151: --* dbms_output.put_line('Get_Parent_Value return' ||Lvr_Parent_Value);
152: --* dbms_output.put_line('Get_Parent_Value -');
153: Return(Lvr_Parent_Value);
154: End If;
155:
156: --* Not present in cache
154: End If;
155:
156: --* Not present in cache
157: Lnu_cache_index := Nvl(fa_rx_flex_par_seg_t.count,0) + 1;
158: --* dbms_output.put_line('Lnu_cache_index = '||Lnu_cache_index);
159: fa_rx_flex_par_seg_t(Lnu_cache_index).fap_application_id := p_application_id;
160: fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_code := p_id_flex_code;
161: fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_num := p_id_flex_num ;
162: fa_rx_flex_par_seg_t(Lnu_cache_index).fap_flex_value_set_id := p_child_value_set_id ;
161: fa_rx_flex_par_seg_t(Lnu_cache_index).fap_id_flex_num := p_id_flex_num ;
162: fa_rx_flex_par_seg_t(Lnu_cache_index).fap_flex_value_set_id := p_child_value_set_id ;
163:
164: If Lnu_array_counter Is Null Then
165: --* dbms_output.put_line('Get_Parent_Value Lnu_array_counter is null');
166: If par_seg%IsOpen Then
167: Close par_seg;
168: End If;
169: Open par_seg(p_application_id,p_id_flex_code,p_id_flex_num,p_child_value_set_id);
168: End If;
169: Open par_seg(p_application_id,p_id_flex_code,p_id_flex_num,p_child_value_set_id);
170: Fetch par_seg into Lnu_array_counter;
171: Close par_seg;
172: --* dbms_output.put_line('Get_Parent_Value copy into cache Lnu_array_counter = '||Lnu_array_counter);
173: fa_rx_flex_par_seg_t(Lnu_cache_index).fap_parent_segment_num := Lnu_array_counter;
174: --* dbms_output.put_line('216');
175: --* dbms_output.put_line('218');
176: End If;
170: Fetch par_seg into Lnu_array_counter;
171: Close par_seg;
172: --* dbms_output.put_line('Get_Parent_Value copy into cache Lnu_array_counter = '||Lnu_array_counter);
173: fa_rx_flex_par_seg_t(Lnu_cache_index).fap_parent_segment_num := Lnu_array_counter;
174: --* dbms_output.put_line('216');
175: --* dbms_output.put_line('218');
176: End If;
177:
178: If Lnu_array_counter Is Not Null Then
171: Close par_seg;
172: --* dbms_output.put_line('Get_Parent_Value copy into cache Lnu_array_counter = '||Lnu_array_counter);
173: fa_rx_flex_par_seg_t(Lnu_cache_index).fap_parent_segment_num := Lnu_array_counter;
174: --* dbms_output.put_line('216');
175: --* dbms_output.put_line('218');
176: End If;
177:
178: If Lnu_array_counter Is Not Null Then
179: Lvr_Parent_Value := p_seg_array(Lnu_array_counter);
178: If Lnu_array_counter Is Not Null Then
179: Lvr_Parent_Value := p_seg_array(Lnu_array_counter);
180: End If;
181:
182: --* dbms_output.put_line('Get_Parent_Value return' ||Lvr_Parent_Value);
183: --* dbms_output.put_line('Get_Parent_Value -');
184: Return(Lvr_Parent_Value);
185: Exception
186: When Others Then
179: Lvr_Parent_Value := p_seg_array(Lnu_array_counter);
180: End If;
181:
182: --* dbms_output.put_line('Get_Parent_Value return' ||Lvr_Parent_Value);
183: --* dbms_output.put_line('Get_Parent_Value -');
184: Return(Lvr_Parent_Value);
185: Exception
186: When Others Then
187: err_num := sqlcode;
184: Return(Lvr_Parent_Value);
185: Exception
186: When Others Then
187: err_num := sqlcode;
188: dbms_output.put_line('Get_Parent_Value exception '||err_num);
189: dbms_output.put_line('Get_Parent_Value -');
190: Return(Lvr_Parent_Value);
191: End Get_Parent_Value;
192: -------------------------------------------------------------------------
185: Exception
186: When Others Then
187: err_num := sqlcode;
188: dbms_output.put_line('Get_Parent_Value exception '||err_num);
189: dbms_output.put_line('Get_Parent_Value -');
190: Return(Lvr_Parent_Value);
191: End Get_Parent_Value;
192: -------------------------------------------------------------------------
193: --
949: End If;
950: seg_value := segments(i);
951: begin
952: seg_desc := fa_rx_shared_pkg.get_flex_val_meaning(seg_value_set_id, null, seg_value,seg_parent_value);
953: dbms_output.put_line('seg_parent_value = '||seg_parent_value||' , seg_desc = '||seg_desc);
954: exception
955: when no_data_found then
956: seg_desc := null;
957: when value_error then