DBA Data[Home] [Help]

APPS.PO_WF_PO_RULE_ACC SQL Statements

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

Line: 36

     PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 97

  SELECT        min(hrecv.default_code_combination_id),min(hrecv.business_group_id),
                min(fsp.business_group_id)
  INTO          x_ccid,x_bg_id_hr,x_bg_id_fsp
  FROM          per_workforce_current_x hrecv,    --R12 CWK Enhancement

              --< Shared Proc FPJ Start >
                --financials_system_parameters fsp
                financials_system_params_all fsp
              --< Shared Proc FPJ End >
   ,  GL_SETS_OF_BOOKS emp_sob
   ,  GL_SETS_OF_BOOKS org_sob

  WHERE         hrecv.person_id = x_requester_id
  AND           hrecv.business_group_id = fsp.business_group_id
   AND  org_sob.set_of_books_id = fsp.set_of_books_id
   AND  emp_sob.set_of_books_id = hrecv.set_of_books_id
   AND  emp_sob.chart_of_accounts_id = org_sob.chart_of_accounts_id

              --< Shared Proc FPJ Start >
              -- NVL is required for the single-org instance case.
AND           NVL(fsp.org_id, -99) = NVL(l_expense_rules_org_id, -99);
Line: 162

	PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 173

    PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 186

  Select CHARGE_ACCOUNT_ID
	 into x_ccid
  from 	 POR_FAV_CHARGE_ACCOUNTS
  where  EMPLOYEE_ID =  x_user_id and
	 RESPONSIBILITY_ID = x_resp_id and
	 DEFAULT_ACCOUNT = 'Y';
Line: 277

	PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,l_progress);
Line: 314

	PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,
               'PO_WF_PO_RULE_ACC.if_rule_exist_for_all_segments '||
               'l_expense_rules_org_id='||l_expense_rules_org_id);
Line: 325

	PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,
               'PO_WF_PO_RULE_ACC.if_rule_exist_for_all_segments '||
               'get_segment_records->result='||l_get_result);
Line: 345

  select count(*)
  into   l_segments_number_sob
  from   FND_ID_FLEX_SEGMENTS fs,

       --< Shared Proc FPJ Start >
         --financials_system_parameters fsp,
         financials_system_params_all fsp,
       --< Shared Proc FPJ End >

         gl_sets_of_books gls
  where  fsp.set_of_books_id = gls.set_of_books_id and
         fs.id_flex_num = gls.chart_of_accounts_id and
         fs.id_flex_code = 'GL#' and
         fs.application_id = 101 AND

       --< Shared Proc FPJ Start >
       -- NVL is required for the single-org instance case.
         NVL(fsp.org_id, -99) = NVL(l_expense_rules_org_id, -99);
Line: 381

      select gls.chart_of_accounts_id
      into   l_chart_of_accounts_id

    --< Shared Proc FPJ Start >
      --from   financials_system_parameters fsp,
      FROM   financials_system_params_all fsp,
    --< Shared Proc FPJ End >

             gl_sets_of_books gls
      where  fsp.set_of_books_id = gls.set_of_books_id AND

           --< Shared Proc FPJ Start >
             -- NVL is required for the single-org instance case.
             NVL(fsp.org_id, -99) = NVL(l_expense_rules_org_id, -99);
Line: 444

	PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,
               'PO_WF_PO_RULE_ACC.if_rule_exist_for_all_segments '||
               'result='||result);
Line: 449

  l_segment_table.DELETE;
Line: 457

	  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,
               'PO_WF_PO_RULE_ACC.if_rule_exist_for_all_segments '||
               'EXCEPTION at '|| l_progress);
Line: 483

     PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 503

     l_segment_table.DELETE;
Line: 571

	PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,
               'PO_WF_PO_RULE_ACC.get_segment_records '||
               'l_expense_rules_org_id='||l_expense_rules_org_id);
Line: 582

  	--SELECT	PREA.segment_name, PREA.segment_value, FFSV.segment_num
  	SELECT	FFSV.segment_name, PREA.segment_value, FFSV.segment_num
  	--FROM	PO_RULE_EXPENSE_ACCOUNTS_V PREA,
  	FROM	PO_RULE_EXPENSE_ACCOUNTS PREA,
  --< Shared Proc FPJ End >

		fnd_id_flex_segments_vl FFSV,

      --< Shared Proc FPJ Start >
        --financials_system_parameters fsp,
        financials_system_params_all fsp,
            MTL_CATEGORIES_KFV MCK,
            MTL_CATEGORY_SETS MCS,
            MTL_DEFAULT_CATEGORY_SETS MDCS,
            MTL_CATEGORIES MC,
      --< Shared Proc FPJ End >

       		gl_sets_of_books gls

  	WHERE	PREA.rule_type = 'ITEM CATEGORY'
  	AND	PREA.RULE_VALUE_ID = x_category_id

    --< Shared Proc FPJ Start >
	--AND	PREA.segment_name is NOT NULL
    AND	FFSV.segment_name is NOT NULL
    --< Shared Proc FPJ Start >

	AND	PREA.segment_value is NOT NULL
        AND     PREA.segment_num = FFSV.application_column_name
        AND     FFSV.application_id = 101
        and     FFSV.id_flex_code = 'GL#'
        and     FFSV.id_flex_num = gls.chart_of_accounts_id
        and     fsp.set_of_books_id = gls.set_of_books_id

      --< Shared Proc FPJ Start >
      -- NVL is required for the single-org instance case.
        AND     NVL(FSP.org_id, -99) = NVL(l_expense_rules_org_id, -99)
        AND     NVL(PREA.org_id, -99) = NVL(l_expense_rules_org_id, -99)

        AND MCK.ENABLED_FLAG = 'Y'
        AND SYSDATE BETWEEN NVL(MCK.START_DATE_ACTIVE,SYSDATE)
        AND NVL(MCK.END_DATE_ACTIVE,SYSDATE)
        AND MCS.CATEGORY_SET_id=mdcs.category_set_id
        AND MDCS.FUNCTIONAL_AREA_ID=2
        AND MCK.STRUCTURE_ID=MCS.STRUCTURE_ID
        AND NVL(mck.DISABLE_DATE,SYSDATE + 1) > SYSDATE
        AND (MCS.VALIDATE_FLAG='Y'
            AND mck.CATEGORY_ID IN
               (SELECT
                    MCSV.CATEGORY_ID
                FROM
                    MTL_CATEGORY_SET_VALID_CATS MCSV
                WHERE MCSV.CATEGORY_SET_ID=MCS.CATEGORY_SET_ID)
            OR MCS.VALIDATE_FLAG <> 'Y')
        AND MCK.CATEGORY_ID = MC.CATEGORY_ID
        AND PREA.RULE_VALUE_ID = MCK.CATEGORY_ID
      --< Shared Proc FPJ End >

	order by FFSV.segment_num asc;