200: IF (l_flag = 'NEVER' OR l_flag IS NULL) THEN
201:
202: SELECT count(collaboration_id)
203: INTO l_cnt
204: FROM cln_coll_hist_hdr
205: WHERE document_no = l_acct_num;
206:
207: IF (l_cnt > 0 ) THEN
208: resultout := FND_API.G_TRUE;
232: while (l_tp_codes%FOUND) LOOP
233:
234: select COUNT(clndtl.collaboration_dtl_id)
235: into l_cnt
236: from cln_coll_hist_hdr clnhdr,
237: cln_coll_hist_dtl clndtl
238: where
239: clnhdr.application_id = '881'
240: and clnhdr.collaboration_type = 'XNB_ACCOUNT'
247: IF ( l_cnt = 0) THEN
248:
249: select COUNT(clndtl.collaboration_dtl_id)
250: into l_cnt_t
251: from cln_coll_hist_hdr clnhdr,
252: cln_coll_hist_dtl clndtl
253: where
254: clnhdr.application_id = '881'
255: and clnhdr.collaboration_type = 'XNB_ACCOUNT'