872: IF (party_rec.party_role_code = 'INTERNAL_ORG')
873: THEN
874: SELECT name
875: INTO l_party_name
876: FROM hr_all_organization_units
877: WHERE organization_id = party_rec.party_id;
878:
879: -- b. Else If the party_role_code==SUPPLIER_ORG
880: -- get the party name from po_vendors using party_id join.