5098:
5099: FUNCTION GET_CHARGE_ACCOUNT (p_wc_id IN NUMBER)
5100: RETURN VARCHAR2 IS
5101: l_count number;
5102: l_segments GL_CODE_COMBINATIONS_KFV.concatenated_segments%type;
5103: begin
5104:
5105: select count(*)
5106: into l_count
5103: begin
5104:
5105: select count(*)
5106: into l_count
5107: from gl_code_combinations_kfv glc,
5108: po_distributions_all pod
5109: where pod.code_combination_id = glc.code_combination_id and
5110: pod.po_distribution_id = p_wc_id;
5111:
5115: else
5116:
5117: select glc.concatenated_segments
5118: into l_segments
5119: from gl_code_combinations_kfv glc,
5120: po_distributions_all pod
5121: where pod.code_combination_id = glc.code_combination_id and
5122: pod.po_distribution_id = p_wc_id;
5123: