DBA Data[Home] [Help]

APPS.BEN_PLAN_DESIGN_WIZARD_API SQL Statements

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

Line: 11

,p_delete_clause in varchar2
,l_query out nocopy varchar2) is
 l_static varchar2(200):='select copy_entity_result_id,table_alias, information1 pk_id,dml_operation from ben_copy_entity_results where copy_entity_txn_id = ' || p_copy_entity_txn_id || ' and ' ||
 'table_alias in (';
Line: 157

  l_query := l_static || l_dynamic || ' = ' ||p_pk_id || p_delete_clause ;
Line: 163

procedure delete_dpnts(p_table_alias in varchar2
, p_copy_entity_txn_id in Number
,p_pk_id in Number
,p_top_level_result_id in varchar2) is
type c_dpnts is REF CURSOR;
Line: 170

cursor l_template is select copy_entity_result_id,table_alias,information1  pk_id, dml_operation from ben_copy_entity_results;
Line: 172

l_proc varchar2(72) := g_package||'delete_dpnts';
Line: 173

l_delete_clause varchar2(100) := ' AND( DML_OPERATION <> ''DELETE'' OR pd_parent_entity_result_id IS NULL )';
Line: 177

  get_query(p_table_alias,p_copy_entity_txn_id,p_pk_id,l_delete_clause,l_query);
Line: 184

        delete_dpnts(l_dpnt_rows.table_alias,p_copy_entity_txn_id,l_dpnt_rows.pk_id,p_top_level_result_id);
Line: 188

             IF(l_dpnt_rows.dml_operation = 'INSERT') THEN
                delete from ben_copy_entity_results where copy_entity_result_id = l_dpnt_rows.copy_entity_result_id ;
Line: 192

                update ben_copy_entity_results set dml_operation = 'DELETE',datetrack_mode ='DELETE',pd_parent_entity_result_id= p_top_level_result_id where copy_entity_result_id = l_dpnt_rows.copy_entity_result_id ;
Line: 195

             IF(l_dpnt_rows.dml_operation = 'REUSE' OR l_dpnt_rows.dml_operation = 'UPDATE') THEN
                null;
Line: 198

                delete from ben_copy_entity_results where copy_entity_result_id = l_dpnt_rows.copy_entity_result_id ;
Line: 205

end delete_dpnts;
Line: 213

    UPDATE ben_copy_entity_results cer
        set (table_route_id, order_in_hierarchy) =
                (select table_route_id,display_order
                    from pqh_table_route
                    where from_clause ='OAB'
                    and table_alias = cer.table_alias)
                where cer.copy_entity_txn_id = p_copy_entity_txn_id
                and( table_route_id is null
                or order_in_hierarchy is null);
Line: 241

    UPDATE ben_copy_entity_results cer
        set (table_route_id, order_in_hierarchy) =
                (select table_route_id,display_order
                    from pqh_table_route
                    where from_clause ='OAB'
                    and table_alias = cer.table_alias)
       where cer.copy_entity_txn_id = p_copy_entity_txn_id
       and (pd_parent_entity_result_id = p_parent_entity_result_id
       or copy_entity_result_id = p_parent_entity_result_id)
       and( table_route_id is null
       or order_in_hierarchy is null);
Line: 267

procedure update_result_rows(p_copy_entity_txn_id in number)
is
 l_proc varchar2(72) := g_package||'update_result_rows';
Line: 274

    select src_effective_date into l_effectve_date
    from pqh_copy_entity_txns
    where copy_entity_txn_id = p_copy_entity_txn_id;
Line: 280

    UPDATE ben_copy_entity_results cer
            set number_of_copies = 0
                where cer.copy_entity_txn_id = p_copy_entity_txn_id
                and l_effectve_date not between information2 and information3;
Line: 290

end  update_result_rows;
Line: 292

procedure validate_delete_api_calls
( p_copy_entity_txn_id in Number
 ,p_parent_entity_result_id in varchar2
 ,p_delete_failed out nocopy varchar2
)is
l_validate number :=0;
Line: 304

savepoint VALIDATE_DELETE_API_CALLS;
Line: 307

update ben_copy_entity_results set dml_operation = 'DELETE',datetrack_mode ='DELETE' where copy_entity_result_id = p_parent_entity_result_id ;
Line: 308

ben_plan_design_delete_api.call_delete_apis_for_hierarchy
( p_process_validate => l_validate
 ,p_copy_entity_txn_id => p_copy_entity_txn_id
 ,p_parent_entity_result_id => p_parent_entity_result_id
 ,p_delete_failed => p_delete_failed
);
Line: 314

rollback to VALIDATE_DELETE_API_CALLS;
Line: 319

   ROLLBACK TO VALIDATE_DELETE_API_CALLS;
Line: 321

end validate_delete_api_calls;
Line: 325

procedure delete_Entity
(p_copy_entity_txn_id in Number
,p_copy_entity_result_id in Number
,p_table_alias in Varchar2
) is

l_pk_id Number;
Line: 332

l_proc varchar2(72) := g_package||'delete_entity';
Line: 335

           select information1 from ben_copy_entity_results where
            copy_entity_result_id = p_copy_entity_result_id;
Line: 345

    delete_dpnts(p_table_alias,p_copy_entity_txn_id,l_pk_id,p_copy_entity_result_id);
Line: 354

end delete_Entity  ;
Line: 356

procedure delete_entity
(p_copy_entity_txn_id in Number
,p_copy_entity_result_id in Number
,p_table_alias in Varchar2
,p_top_level_entity in varchar2
) is

l_pk_id Number;
Line: 364

p_delete_failed varchar2(1) := 'N';
Line: 365

l_proc varchar2(72) := g_package||'delete_entity';
Line: 367

           select information1 from ben_copy_entity_results where
            copy_entity_result_id = p_copy_entity_result_id;
Line: 377

    delete_dpnts(p_table_alias,p_copy_entity_txn_id,l_pk_id,p_copy_entity_result_id);
Line: 387

    validate_delete_api_calls
     (p_copy_entity_txn_id =>p_copy_entity_txn_id
     ,p_parent_entity_result_id =>p_copy_entity_result_id
     ,p_delete_failed => p_delete_failed
     );
Line: 394

end delete_Entity  ;
Line: 403

 ,p_delete_failed            out nocopy varchar2
)
is

cursor c_effective_date is
    select src_effective_date
    from pqh_copy_entity_txns
    where copy_entity_txn_id = p_copy_entity_txn_id;
Line: 424

    update_result_rows(p_copy_entity_txn_id);
Line: 431

     savepoint DELETE_REQUEST;
Line: 432

       ben_plan_design_delete_api.call_delete_apis
       ( p_process_validate   => p_process_validate
        ,p_copy_entity_txn_id => p_copy_entity_txn_id
        ,p_delete_failed      => p_delete_failed
       );
Line: 442

      UPDATE ben_copy_entity_results cer
       set number_of_copies = 0
          where cer.copy_entity_txn_id = p_copy_entity_txn_id
          and l_effective_date between information2 and information3
          and cer.dml_operation = 'DELETE';
Line: 453

      rollback to DELETE_REQUEST;
Line: 454

      p_delete_failed :='Y';
Line: 465

/*-- call delete again if the delete failed previously
   if(p_delete_failed ='Y') then
      p_delete_failed:='N';
Line: 468

      ben_plan_design_delete_api.call_delete_apis
      ( p_process_validate   => p_process_validate
      ,p_copy_entity_txn_id => p_copy_entity_txn_id
      ,p_delete_failed      => p_delete_failed
      );
Line: 527

procedure reuse_deleted_hierarchy
(p_copy_entity_txn_id in number
 ,p_copy_entity_result_id in number)is
begin
    update ben_copy_entity_results
    set dml_operation = 'REUSE'
       ,datetrack_mode= 'INSERT'
       ,pd_parent_entity_result_id = null
    where
    copy_entity_txn_id  = p_copy_entity_txn_id
    and (pd_parent_entity_result_id = p_copy_entity_result_id
    or copy_entity_result_id =  p_copy_entity_result_id);