DBA Data[Home] [Help]

APPS.PQH_RFT_SHD SQL Statements

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

Line: 68

    select
		ref_template_id,
	base_template_id,
	parent_template_id,
        reference_type_cd,
	object_version_number
    from	pqh_ref_templates
    where	ref_template_id = p_ref_template_id;
Line: 143

    select 	ref_template_id,
	base_template_id,
	parent_template_id,
        reference_type_cd,
	object_version_number
    from	pqh_ref_templates
    where	ref_template_id = p_ref_template_id
    for	update nowait;
Line: 235

procedure create_update_copied_attribute
  (
   p_copied_attributes      in     pqh_prvcalc.t_attid_priv,
   p_template_id            in     number,
   p_owner                  in  varchar2  default null) is
  --
  Cursor csr_tem_attr(p_attribute_id in number) is
   Select template_attribute_id,object_version_number
     From pqh_template_attributes
    Where template_id = p_template_id
      and attribute_id = p_attribute_id
      FOR UPDATE ;
Line: 248

  cursor c_select_flag(p_attribute_id number, p_template_id number) is
  select 'x'
  from pqh_attributes att, pqh_txn_category_attributes tct, pqh_templates tem
  where
  att.attribute_id = p_attribute_id
  and att.attribute_id = tct.attribute_id
  and tem.template_id = p_template_id
  and tct.transaction_category_id = tem.transaction_category_id
  and nvl(tct.select_flag,'N')='Y';
Line: 265

  l_proc varchar2(72) := g_package||'create_update_copied_attribute';
Line: 269

 l_last_updated_by            pqh_template_attributes.last_updated_by%TYPE;
Line: 271

 l_last_update_date           pqh_template_attributes.last_update_date%TYPE;
Line: 272

 l_last_update_login          pqh_template_attributes.last_update_login%TYPE;
Line: 281

    l_last_updated_by := -1;
Line: 284

    l_last_updated_by := 0;
Line: 287

  l_last_updated_by := fnd_load_util.owner_id(p_owner);
Line: 288

  l_created_by := l_last_updated_by;
Line: 291

  l_last_update_date := sysdate;
Line: 292

  l_last_update_login := 0;
Line: 296

    open c_select_flag(p_copied_attributes(cnt).attribute_id, p_template_id);
Line: 297

    fetch c_select_flag into l_dummy;
Line: 298

    if c_select_flag%found then
      --
      If  p_copied_attributes(cnt).mode_flag = 'E' then
          l_view_flag := 'Y';
Line: 317

        update pqh_template_attributes
        set
         required_flag            = p_copied_attributes(cnt).reqd_flag
        ,view_flag                = l_view_flag
        ,edit_flag                = l_edit_flag
        ,last_update_date = l_last_update_date
        ,last_updated_by = l_last_updated_by
        ,last_update_login = l_last_update_login
        where template_attribute_id = l_template_attribute_id;
Line: 329

        insert into pqh_template_attributes
        (
         required_flag
        ,view_flag
        ,edit_flag
        ,template_attribute_id
        ,attribute_id
        ,template_id
        ,object_version_number
        ,LAST_UPDATE_DATE, LAST_UPDATED_BY,
         LAST_UPDATE_LOGIN, CREATED_BY, CREATION_DATE
       )
       values
       (
         p_copied_attributes(cnt).reqd_flag
        ,l_view_flag
        ,l_edit_flag
        ,pqh_template_attributes_s.nextval
        ,p_copied_attributes(cnt).attribute_id
        ,p_template_id
        ,1
        ,L_LAST_UPDATE_DATE, L_LAST_UPDATED_BY,
         L_LAST_UPDATE_LOGIN, L_CREATED_BY, L_CREATION_DATE);
Line: 358

    close c_select_flag;
Line: 365

end create_update_copied_attribute;
Line: 375

  pqh_prvcalc.task_result_update(p_parent_template_id,
                                 'T',
                                 copied_attr_tab);
Line: 378

  pqh_prvcalc.task_result_update(p_base_template_id,
                                 'T',
                                 copied_attr_tab);
Line: 386

     create_update_copied_attribute
                            (p_copied_attributes => copied_attr_tab
                            ,p_template_id       => p_parent_template_id
                            ,p_owner             => p_owner);
Line: 401

  ,p_last_update_date               in  varchar2
)  is
  l_dummy                       varchar2(10);
Line: 409

 l_last_updated_by            pqh_templates.last_updated_by%TYPE;
Line: 411

 l_last_update_date           pqh_templates.last_update_date%TYPE;
Line: 412

 l_last_update_login          pqh_templates.last_update_login%TYPE;
Line: 415

  select template_id
  from pqh_templates_vl
  where short_name = p_template_short_name;
Line: 421

  select 'x'
  from pqh_ref_templates
  where parent_template_id = p_parent_template_id
  and base_template_id = p_base_template_id;
Line: 437

    l_last_updated_by := -1;
Line: 440

    l_last_updated_by := 0;
Line: 445

  l_last_updated_by := fnd_load_util.owner_id(p_owner);
Line: 448

  l_creation_date := nvl(to_date(p_last_update_date,'YYYY/MM/DD'),trunc(sysdate));
Line: 449

  l_last_update_date := nvl(to_date(p_last_update_date,'YYYY/MM/DD'),trunc(sysdate));
Line: 452

  l_last_update_date := sysdate;
Line: 454

  l_last_update_login := 0;
Line: 469

          update PQH_REF_TEMPLATES
          set reference_type_cd = p_reference_type_cd,
            last_update_date = l_last_update_date,
            last_updated_by = l_last_updated_by,
            last_update_login = l_last_update_login
          where parent_template_id = l_parent_template_id
          and base_template_id = l_base_template_id;
Line: 479

         insert into pqh_ref_templates
        (REF_TEMPLATE_ID, BASE_TEMPLATE_ID, PARENT_TEMPLATE_ID,
         OBJECT_VERSION_NUMBER, LAST_UPDATE_DATE, LAST_UPDATED_BY,
         LAST_UPDATE_LOGIN, CREATED_BY, CREATION_DATE,
         REFERENCE_TYPE_CD )
         values
        (PQH_REF_TEMPLATES_S.NEXTVAL, L_BASE_TEMPLATE_ID, L_PARENT_TEMPLATE_ID,
         L_OBJECT_VERSION_NUMBER, L_LAST_UPDATE_DATE, L_LAST_UPDATED_BY,
         L_LAST_UPDATE_LOGIN, L_CREATED_BY, L_CREATION_DATE,
         P_REFERENCE_TYPE_CD );