DBA Data[Home] [Help]

APPS.ZPB_ACVAL_PVT SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 56

    select published_ac_id
    from zpb_cycle_relationships
    where editable_ac_id = p_analysis_cycle_id;
Line: 61

    select params.value
    from zpb_ac_param_values params, fnd_lookup_values_vl fnd
    where params.param_id = fnd.TAG and fnd.LOOKUP_CODE = 'BUSINESS_PROCESS_CURRENCY'
        and fnd.LOOKUP_TYPE = 'ZPB_PARAMS' and params.analysis_cycle_id = l_pub_ac_id ;
Line: 67

    select params.value
    from zpb_ac_param_values params, fnd_lookup_values_vl fnd
    where params.param_id = fnd.TAG and fnd.LOOKUP_CODE = 'BUSINESS_PROCESS_CURRENCY'
        and fnd.LOOKUP_TYPE = 'ZPB_PARAMS' and params.analysis_cycle_id = l_edt_ac_id ;
Line: 74

    select '1'
    from zpb_ac_param_values pub, zpb_ac_param_values edt
    where edt.analysis_cycle_id = l_edt_ac_id
    and   pub.analysis_cycle_id = l_pub_ac_id
    and   pub.param_id = l_param_id
    and   edt.param_id = l_param_id
    and   pub.value <> edt.value;
Line: 84

   select '1'
   from zpb_cycle_datasets pub
   where   pub.analysis_cycle_id = l_pub_ac_id
   and  pub.dataset_code not in (select edt.dataset_code
                                 from zpb_cycle_datasets edt
                                 where edt.analysis_cycle_id = l_edt_ac_id
                                   and edt.order_id = pub.order_id
                                )
   union
   select '1'
   from zpb_cycle_datasets edt
   where   edt.analysis_cycle_id = l_edt_ac_id
   and  edt.dataset_code not in (select pub.dataset_code
                                 from zpb_cycle_datasets pub
                                 where pub.analysis_cycle_id = l_pub_ac_id
                                 and edt.order_id = pub.order_id
                                );
Line: 104

   select  dimension_name,dataset_dimension_flag,remove_dimension_flag
   from zpb_cycle_model_dimensions
   where analysis_cycle_id = p_analysis_cycle_id
   minus
   select dimension_name,dataset_dimension_flag,remove_dimension_flag
   from zpb_cycle_model_dimensions
   where analysis_cycle_id = l_pub_ac_id;
Line: 113

   select  dimension_name,dataset_dimension_flag,remove_dimension_flag
   from zpb_cycle_model_dimensions
   where analysis_cycle_id = l_pub_ac_id
   minus
   select dimension_name,dataset_dimension_flag,remove_dimension_flag
   from zpb_cycle_model_dimensions
   where analysis_cycle_id = p_analysis_cycle_id;
Line: 122

  select query_object_path|| '/' || query_object_name
  from zpb_cycle_model_dimensions
  where dimension_name = l_line_dim
  and   analysis_cycle_id = l_ac_id;
Line: 128

  select 1 from
  zpb_solve_member_defs pub, zpb_solve_member_defs edt
  where edt.analysis_cycle_id = p_analysis_cycle_id
  and pub.analysis_cycle_id = l_pub_ac_id
  and pub.member = edt.member
  and edt.source_type <> pub.source_type;
Line: 136

  select 1 from
  zpb_data_initialization_defs pub, zpb_data_initialization_defs  edt
  where edt.analysis_cycle_id = p_analysis_cycle_id
  and pub.analysis_cycle_id = l_pub_ac_id
  and pub.member = edt.member
  and ( edt.source_view  <> pub.source_view
        or nvl(edt.lag_time_periods,-1)   <> nvl(pub.lag_time_periods,-1)
        or nvl(edt.lag_time_level,'-1')   <> nvl(pub.lag_time_level,'-1')
        or nvl(edt.change_number,-1)      <> nvl(pub.change_number,-1)
        or nvl(edt.percentage_flag, '-1') <> nvl(pub.percentage_flag, '-1')
      );
Line: 153

cursor input_selections_edt is
  select '1'
  from (select member, dimension,selection_name,hierarchy
          from zpb_solve_input_selections
         where analysis_cycle_id = p_analysis_cycle_id
        minus
        select member, dimension,selection_name,hierarchy
          from zpb_solve_input_selections
         where analysis_cycle_id = l_pub_ac_id);
Line: 163

cursor input_selections_pub is
  select '1'
  from (select member, dimension,selection_name,hierarchy
          from zpb_solve_input_selections
         where analysis_cycle_id = l_pub_ac_id
        minus
        select member, dimension,selection_name,hierarchy
          from zpb_solve_input_selections
         where analysis_cycle_id = p_analysis_cycle_id);
Line: 173

cursor input_selection_identifier(l_ac_id in number) is
  select member,dimension,selection_path|| '/' || selection_name
  from zpb_solve_input_selections
  where analysis_cycle_id = l_ac_id
  and selection_name <> 'DEFAULT';
Line: 179

cursor input_selection_ident_pub(l_ac_id in number,l_dim_name in varchar2,l_member in varchar2) is
  select selection_path|| '/' || selection_name
  from zpb_solve_input_selections
  where analysis_cycle_id = l_ac_id
  and dimension = l_dim_name
  and member = l_member;
Line: 185

cursor output_selections_edt is
  select '1'
  from (select member, dimension,selection_name,hierarchy,match_input_flag
          from zpb_solve_output_selections
         where analysis_cycle_id = p_analysis_cycle_id
        minus
        select member, dimension,selection_name, hierarchy,match_input_flag
          from zpb_solve_output_selections
         where analysis_cycle_id = l_pub_ac_id);
Line: 195

 cursor output_selections_pub is
  select '1'
  from (select member, dimension,selection_name,hierarchy,match_input_flag
          from zpb_solve_output_selections
         where analysis_cycle_id = l_pub_ac_id
        minus
        select member, dimension,selection_name, hierarchy,match_input_flag
          from zpb_solve_output_selections
         where analysis_cycle_id = p_analysis_cycle_id);
Line: 207

  select '1'
  from (select member,rule_name,method,basis,qualifier
          from zpb_solve_allocation_defs
          where analysis_cycle_id = p_analysis_cycle_id
        minus
        select member,rule_name,method,basis,qualifier
          from zpb_solve_allocation_defs
         where analysis_cycle_id = l_pub_ac_id);
Line: 217

  select '1'
  from (select  member,rule_name,method,basis,qualifier,evaluation_option
          from  zpb_solve_allocation_defs
         where analysis_cycle_id = l_pub_ac_id
        minus
        select  member,rule_name,method,basis,qualifier,evaluation_option
          from  zpb_solve_allocation_defs
         where  analysis_cycle_id = p_analysis_cycle_id);
Line: 227

  select '1'
  from  zpb_analysis_cycle_tasks edt,
        zpb_analysis_cycle_tasks pub
  where edt.analysis_cycle_id = l_edt_ac_id
    and pub.analysis_cycle_id = l_pub_ac_id
    and edt.sequence = pub.sequence
    and edt.task_name <> pub.task_name;
Line: 236

   select '1'
   from   zpb_analysis_cycle_tasks pub
    where sequence not in (select sequence
                           from  zpb_analysis_cycle_tasks edt
                           where edt.analysis_cycle_id = l_edt_ac_id)
      and pub.analysis_cycle_id = l_pub_ac_id;
Line: 244

    select status_sql
      from zpb_status_sql
     where query_path = l_query_path
       and dimension_name = l_line_dim
     order by row_num;
Line: 391

 open output_selections_edt;
Line: 392

  fetch output_selections_edt into dummy_var;
Line: 393

  if (output_selections_edt%found) then
   close output_selections_edt;
Line: 398

  close output_selections_edt;
Line: 401

 open output_selections_pub;
Line: 402

  fetch output_selections_pub into dummy_var;
Line: 403

  if (output_selections_pub%found) then
   close output_selections_pub;
Line: 408

  close output_selections_pub;
Line: 621

          zpb_aw.execute('delete  l_temp_vs  aw ' ||l_dataAw);
Line: 705

  select query_object_path|| '/' || query_object_name
  from zpb_cycle_model_dimensions
  where dimension_name = l_line_dim
  and   analysis_cycle_id = p_analysis_cycle_id;
Line: 790

  l_selection_type   varchar2(30);
Line: 794

  select task_id
   from  zpb_analysis_cycle_tasks
  where  analysis_cycle_id = p_analysis_cycle_id
    and  wf_process_name = 'LOAD_DATA';
Line: 800

  select name,value
  from zpb_task_parameters
  where task_id = l_task_id
    and name in ('QUERY_OBJECT_PATH','QUERY_OBJECT_NAME', 'DATA_SELECTION_TYPE'
);
Line: 837

      if (each.name = 'DATA_SELECTION_TYPE') then
        l_name_exists := 'y';
Line: 839

        l_selection_type := each.value;
Line: 845

    if l_path_exists <> 'y' or l_name_exists <> 'y' or l_selection_type = 'ALL_LINE_ITEMS_SELECTION_TYPE' then
     x_isvalid := 'Y';
Line: 914

  l_selection_type   varchar2(30);
Line: 917

  select task_id,task_name
   from  zpb_analysis_cycle_tasks
  where  analysis_cycle_id = p_analysis_cycle_id
    and  wf_process_name = 'LOAD_DATA';
Line: 923

  select name,value
  from zpb_task_parameters
  where task_id = l_task_id
    and name in ('QUERY_OBJECT_PATH','QUERY_OBJECT_NAME','DATA_SELECTION_TYPE');
Line: 968

      if (each.name = 'DATA_SELECTION_TYPE') then
        l_name_exists := 'y';
Line: 970

        l_selection_type := each.value;
Line: 987

    if l_selection_type <> 'ALL_LINE_ITEMS_SELECTION_TYPE' then
      l_query_name := l_query_path ||'/' || l_query_name;
Line: 1012

    end if; -- all_line_items_selection_type
Line: 1075

  select task_id, task_name
   from  zpb_analysis_cycle_tasks
  where  analysis_cycle_id = p_analysis_cycle_id
    and  wf_process_name = 'GENERATE_TEMPLATE';
Line: 1081

  select name,value
  from zpb_task_parameters
  where task_id = l_task_id
    and name in ('TEMPLATE_DATAENTRY_OBJ_PATH','TEMPLATE_DATAENTRY_OBJ_NAME');
Line: 1175

PROCEDURE validate_input_selections(
  p_api_version          IN NUMBER,
  p_init_msg_list        IN VARCHAR2 := FND_API.G_FALSE,
  p_commit               IN VARCHAR2 :=  FND_API.G_FALSE,
  p_validation_level     IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
  x_return_status        OUT NOCOPY VARCHAR2 ,
  x_msg_count            OUT NOCOPY NUMBER,
  x_msg_data             OUT NOCOPY VARCHAR2,
  p_analysis_cycle_id    IN  zpb_analysis_cycles.analysis_cycle_id%type,
  p_inputDims            IN  VARCHAR2,
  x_isvalid              OUT NOCOPY VARCHAR2,
  x_invalid_dim_list     OUT NOCOPY VARCHAR2,
  x_invalid_linemem_list OUT NOCOPY VARCHAR2) IS

  l_api_name      CONSTANT VARCHAR2(30) := 'validate_input_selections';
Line: 1192

  l_currentDim    zpb_solve_input_selections.dimension%type ;
Line: 1193

  l_fetchedDim    zpb_solve_input_selections.dimension%type;
Line: 1194

  l_inputSelection    zpb_solve_input_selections.selection_name%type;
Line: 1195

  l_currentLine   zpb_solve_input_selections.member%type;
Line: 1212

  select member
    from zpb_solve_member_defs
   where analysis_cycle_id = p_analysis_cycle_id
     and source_type in  (1000,1100,1130)
     and member not in (select member
                          from zpb_solve_input_selections
                         where analysis_cycle_id = p_analysis_cycle_id);
Line: 1221

  cursor nullselections_c (p_dim in varchar2, p_time_dim in varchar2) is
  select i.member,i.dimension, i.selection_name
    from zpb_solve_input_selections i, zpb_solve_member_defs d,
         zpb_line_dimensionality l
   where  d.member = i.member
     and  d.analysis_cycle_id = i.analysis_cycle_id
     and  d.analysis_cycle_id = p_analysis_cycle_id
     and  l.dimension = i.dimension
     and  l.member = i.member
     and  l.analysis_cycle_id = i.analysis_cycle_id
     and  nvl(l.exclude_from_solve_flag,'N') <> 'Y'
     and  ( nvl(l.force_input_flag,'N') = 'Y'
           OR nvl(l.sum_members_flag,'N') = 'N')
     and  d.source_type in (1000,1100,1130)
     and  i.dimension = p_time_dim
     and i.dimension = p_dim
     and  i.selection_name is null
   union all
   select i.member, i.dimension,i.selection_name
    from zpb_solve_input_selections i, zpb_solve_member_defs d,
         zpb_line_dimensionality l
   where  d.member = i.member
     and  d.analysis_cycle_id = i.analysis_cycle_id
     and  d.analysis_cycle_id = p_analysis_cycle_id
     and  l.dimension = i.dimension
     and  l.member = i.member
     and  l.analysis_cycle_id = i.analysis_cycle_id
     and  nvl(l.exclude_from_solve_flag,'N') <> 'Y'
     and  ( nvl(l.force_input_flag,'N') = 'Y'
           OR nvl(l.sum_members_flag,'N') = 'N')
     and  d.source_type in (1000)
     and  i.dimension = p_dim
     and  i.dimension <> p_time_dim
     and  i.selection_name is null
   union all
   select i.member, i.dimension,i.selection_name
    from zpb_solve_input_selections i, zpb_solve_member_defs d
   where  d.member = i.member
     and  d.analysis_cycle_id = i.analysis_cycle_id
     and  d.analysis_cycle_id = p_analysis_cycle_id
     and  d.source_type in (1100,1130)
     and  i.dimension = p_dim
     and  i.dimension <> p_time_dim
     and  i.selection_name is null;
Line: 1267

  cursor nonnullselections_c(p_dim in varchar2, p_time_dim in varchar2) is
  select distinct i.selection_name
    from zpb_solve_input_selections i, zpb_solve_member_defs d,
          zpb_line_dimensionality l
   where i.member = d.member
    and  i.dimension = p_time_dim
    and  i.dimension = p_dim
    and  i.analysis_cycle_id = d.analysis_cycle_id
    and  l.dimension = i.dimension
    and  l.member = i.member
    and  l.analysis_cycle_id = i.analysis_cycle_id
    and  nvl(l.exclude_from_solve_flag,'N') <> 'Y'
    and  ( nvl(l.force_input_flag,'N') = 'Y'
           OR nvl(l.sum_members_flag,'N') = 'N')
    and  d.source_type in (1000,1100,1130)
    and  i.analysis_cycle_id = p_analysis_cycle_id
    and  i.selection_name is not null
  union all
  select distinct i.selection_name
    from zpb_solve_input_selections i, zpb_solve_member_defs d,
          zpb_line_dimensionality l
   where i.member = d.member
    and  i.dimension <> p_time_dim
    and  i.dimension = p_dim
    and  i.analysis_cycle_id = d.analysis_cycle_id
    and  l.dimension = i.dimension
    and  l.member = i.member
    and  l.analysis_cycle_id = i.analysis_cycle_id
    and  nvl(l.exclude_from_solve_flag,'N') <> 'Y'
    and  ( nvl(l.force_input_flag,'N') = 'Y'
           OR nvl(l.sum_members_flag,'N') = 'N')
    and  d.source_type in (1000)
    and  i.analysis_cycle_id = p_analysis_cycle_id
    and  i.selection_name is not null
  union all
  select distinct i.selection_name
    from zpb_solve_input_selections i, zpb_solve_member_defs d
   where i.member = d.member
    and  i.dimension <> p_time_dim
    and  i.dimension = p_dim
    and  i.analysis_cycle_id = d.analysis_cycle_id
    and  d.source_type in (1100,1130)
    and  i.analysis_cycle_id = p_analysis_cycle_id
    and  i.selection_name is not null;
Line: 1314

  select distinct o.hierarchy
    from zpb_solve_output_selections o
   where o.analysis_cycle_id = p_analysis_cycle_id
     and o.hierarchy <> 'NONE'
     and o.dimension = p_dim
     and o.member=p_input_line
     AND NVL(o.match_input_flag, 'N') <> 'Y';
Line: 1322

  cursor  hiermember_c(p_dim in varchar2, l_selection_name in varchar2,
                   l_hierarchy in varchar2) is
   select i.member
     from zpb_solve_input_selections i,
          zpb_solve_output_selections o
    where i.dimension = p_dim
      and i.analysis_cycle_id = p_analysis_cycle_id
      and i.member = o.member
      and i.analysis_cycle_id = o.analysis_cycle_id
      and i.selection_name = l_selection_name
      and o.hierarchy = l_hierarchy
      and i.dimension = o.dimension
      AND NVL(o.match_input_flag, 'N') <> 'Y';
Line: 1336

   cursor selection_member_c(p_dim in varchar2, l_selection_name in varchar2) is
    select member
     from zpb_solve_input_selections
    where selection_name = l_selection_name
      and dimension = p_dim
      and analysis_cycle_id = p_analysis_cycle_id;
Line: 1346

  SAVEPOINT validate_input_selections;
Line: 1425

    open nullselections_c(l_currentDim, l_timedim);
Line: 1426

    fetch nullselections_c into l_currentLine, l_fetchedDim, l_inputSelection;
Line: 1430

    while nullselections_c%found loop
      -- dbms_output.put_line('found null sel ' || l_currentDim || l_currentLine);
Line: 1439

        fetch nullselections_c into l_currentLine,l_fetchedDim, l_inputSelection;
Line: 1442

     close nullselections_c;
Line: 1447

     open nonnullselections_c(l_currentDim, l_timedim);
Line: 1448

     fetch nonnullselections_c into l_inputSelection;
Line: 1451

     while nonnullselections_c%found loop

       -- get a line member that corresponds to this input selection.
       -- this line member will be used to limit the input selection valueset

       open selection_member_c(l_currentDim,l_inputSelection);
Line: 1457

       fetch selection_member_c into l_currentLine;
Line: 1458

       close selection_member_c;
Line: 1461

            || l_currentLine||l_currentDim||l_inputSelection );
Line: 1495

           open hiermember_c(l_currentDim,l_inputSelection, l_hierarchy);
Line: 1511

       fetch nonnullselections_c into l_inputSelection;
Line: 1512

    end loop; -- loop over input selections
Line: 1515

    close nonnullselections_c;
Line: 1534

    ROLLBACK TO validate_input_selections;
Line: 1541

    ROLLBACK TO validate_input_selections;
Line: 1548

    ROLLBACK TO validate_input_selections;
Line: 1564

end validate_input_selections;
Line: 1602

  l_dim              zpb_solve_output_selections.dimension%type;
Line: 1603

  l_currentLine      zpb_solve_output_selections.member%type;
Line: 1604

  l_hierarchy        zpb_solve_output_selections.hierarchy%type;
Line: 1605

  l_outputSelection  zpb_solve_output_selections.selection_name%type;
Line: 1613

  l_currentDim    zpb_solve_output_selections.dimension%type;
Line: 1626

  cursor nonnullselections_c(p_dim in varchar2, p_time_dim in varchar2) is
  select distinct o.selection_name, o.hierarchy
    from zpb_solve_output_selections o, zpb_solve_member_defs d,
          zpb_line_dimensionality l
   where o.member = d.member
    and  o.dimension = p_time_dim
    and  o.dimension = p_dim
    and  o.analysis_cycle_id = d.analysis_cycle_id
    and  l.dimension = o.dimension
    and  l.member = o.member
    and  l.analysis_cycle_id = o.analysis_cycle_id
    and  nvl(l.exclude_from_solve_flag,'N') <> 'Y'
    and  ( nvl(l.force_input_flag,'N') = 'Y'
           OR nvl(l.sum_members_flag,'N') = 'N')
    and  d.source_type in (1000,1100,1130)
    and  o.analysis_cycle_id = p_analysis_cycle_id
    and  nvl(o.selection_name,'DEFAULT') <> 'DEFAULT'
    AND  NVL(o.match_input_flag, 'N') <> 'Y'
  union all
  select distinct o.selection_name, o.hierarchy
    from zpb_solve_output_selections o, zpb_solve_member_defs d,
          zpb_line_dimensionality l
   where o.member = d.member
    and  o.dimension <> p_time_dim
    and  o.dimension = p_dim
    and  o.analysis_cycle_id = d.analysis_cycle_id
    and  l.dimension = o.dimension
    and  l.member = o.member
    and  l.analysis_cycle_id = o.analysis_cycle_id
    and  nvl(l.exclude_from_solve_flag,'N') <> 'Y'
    and  ( nvl(l.force_input_flag,'N') = 'Y'
           OR nvl(l.sum_members_flag,'N') = 'N')
    and  d.source_type in (1000)
    and  o.analysis_cycle_id = p_analysis_cycle_id
    and  nvl(o.selection_name,'DEFAULT') <> 'DEFAULT'
    AND  NVL(o.match_input_flag, 'N') <> 'Y'
  union all
  select distinct o.selection_name, o.hierarchy
    from zpb_solve_output_selections o, zpb_solve_member_defs d
   where o.member = d.member
    and  o.dimension = p_time_dim
    and  o.dimension = p_dim
    and  o.analysis_cycle_id = d.analysis_cycle_id
    and  d.source_type in (1100,1130)
    and  o.analysis_cycle_id = p_analysis_cycle_id
    and  nvl(o.selection_name,'DEFAULT') <> 'DEFAULT'
    AND  NVL(o.match_input_flag, 'N') <> 'Y';
Line: 1675

   cursor selection_member_c(p_dim in varchar2, l_selection_name in varchar2) is
   select o.member
    from zpb_solve_output_selections o, zpb_solve_member_defs d
   where o.selection_name = l_selection_name
    and  o.member = d.member
    and  o.dimension = p_dim
    and  o.analysis_cycle_id = d.analysis_cycle_id
    and  d.source_type in (1000,1100,1130)
    and  o.analysis_cycle_id = p_analysis_cycle_id
    AND  NVL(o.match_input_flag, 'N') <> 'Y';
Line: 1686

  cursor  hiermember_c(p_dim in varchar2, l_selection_name in varchar2,
                   l_hierarchy in varchar2) is
   select o.member
     from zpb_solve_output_selections o
    where o.dimension = p_dim
      and o.analysis_cycle_id = p_analysis_cycle_id
      and o.selection_name = l_selection_name
      and o.hierarchy = l_hierarchy
      AND NVL(o.match_input_flag, 'N') <> 'Y';
Line: 1758

     open nonnullselections_c(l_currentDim, l_timedim);
Line: 1759

     fetch nonnullselections_c into l_outputSelection, l_hierarchy;
Line: 1761

     while nonnullselections_c%found loop
       -- get a line member that corresponds to this input selection.
       -- this line member will be used to limit the input selection valueset

       open selection_member_c(l_currentDim,l_outputSelection);
Line: 1766

       fetch selection_member_c into l_currentLine;
Line: 1767

       close selection_member_c;
Line: 1770

            || l_currentLine||l_currentDim||l_outputSelection );
Line: 1797

         open hiermember_c(l_currentDim,l_outputSelection, l_hierarchy);
Line: 1810

       fetch nonnullselections_c into l_outputSelection, l_hierarchy;
Line: 1811

    end loop; -- loop over output selections
Line: 1814

    close nonnullselections_c;
Line: 1889

  select query_object_path|| '/' || query_object_name
  from zpb_cycle_model_dimensions
  where dimension_name = l_line_dim
  and   analysis_cycle_id = p_analysis_cycle_id;
Line: 1895

  select task_id, task_name
   from  zpb_analysis_cycle_tasks
  where  analysis_cycle_id = p_analysis_cycle_id
    and  wf_process_name = 'GENERATE_TEMPLATE';
Line: 1901

  select name,value
  from zpb_task_parameters
  where task_id = l_task_id
    and name in ('TEMPLATE_DATAENTRY_OBJ_PATH','TEMPLATE_DATAENTRY_OBJ_NAME');
Line: 2065

  l_selection_type   varchar2(30);
Line: 2069

  select task_id
   from  zpb_analysis_cycle_tasks
  where  analysis_cycle_id = p_analysis_cycle_id
    and  wf_process_name = 'GENERATE_TEMPLATE';
Line: 2075

  select name,value
  from zpb_task_parameters
  where task_id = l_task_id
    and name in ('TEMPLATE_DATAENTRY_OBJ_PATH','TEMPLATE_DATAENTRY_OBJ_NAME');
Line: 2226

  l_dim              zpb_solve_output_selections.dimension%type;
Line: 2227

  l_line_mem         zpb_solve_output_selections.member%type;
Line: 2228

  l_hierarchy        zpb_solve_output_selections.hierarchy%type;
Line: 2229

  l_output_selection_name     zpb_solve_output_selections.selection_name%type;
Line: 2230

  l_input_selection_name     zpb_solve_input_selections.selection_name%type;
Line: 2239

  select o.member, o.dimension, o.hierarchy, o.selection_name,
         m.source_type
   from  zpb_solve_output_selections o, zpb_solve_member_defs m
  where  m.analysis_cycle_id = p_analysis_cycle_id
    and  m.analysis_cycle_id = o.analysis_cycle_id
    and  m.member = o.member
    and  m.source_type <> 1200;
Line: 2248

  select selection_name
   from  zpb_solve_input_selections
  where  analysis_cycle_id = p_analysis_cycle_id
    and  member = p_line_mem
    and  dimension = p_dim;
Line: 2284

   fetch output_info into l_line_mem, l_dim, l_hierarchy, l_output_selection_name,
                          l_source_type;
Line: 2294

   fetch input_info into l_input_selection_name;
Line: 2299

                                      ''','''||l_input_selection_name ||
                                      ''','''||l_output_selection_name ||
                                      ''','''||l_hierarchy ||
                                      ''','''||l_dim||''')');
Line: 2307

     fetch input_info into l_input_selection_name;
Line: 2367

PROCEDURE validate_output_selections(
  p_api_version          IN NUMBER,
  p_init_msg_list        IN VARCHAR2 := FND_API.G_FALSE,
  p_commit               IN VARCHAR2 :=  FND_API.G_FALSE,
  p_validation_level     IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
  x_return_status        OUT NOCOPY VARCHAR2 ,
  x_msg_count            OUT NOCOPY NUMBER,
  x_msg_data             OUT NOCOPY VARCHAR2,
  p_analysis_cycle_id    IN  zpb_analysis_cycles.analysis_cycle_id%type,
  p_outputDims            IN  VARCHAR2,
  x_isvalid              OUT NOCOPY VARCHAR2,
  x_invalid_dim_list     OUT NOCOPY VARCHAR2,
  x_invalid_linemem_list OUT NOCOPY VARCHAR2) IS

  l_api_name      CONSTANT VARCHAR2(30) := 'validate_output_selections';
Line: 2384

  l_currentDim    zpb_solve_output_selections.dimension%type ;
Line: 2385

  l_fetchedDim    zpb_solve_output_selections.dimension%type;
Line: 2386

  l_outputSelection   zpb_solve_output_selections.selection_name%type;
Line: 2387

  l_currentLine   zpb_solve_output_selections.member%type;
Line: 2404

  select member
    from zpb_solve_member_defs
   where analysis_cycle_id = p_analysis_cycle_id
     and source_type in  (1000,1100,1130)
     and member not in (select member
                          from zpb_solve_output_selections
                         where analysis_cycle_id = p_analysis_cycle_id);
Line: 2413

  cursor nullselections_c (p_dim in varchar2, p_time_dim in varchar2) is
  select o.member,o.dimension, o.selection_name
    from zpb_solve_output_selections o, zpb_solve_member_defs d,
         zpb_line_dimensionality l
   where  d.member = o.member
     and  d.analysis_cycle_id = o.analysis_cycle_id
     and  d.analysis_cycle_id = p_analysis_cycle_id
     and  l.dimension = o.dimension
     and  l.member = o.member
     and  l.analysis_cycle_id = o.analysis_cycle_id
     and  nvl(l.exclude_from_solve_flag,'N') <> 'Y'
     and  ( nvl(l.force_input_flag,'N') = 'Y'
           OR nvl(l.sum_members_flag,'N') = 'N')
     and  d.source_type in (1000,1100,1130)
     and  o.dimension = p_time_dim
     and  o.dimension = p_dim
     and  o.selection_name is null
     AND  NVL(o.match_input_flag, 'N') <> 'Y'
   union all
   select o.member, o.dimension,o.selection_name
    from zpb_solve_output_selections o, zpb_solve_member_defs d,
         zpb_line_dimensionality l
   where  d.member = o.member
     and  d.analysis_cycle_id = o.analysis_cycle_id
     and  d.analysis_cycle_id = p_analysis_cycle_id
     and  l.dimension = o.dimension
     and  l.member = o.member
     and  l.analysis_cycle_id = o.analysis_cycle_id
     and  nvl(l.exclude_from_solve_flag,'N') <> 'Y'
     and  ( nvl(l.force_input_flag,'N') = 'Y'
           OR nvl(l.sum_members_flag,'N') = 'N')
     and  d.source_type in (1000)
     and  o.dimension = p_dim
     and  o.dimension <> p_time_dim
     and  o.selection_name is null
     AND  NVL(o.match_input_flag, 'N') <> 'Y'
   union all
   select o.member, o.dimension,o.selection_name
    from zpb_solve_output_selections o, zpb_solve_member_defs d
   where  d.member = o.member
     and  d.analysis_cycle_id = o.analysis_cycle_id
     and  d.analysis_cycle_id = p_analysis_cycle_id
     and  d.source_type in (1100,1130)
     and  o.dimension = p_dim
     and  o.dimension <> p_time_dim
     and  o.selection_name is null
     AND  NVL(o.match_input_flag, 'N') <> 'Y';
Line: 2462

  cursor nonnullselections_c(p_dim in varchar2, p_time_dim in varchar2) is
  select distinct o.selection_name, o.hierarchy
    from zpb_solve_output_selections o, zpb_solve_member_defs d,
          zpb_line_dimensionality l
   where o.member = d.member
    and  o.dimension = p_time_dim
    and  o.dimension = p_dim
    and  o.analysis_cycle_id = d.analysis_cycle_id
    and  l.dimension = o.dimension
    and  l.member = o.member
    and  l.analysis_cycle_id = o.analysis_cycle_id
    and  nvl(l.exclude_from_solve_flag,'N') <> 'Y'
    and  ( nvl(l.force_input_flag,'N') = 'Y'
           OR nvl(l.sum_members_flag,'N') = 'N')
    and  d.source_type in (1000,1100,1130)
    and  o.analysis_cycle_id = p_analysis_cycle_id
    and  o.selection_name is not null
    AND  NVL(o.match_input_flag, 'N') <> 'Y'
  union all
  select distinct o.selection_name, o.hierarchy
    from zpb_solve_output_selections o, zpb_solve_member_defs d,
          zpb_line_dimensionality l
   where o.member = d.member
    and  o.dimension <> p_time_dim
    and  o.dimension = p_dim
    and  o.analysis_cycle_id = d.analysis_cycle_id
    and  o.dimension = l.dimension
    and  o.member = l.member
    and  o.analysis_cycle_id = l.analysis_cycle_id
    and  nvl(l.exclude_from_solve_flag,'N') <> 'Y'
    and  ( nvl(l.force_input_flag,'N') = 'Y'
           OR nvl(l.sum_members_flag,'N') = 'N')
    and  d.source_type in (1000)
    and  o.analysis_cycle_id = p_analysis_cycle_id
    and  o.selection_name is not null
    AND  NVL(o.match_input_flag, 'N') <> 'Y'
  union all
  select distinct o.selection_name, o.hierarchy
    from zpb_solve_output_selections o, zpb_solve_member_defs d
   where o.member = d.member
    and  o.dimension <> p_time_dim
    and  o.dimension = p_dim
    and  o.analysis_cycle_id = d.analysis_cycle_id
    and  d.source_type in (1100,1130)
    and  o.analysis_cycle_id = p_analysis_cycle_id
    and  o.selection_name is not null
    AND  NVL(o.match_input_flag, 'N') <> 'Y';
Line: 2511

   cursor selection_member_c(p_dim in varchar2, l_selection_name in varchar2) is   select a.member
    from    zpb_solve_output_selections a, zpb_line_dimensionality b,
            zpb_solve_member_defs c
    where   a.member = b.member
    AND     a.dimension = b.dimension
    AND     a.member = c.member
    AND     a.analysis_cycle_id = c.analysis_cycle_id
    AND     a.analysis_cycle_id = b.analysis_cycle_id
    AND     b.analysis_cycle_id = p_analysis_cycle_id
    AND     c.source_type = 1000
    AND     b.exclude_from_solve_flag = 'N'
    AND     selection_name = l_selection_name
    AND     a.dimension= p_dim
    AND     NVL(a.match_input_flag, 'N') <> 'Y'
    union
    select a.member
    from    zpb_solve_output_selections a,
            zpb_solve_member_defs b
    where   a.member = b.member
    AND     a.analysis_cycle_id = b.analysis_cycle_id
    AND     b.analysis_cycle_id = p_analysis_cycle_id
    AND     b.source_type <> 1000
    AND     selection_name = l_selection_name
    AND     a.dimension= p_dim
    AND     NVL(a.match_input_flag, 'N') <> 'Y';
Line: 2538

  cursor  hiermember_c(p_dim in varchar2, l_selection_name in varchar2,
                   l_hierarchy in varchar2) is
   select o.member
     from zpb_solve_output_selections o
    where o.dimension = p_dim
      and o.analysis_cycle_id = p_analysis_cycle_id
      and o.selection_name = l_selection_name
      and o.hierarchy = l_hierarchy
      AND NVL(o.match_input_flag, 'N') <> 'Y';
Line: 2551

  SAVEPOINT validate_output_selections;
Line: 2630

    open nullselections_c(l_currentDim, l_timedim);
Line: 2631

    fetch nullselections_c into l_currentLine, l_fetchedDim, l_outputSelection;
Line: 2634

    while nullselections_c%found loop
          l_dimValid := 'N';
Line: 2642

        fetch nullselections_c into l_currentLine,l_fetchedDim, l_outputSelection;
Line: 2645

     close nullselections_c;
Line: 2650

     open nonnullselections_c(l_currentDim, l_timedim);
Line: 2651

     fetch nonnullselections_c into l_outputSelection,l_hierarchy;
Line: 2654

     while nonnullselections_c%found loop

       -- get a line member that corresponds to this output selection.
       -- this line member will be used to limit the output selection valueset

       open selection_member_c(l_currentDim,l_outputSelection);
Line: 2660

       fetch selection_member_c into l_currentLine;
Line: 2661

       close selection_member_c;
Line: 2701

           open hiermember_c(l_currentDim,l_outputSelection, l_hierarchy);
Line: 2713

       fetch nonnullselections_c into l_outputSelection, l_hierarchy;
Line: 2714

    end loop; -- loop over output selections
Line: 2717

    close nonnullselections_c;
Line: 2736

    ROLLBACK TO validate_output_selections;
Line: 2743

    ROLLBACK TO validate_output_selections;
Line: 2750

    ROLLBACK TO validate_output_selections;
Line: 2766

end validate_output_selections;
Line: 2773

PROCEDURE val_solve_hrzselections(
  p_api_version          IN NUMBER,
  p_init_msg_list        IN VARCHAR2 := FND_API.G_FALSE,
  p_commit               IN VARCHAR2 :=  FND_API.G_FALSE,
  p_validation_level     IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
  x_return_status        OUT NOCOPY VARCHAR2 ,
  x_msg_count            OUT NOCOPY NUMBER,
  x_msg_data             OUT NOCOPY VARCHAR2,
  p_analysis_cycle_id    IN  zpb_analysis_cycles.analysis_cycle_id%type,
  p_hrz_level            IN VARCHAR2,
  x_isvalid              OUT NOCOPY VARCHAR2) IS

  l_api_name      CONSTANT VARCHAR2(30) := 'val_solve_hrzselections';
Line: 2787

  l_hierarchy        zpb_solve_output_selections.hierarchy%type;
Line: 2798

  TYPE  selections_cur is REF CURSOR;
Line: 2799

  input_selections_cur selections_cur;
Line: 2800

  output_selections_cur selections_cur;
Line: 2805

  SAVEPOINT val_solve_hrzselections;
Line: 2845

  sql_stmt := ' select member from ' ||
                    ' zpb_solve_input_selections a where ' ||
                    ' :1 = a.analysis_cycle_id and ' ||
                    ' :2 = a.dimension  ' ||
                    ' and not exists ( select b.hierarchy  from   ' ||
                    ' zpb_solve_input_selections b where  ' ||
                    ' a.analysis_cycle_id =  b.analysis_cycle_id  ' ||
                    ' and a.member = b.member  ' ||
                    ' and a.dimension = b.dimension  ' ||
                    ' and b.hierarchy in ' || l_hierlist||')';
Line: 2857

  open input_selections_cur for sql_stmt using p_analysis_cycle_id,
                               l_timedim;
Line: 2860

  fetch input_selections_cur into l_hiername;
Line: 2862

 if input_selections_cur%found then
--     dbms_output.put_line('i' || ' ' ||l_hierName);
Line: 2866

  close input_selections_cur;
Line: 2870

  sql_stmt := ' select member from ' ||
                    ' zpb_solve_output_selections a where ' ||
                    ' :1 = a.analysis_cycle_id and ' ||
                    ' :2 = a.dimension  ' ||
                    ' and not exists ( select b.hierarchy  from   ' ||
                    ' zpb_solve_output_selections b where  ' ||
                    ' a.analysis_cycle_id =  b.analysis_cycle_id  ' ||
                    ' and a.member = b.member  ' ||
                    ' and a.dimension = b.dimension  ' ||
                    ' and b.hierarchy in ' || l_hierlist || ')';
Line: 2881

  open output_selections_cur for sql_stmt using p_analysis_cycle_id,
                               l_timedim;
Line: 2883

  fetch output_selections_cur into l_hiername;
Line: 2884

  if output_selections_cur%found then
--     dbms_output.put_line('i' || ' ' ||l_hierName);
Line: 2888

  close output_selections_cur;
Line: 2892

    ROLLBACK TO val_solve_hrzselections;
Line: 2899

    ROLLBACK TO val_solve_hrzselections;
Line: 2906

    ROLLBACK TO  val_solve_hrzselections;
Line: 2923

end val_solve_hrzselections;
Line: 2928

PROCEDURE delete_view(p_analysis_cycle_id IN zpb_analysis_cycles.analysis_cycle_id%type)

IS
 l_pub_ac_id       zpb_analysis_cycles.analysis_cycle_id%type;
Line: 2933

 l_api_name      CONSTANT VARCHAR2(30) := 'delete_view';
Line: 2937

    select status_code
    from zpb_analysis_cycles
    where analysis_cycle_id = p_analysis_cycle_id;
Line: 2943

  SAVEPOINT zpb_acval_pvt_delete_view;
Line: 2948

   update zpb_analysis_cycles set status_code = 'MARKED_FOR_DELETION' where analysis_cycle_id = p_analysis_cycle_id ;
Line: 2949

   update ZPB_DC_OBJECTS set DELETE_INSTANCE_MEASURES_FLAG = 'Y' where ac_instance_id = p_analysis_cycle_id ;
Line: 2951

   delete FROM zpb_measure_scope WHERE instance_ac_id = p_analysis_cycle_id;
Line: 2952

   delete FROM zpb_measure_scope_exempt_users  WHERE BUSINESS_PROCESS_ENTITY_ID  = p_analysis_cycle_id;
Line: 2955

  ZPB_LOG.WRITE(G_PKG_NAME || '.' || l_api_name, ' View Deleted with Analysis Cycleid' || p_analysis_cycle_id || '.');
Line: 2959

    ROLLBACK TO zpb_acval_pvt_delete_view;
Line: 2963

    ROLLBACK TO zpb_acval_pvt_delete_view;
Line: 2968

    ROLLBACK TO zpb_acval_pvt_delete_view;
Line: 2971

end delete_view;
Line: 2981

CURSOR c_val_res IS SELECT distinct message_type FROM
   ZPB_BP_VALIDATION_RESULTS WHERE BUS_PROC_ID = l_bp_id;
Line: 2984

CURSOR c_override_rt_warn IS SELECT value
  FROM zpb_ac_param_values WHERE analysis_cycle_id = l_bp_id
   AND param_id = (select to_number(tag) FROM fnd_lookup_values_vl
                   WHERE LOOKUP_TYPE = 'ZPB_PARAMS'
                     AND LOOKUP_CODE = 'IGNORE_RT_BP_VAL_WARNINGS');