Featured post

General Ledger Revaluation

General Ledger Revaluation Account balances denominated in foreign currencies are adjusted through the revaluation procedure. Revaluat...

Tuesday, 16 May 2017

Query: Exp Item Details - Cost Distribution Lines

select
    ppa.segment1                                "Project",
    peia.expenditure_item_id                    "Trans Id" ,
    --
    pcdl.line_num                               "Line Number",
    pcdl.line_type                              "Line Type",
    pcdl.pa_date                                "PA Date",
    pcdl.pa_period_name                         "PA Period",
    pcdl.gl_date                                "GL Date",
    pcdl.gl_period_name                         "GL Period Name",
    pcdl.amount                                 "Amount",
    pcdl.acct_currency_code                     "Functional:Currency",
    pcdl.acct_raw_cost                          "Functional:Amount",
    pcdl.acct_burdened_cost                       "Functional:Burdened Cost",
    pcdl.projfunc_currency_code                     "Project Func:Currency",
    pcdl.amount                                 "Project Func:Amount",
    pcdl.burdened_cost                          "Project Func:Burdened Cost",
    pcdl.denom_currency_code                  "Transaction:Currency Code",
    pcdl.denom_raw_cost                         "Transaction:Amount",
    pcdl.denom_burdened_cost                  "Transaction:Burdened Cost",
    pcdl.transfer_status_code                   "Transfer Status",
    pcdl.transferred_date                       "Transfer Date",
    ' '                                         "Detail",  ------
   (select gcc.concatenated_segments
        from gl_code_combinations_kfv gcc
        where gcc.code_combination_id = pcdl.dr_code_combination_id)    "Debit",
    (select gcc.concatenated_segments
        from gl_code_combinations_kfv gcc
        where gcc.code_combination_id =pcdl.cr_code_combination_id)     "Credit",
    pcdl.work_type_id                           "Work Type",
    --
    peia.project_id,
    peia.task_id,
    peia.expenditure_id,
    pcdl.expenditure_item_id
from
    pa_cost_distribution_lines_all  pcdl,
    pa_expenditure_items_all peia,
    pa_expenditures_all pea,
    pa_projects_all ppa,
    pa_tasks pt
where
    1=1
and pcdl.expenditure_item_id = peia.expenditure_item_id
and peia.expenditure_id = pea.expenditure_id
and peia.project_id = ppa.project_id
and peia.task_id = pt.task_id
and ppa.project_id = pt.project_id
--
and ppa.segment1 = 'ATZ Services'
and pt.task_number = '1.1'
and peia.expenditure_item_date = to_date('04-JUN-2004')
order by
    1,2,3;

No comments:

Post a Comment

Please review my topic and update your comments

Note: only a member of this blog may post a comment.