WIP Account Summary

Description
Categories: BI Publisher
Application: Work in Process
Source: WIP Account Summary Report (XML)
Short Name: WIPUTACS_XML
DB package: WIP_WIPUTACS_XMLP_PKG
select &P_FLEXDATA C_FLEXDATA,
       L.description Account_Description,
       M.meaning Transaction_Type,
       SUM(GREATEST(round(WA.base_transaction_value,:mprecision),0))  C_DEBITS,
       ABS(SUM(LEAST(round(WA.base_transaction_value,:mprecision),0)))  C_CREDITS,
       SUM(round(WA.base_transaction_value,:mprecision)) C_NET_ACTIVITY,
	fnd_flex_xml_publisher_apis.process_kff_combination_1('account', 'SQLGL', 'GL#', CHART_OF_ACCOUNTS_ID, NULL, CODE_COMBINATION_ID, 'ALL', 'Y', 'VALUE') Account, 
/*	WIP_WIPUTACS_XMLP_PKG.c_acct_descripformula(( L.SEGMENT1 || '\n' || L.SEGMENT2 || '\n' || L.SEGMENT3 || '\n' || L.SEGMENT4 || '\n' || L.SEGMENT5 || '\n' || L.SEGMENT6 || '\n' || L.SEGMENT7 || '\n' || L.SEGMENT8 || '\n' || L.SEGMENT9 || '\n' || L.SEGMENT10 || '\n' || L.SEGMENT11 || '\n' || L.SEGMENT12 || '\n' || L.SEGMENT13 || '\n' || L.SEGMENT14 || '\n' || L.SEGMENT15 || '\n' || L.SEGMENT16 || '\n' || L.SEGMENT17 || '\n' || L.SEGMENT18 || '\n' || L.SEGMENT19 || '\n' || L.SEGMENT20 || '\n' || L.SEGMENT21 || '\n' || L.SEGMENT22 || '\n' || L.SEGMENT23 || '\n' || L.SEGMENT23 || '\n' || L.SEGMENT25 || '\n' || L.SEGMENT26 || '\n' || L.SEGMENT27 || '\n' || L.SEGMENT28 || '\n' || L.SEGMENT29 || '\n' || L.SEGMENT30 ), :Account, :C_ACCT_DESCRIP) C_ACCT_DESCRIP,*/ 
fnd_flex_xml_publisher_apis.process_kff_combination_1('c_acct_descrip', 'SQLGL', 'GL#', CHART_OF_ACCOUNTS_ID, NULL, CODE_COMBINATION_ID, 'ALL', 'Y', 'DESCRIPTION') C_ACCT_DESCRIP,
	WIP_WIPUTACS_XMLP_PKG.c_flex_sortformula(( L.SEGMENT1 || '\n' || L.SEGMENT2 || '\n' || L.SEGMENT3 || '\n' || L.SEGMENT4 || '\n' || L.SEGMENT5 || '\n' || L.SEGMENT6 || '\n' || L.SEGMENT7 || '\n' || L.SEGMENT8 || '\n' || L.SEGMENT9 || '\n' || L.SEGMENT10 || '\n' || L.SEGMENT11 || '\n' || L.SEGMENT12 || '\n' || L.SEGMENT13 || '\n' || L.SEGMENT14 || '\n' || L.SEGMENT15 || '\n' || L.SEGMENT16 || '\n' || L.SEGMENT17 || '\n' || L.SEGMENT18 || '\n' || L.SEGMENT19 || '\n' || L.SEGMENT20 || '\n' || L.SEGMENT21 || '\n' || L.SEGMENT22 || '\n' || L.SEGMENT23 || '\n' || L.SEGMENT23 || '\n' || L.SEGMENT25 || '\n' || L.SEGMENT26 || '\n' || L.SEGMENT27 || '\n' || L.SEGMENT28 || '\n' || L.SEGMENT29 || '\n' || L.SEGMENT30 ), :Account, :C_ACCT_DESCRIP, :C_FLEX_SORT) C_FLEX_SORT
from gl_code_combinations L,      
      mfg_lookups M,
      wip_transaction_accounts WA,
     wip_transactions WT,
     mtl_categories_b mc,
      mtl_item_categories mic
 where WT.Organization_id = :P_Organization_Id
 and WA.accounting_line_type != 15
 and &P_PROJECT_WHERE 
 &Limit_Dates
  and WA.transaction_id = WT.transaction_id
  and  mic.organization_id(+) = :P_Organization_Id
  and  mic.category_set_id(+) = :P_Category_Set
  and  mic.inventory_item_id(+) = WT.primary_item_id
  and  mc.category_id(+) = mic.category_id
  and &P_Cat_Where
  and WA.organization_id = :P_Organization_Id
 &P_Limit_Accounts
  and NVL(wa.gl_batch_id,-1) = NVL(:P_GL_Batch_Id,NVL(wa.gl_batch_id,-1))
  and WA.reference_account = L.code_combination_id
  and L.chart_of_accounts_id = &P_STRUCT_NUM
   and M.lookup_code = WT.transaction_type
  and M.lookup_type = 'WIP_TRANSACTION_TYPE'
 group by &P_FLEXDATA, L.description, M.meaning
  , fnd_flex_xml_publisher_apis.process_kff_combination_1('account', 'SQLGL', 'GL#', CHART_OF_ACCOUNTS_ID, NULL, CODE_COMBINATION_ID, 'ALL', 'Y', 'VALUE'),fnd_flex_xml_publisher_apis.process_kff_combination_1('c_acct_descrip', 'SQLGL', 'GL#', CHART_OF_ACCOUNTS_ID, NULL, CODE_COMBINATION_ID, 'ALL', 'Y', 'DESCRIPTION')
order by &P_FLEXDATA, M.meaning
Parameter Name SQL text Validation
Dates From
 
Date
To
 
Date
Account
 
GL Batch
 
LOV Oracle
Category Set
 
LOV Oracle
Category From
 
Category To
 
Project Id
 
LOV Oracle
Flex Structure Number
 
Number
Currency Code
 
LOV Oracle
Org_Id
 
Number
Category Structure
 
Number
Project_Dummy
 
Number