1111: -- Organization
1112: begin
1113: select name
1114: into lv_organization
1115: from per_organization_units
1116: where organization_id = to_number(p_organization)
1117: and business_group_id = p_business_group_id
1118: and fnd_date.canonical_to_date(p_date_earned) between
1119: date_from and nvl(date_to,to_date('31/12/4712','DD/MM/YYYY'));