181:
182: p_where := icx_call.encrypt2(v_node_id || '*' || v_org_id || '**]');
183:
184: select count(-1) into v_no_of_children
185: from icx_related_templates_val_v
186: where express_name = v_node_id
187: and RELATIONSHIP_TYPE <> 'TOP';
188:
189: if v_no_of_children > 0 then
278:
279: p_where := icx_call.encrypt2(v_default_template || '*' || v_org_id || '**]');
280:
281: select count(-1) into v_no_of_children
282: from icx_related_templates_val_v
283: where express_name = v_default_template
284: and RELATIONSHIP_TYPE <> 'TOP';
285:
286: if v_no_of_children > 0 then
395: v_first_time_flag varchar2(1);
396:
397: cursor getTopNode_emg(childnodeId varchar2) is
398: select express_name,relationship_type
399: from icx_related_templates_val_v
400: where related_express_name = childnodeId
401: and (reserve_po_number = 'YES'
402: or reserve_po_number = 'OPTIONAL');
403:
402: or reserve_po_number = 'OPTIONAL');
403:
404: cursor getTopNode(childnodeId varchar2) is
405: select express_name,relationship_type
406: from icx_related_templates_val_v
407: where related_express_name = childnodeId
408: and (reserve_po_number = 'NO'
409: or reserve_po_number = 'OPTIONAL'
410: or reserve_po_number is NULL);
410: or reserve_po_number is NULL);
411:
412: cursor getAnyTop is
413: select express_name,relationship_type
414: from icx_related_templates_val_v
415: where relationship_type = 'TOP'
416: order by express_name;
417:
418: begin
547:
548: v_p_where := icx_call.encrypt2(v_node_id || '*' || v_org || '**]');
549:
550: select count(-1) into v_no_of_children
551: from icx_related_templates_val_v
552: where express_name = v_node_id
553: and RELATIONSHIP_TYPE <> 'TOP';
554:
555: