FND_FLEX_VALUES and GL_CODE_COMBINATIONS

Hello all,
I have to value a value with a certain segment from the code combination.
With which segment I have to compare I have to search by a generic way out of FND tables. (value sets attached to segments)
I have already following query:
SELECT gcc.SEGMENT2, ffv.flex_value
FROM fnd_segment_attribute_values fsav,
fnd_id_flex_segments fifs,
fnd_flex_value_sets ffvs,
fnd_flex_values ffv, gl_code_combinations gcc
WHERE fifs.id_flex_code = fsav.id_flex_code
AND fifs.id_flex_num = fsav.id_flex_num
AND fifs.id_flex_code = 'GL#'
and gcc.chart_of_accounts_id = fsav.id_flex_num
ANd gcc.ENABLED_FLAG = 'Y'
AND fsav.segment_attribute_type = 'GL_ACCOUNT'
AND fifs.application_column_name = fsav.application_column_name
AND fsav.attribute_value = 'Y'
AND ffvs.flex_value_set_id = fifs.flex_value_set_id
AND ffv.flex_value_set_id = ffvs.flex_value_set_id
AND ffv.summary_flag = 'N';
But this doesn't work correctly because the first column has to be the same as the second column. But you can't equal them because I know that in this case it is segment2 but in another case it could be segment 4 or ... So the values in FLEX_VALUE has to be correct (and for the case matching the first column, what isn't the case)
Thank you in advance!

solution:
use the compiled view to map the attributes

Similar Messages

  • Link between ZX tax tables and gl_code_combinations table in R12

    Hi All,
    I am new to Oracle apps. We are upgrading from EBS 11i to R12.1.3. In it, ar_vat_tax is obolete. I know its replacement is ZX_rates_b table. But in 11i, they are connected using
    ar_vat_tax.tax_account_id = gl_code_combinations.code_combination_id
    Now I am not able to find the join between zx tax tables and gl_code_combinations. Can anyone please help how to link these ZX tax table to gl_code_combinations???
    Regards,
    Swapnil K.

    Resolved the issue.
    There is a table called ZX_ACCOUNTS. Use the column tax_account_ccid in it. Link ZX_ACCOUNTS.tax_account_entity_id to ZX_RATES_B.tax_rate_id.
    Regards,
    Swapnil K.

  • Join between gl_import_references and ap_invoice_distributions_all in R12

    Please advice me how to join gl_import_references and ap_invoices_distribution_all in R12. I have understanding of join between gl_import_references and ap_invoices_all, but I am not clear how to join ap_invoice_distriutions_all to gl_import_references.
    Thanks

    Hi,
    we don't have direct link for GL_JE_LINES and AP_INVOICE_DISTRIBUTIONS_ALL.
    First join AP_INVOICE_DISTRIBUTIONS_ALL and GL_CODE_COMBINATIONS then link to GL_JE_LINES.
    Please see below eg:
    SELECT *
    FROM gl_code_combinations gcc,
    ap_invoice_distributions_all apd,
    gl_je_lines gjl
    WHERE gcc.code_combination_id = apd.dist_code_combination_id
    AND gcc.code_combination_id = gjl.code_combination_id;
    your case use apd.dist_code_combination_id instead of apd.po_distribution_id (>
    and apd.po_distribution_id = GJL.CODE_COMBINATION_ID Add -----------Problem here-----------)
    I hope this will help to you.
    Thanks,
    Prasad Raju

  • How to find the relation between PAY_ELEMENT_TYPES_F and GL_CODE_COMBINATIO

    Hi, could someone tell me how to find the relation between PAY_ELEMENT_TYPES_F and GL_CODE_COMBINATION tables
    that is because as you could know PAY_ELEMENT_TYPES_F holds the definitions of elements in Oracle HRMS and i need to find the accounting code of each element.
    Thanks

    Hi;
    Please check e-trm site for table relation,integration,explanation etc..
    etrm.oracle.com/
    Regard
    Helios

  • What are the different "Setup tables" in OF?

    Hi all,
    what are the different "Setup tables" in OF?
    SOMASI

    setup is depends on the various tables, for example the key flexfield structure data stores in the fnd_flex_values and the gl segments data stores in the gl_code_combinations. You have to go through from each setup.
    Srini C

  • Need help on tuning materialized view refresh

    Hi All,
    I am working on materialized view refresh tuning.Initially it was complete refresh and used to take more than 90 mins to complete.
    I changed it to fast refresh now it is completing fast. Now i have partitioned the base tables gl_balances and gl_code_combinations of column code_combination_id and created a local index on column code_combination_id then i am trying to partition the materialized on the same column to take advantage of partition change tracking.
    Size of gl_balances base tables is 40Gb and all others tables sizes are small. In where clause there all the 4 tables are mapped. If i will create the partition only on code_combination_id will i the materialized will become the candidate for partition change tracking. As i know it will be applicable for PCT. I need expert advice on this.
    While doing a fast refresh. the refresh takes less time. when there is a change in gl_balances , gl_code_combinations or gl_periods it completes in 20-30 mins. When there is a change in gl_set_of_books tables. It creates a problem here.DEL query takes more than 48 hours to complete.
    CREATE MATERIALIZED VIEW apps.BAL_PART
    REFRESH FAST ON DEMAND
    ENABLE QUERY REWRITE as
    SELECT GL.GL_CODE_COMBINATIONS21.ROWID C1,GL.GL_BALANCES21.ROWID C2, GL.GL_SETS_OF_BOOKS.ROWID C3,
    GL.GL_PERIOD.ROWID C4,
    "GL"."GL_BALANCES21"."ACTUAL_FLAG" ,
    "GL"."GL_BALANCES21"."CURRENCY_CODE" ,
    "GL"."GL_BALANCES21"."PERIOD_NUM" ,
    "GL"."GL_BALANCES21"."PERIOD_YEAR" ,
    "GL"."GL_BALANCES21"."SET_OF_BOOKS_ID" "SOB_ID",
    "GL"."GL_CODE_COMBINATIONS21"."CODE_COMBINATION_ID" "CCID",
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT1" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT10" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT11" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT12" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT13" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT14" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT2" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT3" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT4" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT5" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT6" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT7" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT8" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT9" ,
    "GL"."GL_PERIODS"."PERIOD_NAME" ,
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) Open_Bal_Cr,
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) +
    NVL("GL"."GL_BALANCES21"."PERIOD_NET_CR", 0) Close_Bal_Cr,
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) Open_Bal_Dr,
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) +
    NVL("GL"."GL_BALANCES21"."PERIOD_NET_DR", 0) Close_Bal_Dr,
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) -
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) Open_Bal,
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) -
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) +
    NVL("GL"."GL_BALANCES21"."PERIOD_NET_DR", 0) -
    NVL("GL"."GL_BALANCES21"."PERIOD_NET_CR", 0) Close_Bal,
    NVL("GL"."GL_BALANCES21"."PERIOD_NET_CR", 0) Period_Cr,
    NVL("GL"."GL_BALANCES21"."PERIOD_NET_DR", 0) Period_Dr
    FROM GL.GL_CODE_COMBINATIONS21,
    GL.GL_BALANCES21,
    GL.GL_SETS_OF_BOOKS,
    GL.GL_PERIODS
    WHERE GL.GL_BALANCES21.CODE_COMBINATION_ID =GL.GL_CODE_COMBINATIONS21.CODE_COMBINATION_ID
    AND GL.GL_SETS_OF_BOOKS.SET_OF_BOOKS_ID = GL.GL_BALANCES21.SET_OF_BOOKS_ID
    AND GL.GL_PERIODS.PERIOD_NUM = GL.GL_BALANCES21.PERIOD_NUM
    AND GL.GL_PERIODS.PERIOD_YEAR = GL.GL_BALANCES21.PERIOD_YEAR
    AND GL.GL_PERIODS.PERIOD_TYPE = GL.GL_BALANCES21.PERIOD_TYPE
    AND GL.GL_PERIODS.PERIOD_NAME = GL.GL_BALANCES21.PERIOD_NAME
    AND GL.GL_PERIODS.PERIOD_SET_NAME = GL.GL_SETS_OF_BOOKS.PERIOD_SET_NAME
    and gl.GL_CODE_COMBINATIONS21.summary_flag != 'Y'TRACE 1046 del statement
    DELETE FROM "APPS"."apps.BAL_PART" SNA$
    WHERE "C3" IN (SELECT /*+ NO_MERGE  */ * FROM (SELECT 
      CHARTOROWID("MAS$"."M_ROW$$") RID$     FROM "GL"."MLOG$_GL_SETS_OF_BOOKS"
      "MAS$"   WHERE "MAS$".SNAPTIME$$ > :B_ST1 ) AS OF SNAPSHOT(:B_SCN) MAS$)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1  17759.00  171782.99  159422121    1267371 2564144739           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        2  17759.00  171782.99  159422121    1267371 2564144739           0
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 175  (APPS)   (recursive depth: 1)
    Rows     Row Source Operation
          0  DELETE  apps.BAL_PART (cr=0 pr=0 pw=0 time=0 us)
    193128740   NESTED LOOPS  (cr=592437 pr=592422 pw=0 time=945244160 us cost=339302 size=168 card=1)
          3    SORT UNIQUE (cr=7 pr=0 pw=0 time=15832 us cost=2 size=138 card=1)
         24     TABLE ACCESS FULL MLOG$_GL_SETS_OF_BOOKS (cr=7 pr=0 pw=0 time=19 us cost=2 size=138 card=1)
    193128740    INDEX RANGE SCAN C3BOOKS (cr=592430 pr=592422 pw=0 time=789499200 us cost=339299 size=3318314250 card=110610475)(object id 2114736)
    error during execute of EXPLAIN PLAN statement
    ORA-08187: snapshot expression not allowed here
    parse error offset: 314
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                   159520897        2.12     144415.96
      latch: cache buffers chains                   134        0.06          0.68
      latch: undo global data                        33        0.02          0.15
      latch: object queue header operation          521        0.02          0.53
      log file switch (private strand flush incomplete)
                                                    532        0.31         28.26
      resmgr:cpu quantum                            155        1.40         13.49
      resmgr:internal state change                   25        0.11          2.21
      latch free                                     10        0.00          0.00
      latch: cache buffers lru chain                  4        0.00          0.00
      rdbms ipc reply                               489        0.02          0.54
      reliable message                              587        0.00          0.56
      latch: row cache objects                        3        0.00          0.00
    ********************************************************************************GL_SETS_OF_BOOKS has only 6 rows. I know there is complete refresh as a option which will again take more than 90 mins.
    I want to do the fast refresh. Tables rows details below.
    SQL> select count(*) from gl.gl_code_combinations21;
    COUNT(*)
    3075255
    SQL> select count(*) from gl.GL_PERIODS;
    COUNT(*)
    1160
    SQL> select count(*) from gl.gl_balances21;
    COUNT(*)
    477613527
    SQL> select count(*) from gl.gl_sets_of_books;
    COUNT(*)
    6gl_sets_of_books has less rows. Whenever there is a change then it mapped to huge rows hence during materialized view has delete huge number of rows.
    select count(*) from apps.BAL_PART group by C3;
    C3 is the rowid which is present in create materialized statement.
    COUNT(*)
    292927011
    210215
    69330
    184406971
    Is there any way to improve the plan. As i created a partition on code_combination_id and local index on code_combination_id which will not help in set_of_books_id case. I dont PCT will help here or not. Is it possible to use PCT refresh by equipartitioning only one column in where clause.
    Please assist me in improving refresh of materialized view using fast refresh.
    Thanks and Regards,
    Edited by: user646034 on Feb 23, 2013 11:13 PM
    Edited by: user646034 on Feb 23, 2013 11:19 PM
    Edited by: user646034 on Feb 23, 2013 11:46 PM
    Edited by: user646034 on Feb 25, 2013 11:46 AM

    Hi
    The below explain without index and with index.
    /* MV_REFRESH (DEL) */ DELETE FROM "APPS"."BAL_PART                                                                                                                                                                                                                                                                                                                                                                                                                
    " SNA$ WHERE "C3" IN (SELECT /*+ NO_MERGE  */ * FROM (SELECT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
    CHARTOROWID("MAS$"."M_ROW$$") RID$     FROM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    "GL"."MLOG$_GL_SETS_OF_BOOKS" "MAS$"   WHERE "MAS$".SNAPTIME$$ > :B_ST1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    ) AS OF SNAPSHOT(:B_SCN) MAS$)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
    Plan hash value: 2704021294                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Id  | Operation            | Name                          | E-Rows |E-Bytes| Cost (%CPU)| E-Time   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    |   0 | DELETE STATEMENT     |                               |        |       |   339K(100)|          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    |   1 |  DELETE              | BAL_PART                          |        |       |            |          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    |   2 |   NESTED LOOPS       |                               |      1 |   168 |   339K  (1)|999:59:59 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    |   3 |    SORT UNIQUE       |                               |      1 |   138 |     2   (0)| 00:02:31 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    |   4 |     TABLE ACCESS FULL| MLOG$_GL_SETS_OF_BOOKS        |      1 |   138 |     2   (0)| 00:02:31 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    |   5 |    INDEX RANGE SCAN  | C3BOOKS                       |    110M|  3164M|   339K  (0)|999:59:59 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    If i will not use the C3 index then the query will use the belolw plan, I guess this will also take same time or more time.
    |   0 | DELETE STATEMENT       |                               |        |       |  9743K(100)|          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
    |   1 |  DELETE                | BAL_PART                          |       |            |          |                                                                                                                                                                                                                                                                                                                                                                                                     

  • Question - are we not able to create indexed items in custom folders?

    Just a question here. I would like to use the index/Value option for parameters in a workbook. This is where the List of Values drop down box for the parameter would show both the index number and the value and let you choose to select based on the index or on the value. An obvious example of this would be with months, where you would have January (1), February (2), March (3), and so forth. To do this, you have to set up indexed items in Discoverer Administrator.
    That is where I am running into a problem/issue. I am not being able to pick an item and click to look at its properties, scroll down to the Indexed Item property, click on that property, and get a list of items to pick from. On the indexed item property I see a value of <None>, and when I click on that property, no list of items pops up.
    I have defined indexed items before, but that was always done on regular folders (imported from the database). In this case, I am working with a custom folder.
    The SQL that I have keyed in for this custom folder is this -
    SELECT flex_value, description, flex_value_set_id, flex_value_id
    FROM fnd_flex_values_vl
    WHERE flex_value_set_id = 1011187
    ORDER BY flex_value;
    FND_FLEX_VALUES_VL is an Oracle view, that combines Oracle tables FND_FLEX_VALUES and FND_FLEX_VALUES_TL.
    My goal would be to show both the FLEX_VALUE and the DESCRIPTION in the parameter to the users, so they can better decide what value(s) they want to pick. This is a general ledger application that I am working with, with the General Ledger account number segments and the Flexfield value set for each segment (we are using 7 segments to define our general ledger account number).
    Am I not able to define indexed items when working with a custom folder? The documentation is not real clear. It talks about simple folders and complex folders, but does not mention custom folders, at least that I can find. Or perhaps I need to do something different with how I code the SQL for the custom folder to enable me to define indexed items in the custom folder?
    Hope this makes some sense. Always a challenge to explain the situation in a clear manner. Thanks for any insight/assistance anyone can give me on this.
    John Dickey

    Ahh, those picky little details. Once I created an Item Class LOV on my item, then I could click on the Indexed Item property and get the list of fields in the folder to show up and pick my item (to be the indexed item) from that list. I went back to the user guides and the documentation sure does not indicate this requirement. For example, in the Discoverer Administrator guide, you have the section (page 9-30 in the version I have) titled "How to assign an indexed item to an item". Nowhere in that section does it say that you have to create an Item Class LOV first to be able to do this. Though it does show how if you do not have an LOV on the item you pick to be the indexed item, you will be prompted to create an LOV for that item. In the past I had my LOVs created first. This time I was trying to do the indexed item first before creating my LOVs. So lesson learned - you have to create an Item Class LOV first before you can assign an indexed item to an item.
    Thanks for the assistance.
    John Dickey

  • Data movement of Chart of Account from one instance to other

    We are doing data movement of Chart of account tables(FND_FLEX tables) from one instance(oracle 10.7)to another instance(Oracle 11.0.3).
    Some of the columns of flex value tables are obsoleted in Oracle 11.0.3. like description in fnd_flex_values is obsoleted and description is used from fnd_flex_values_tl.
    My question is, Is it necessary to do the data movement of fnd_flex_values_tl table to get the description or just the data movement for fnd_flex_values table will serve the purpose.
    Thanks in advance.

    Hi
    When upgrading you need to populate both the fnd_flex_values and the fnd_flex_value_tl table. Please note applications will not function properly when you dont populate this table.
    I am not sure how you are populating this table, if using the oracle upgrade process then Oracle takes care of this else please ensure that you populate all the _tl tables
    Thanks
    Bharat

  • Help needed in retrieving account description present in PO distributions

    Hi All,
    I have written a query to retrieve purchase orders and it's distributions. I need to retrieve account descrption related to distributions. I have got account number from gl_code_combinations table(segment1 to segment5). I am not able to proceed further in getting account description. Please suggest which are the tables and what is the link between them.
    Thanks and Regards,
    Mahesh

    Hi,
    Please find my comments below:
    Thanks for the reply
    Welcome
    If we link with fnd_flex_values_vl and gl_code_combinations, number of records is increasing i.e records are repeating.
    add condition flex_value_set_id
    Also account number will be like 01-0101-0101-1010, so this means that account number is flex field. Then i think we have to use flex field tables. But i am not able to find out which are the tables and what is the link between them
    Account number is a combination of Segments. You cannot find total combination anywhere. You have to take Code combination id, get the segments, link the segment with fnd_flex_values_vl with particular value_set_id and display the description against that segment.
    Finally you have to concatenate all the segment descriptions.
    Regards,
    Sridhar

  • FND_FLEX_VALUES_PKG

    I've seen this package mentioned as a means of inserting into fnd_flex_values and fnd_flex_values_tl
    Is this in fact a supported/recommended approach and are there and examples of the use of the insert_row procedure ?

    Thanks for supporting dunacan
    I have mentioned both of segment detail . please advice,
    1.One is Job No segment
    Segment1 number 10
    Required Check Yes
    Value set Info JOB_NO
    List Type : List of Values
    Security Type : No Security
    Format Validation : select number 7,0 and check on number only (0-9)
    Validation Type Independent
    2.One is Job Name segment
    Segment2 number 20
    Required Check Yes
    Value set Info JOB_NAME
    List Type : List of Values
    Security Type : No Security
    Format Validation : select CHAR 60 Validation Type Independent
    It was strange that how could it possible duplication value without having database,i am unable to find this issued,
    Edited by: oracle0282 on Jan 17, 2011 3:32 AM

  • Query for purchasing accrual in 12i

    Hi
    We have migrated to 12i ,the references in gl_import_references are no more updated after 12 i upgrade.
    Please find the 11i query,we need to change it to 12i using xla tables.
    SELECT
    gl_ledgers.NAME AS book_name,
           gl_periods.period_year AS fiscal_year,
           DECODE (gl_periods.quarter_num,
                   1, '1st QTR',
                   2, '2nd QTR',
                   3, '3rd QTR',
                   4, '4th QTR'
                  ) AS quarter,
           gl_periods.period_num AS period_number,
           gl_je_headers.period_name AS period_name,
           gl_je_headers.je_source AS SOURCE,
           gl_je_headers.je_category AS CATEGORY,
           gl_code_combinations.segment1 AS company,
           gl_code_combinations.segment2 AS cost_center,
           gl_code_combinations.segment3 AS ACCOUNT,
           gl_code_combinations.segment4 AS program,
           gl_code_combinations.segment5 AS future,
           po_distributions_all.expenditure_type AS expenditure_type,
           po_distributions_all.expenditure_item_date AS expenditure_date,
           gl_je_lines.accounted_dr, gl_je_lines.accounted_cr,
           po_distributions_all.quantity_delivered AS pa_quantity, 'Accrual' TYPE,
           DECODE (gl_code_combinations.segment2,
                   '0000', 'BS',
                   'PL'
                  ) AS ledger_type,
           ap_suppliers.vendor_name,
           gl_je_lines.reference_4 AS po_number,
           gl_je_lines.description
      FROM gl.gl_je_headers,
           gl.gl_je_lines,
           gl.gl_ledgers,
           gl.gl_code_combinations,
           po.po_distributions_all,
           po.po_headers_all,
           gl.gl_periods,
           ap.ap_suppliers
    WHERE gl_je_headers.je_source = 'Cost Management' --Changed to Cost Management
       AND gl_je_headers.je_header_id = gl_je_lines.je_header_id
       AND gl_je_headers.ledger_id = gl_ledgers.ledger_id
       AND gl_code_combinations.code_combination_id =
                                                   gl_je_lines.code_combination_id
       AND gl_code_combinations.segment3 <> '23004'
       AND po_distributions_all.po_header_id(+) =
                       TO_NUMBER (RTRIM (SUBSTR (gl_je_lines.reference_2, 1, 10)))
       AND po_distributions_all.po_distribution_id =
                       TO_NUMBER (RTRIM (SUBSTR (gl_je_lines.reference_3, 1, 10)))
       AND po_distributions_all.po_header_id = po_headers_all.po_header_id
       AND po_headers_all.vendor_id = ap_suppliers.vendor_id
       AND gl_je_headers.period_name = gl_periods.period_name
    Can someone help us

    Hello Mr.Raman,
    Thanks for your response to my query.
    As per my company requirement i have to track duplicate payment made to the vendor against same PO.
    So for that after completing the cycle PR-PO-GR-IR-F-53 finally i found two records in BSAK table out of which :
    One record was  with my accounting document no from my invoice receipt of type RE.
    Another record was with the vendor payment clearance document with type KZ.
    Now again i have done payment to the vendor using F-53 tcode and now i found one more record with belnr = last payment document no and augbl = new payment document no. with type KZ.
    So if i use below mentioned logic to track for duplicate payments made to the vendor ,then it will be fine or if not can you suggests me the needful changes in the logic.
    1.) Check If record exists for my belnr no from invoice recipt in bsak.
    2.) Take AUGBL No for this BELNR No and check if record exists for this AUGBL with type KZ.
    Note:Means payment is done to the vendor upto this logic.
    3.) Now if with the found record with type KZ any other record found with type KZ it can be taken of as duplicate payment made to the vendor.
    Please suggest me if above mentioned logic is fine.
    Regards.
    Abhinav Goel.

  • New Cost Center trigger

    I need sample code to implement a trigger so that when a new cost center (dept) value to the accounting flexfield is added, then it fires off and creates the corresponding row in the fnd_shorthand_flex_aliases table
    Does any one know how to create it?
    Thanks,
    Chiru

    Hi All,
    I create a trigger to insert data into the fnd_shorthand_flex_aliases table, if a new flex_value is created in the fnd_flex_values and fnd_flex_values_tl.
    However, I am getting the error:
    ORA-04091: table fnd_flex_values is mutating, trigger/function may not see it.
    More than likely it is due to the fact that I am trying to query the table fnd_flex_values to insert into the fnd_shorthand_flex_aliases table, while inserting into it at the same time.
    Does any one know how to get around this?
    Thanks,
    Chiru

  • Oracle R12, Where I can see the accounting transactions?

    Where I can see the accounting transactions?
    With the table GL_BALANCES and GL_CODE_COMBINATIONS know I have discrete and cumulative balances of each period but can not locate the table that contains the accounting transactions?
    Can anyone help?
    thanks

    Hi,
    GL_JE_LINES stores the journal entry lines that you enter in the Enter Journals form. There is a one-to-many relationship between journal entries and journal entry lines. Each row in this table stores the associated journal entry header ID, the line number, the associated code combination ID, and the debits or credits associated with the journal line. STATUS is 'U' for unposted or 'P' for posted.
    Regards,
    Raju.

  • Account Query is taking longtime and not giving desired results

    Hi,
    I'm trying to run the following query to get code combination id for last six months with 1)no activity in gl_je_lines
    2) Sum of begin balance and PTD is zero
    Her's query :
    select
    cc.segment3 SEGMENT
    from apps.gl_code_combinations cc,
    apps.gl_balances bal,
    apps.fnd_flex_values_vl ffvl,
    apps.fnd_flex_value_sets ffvs,
    (select period_name
    from apps.gl_periods
    where period_set_name ='abc Calendar'
    and to_date(period_name,'Mon-YY') between add_months(sysdate,(6*-1)-1) and sysdate) p
    where cc.CODE_COMBINATION_ID = bal.CODE_COMBINATION_ID
    and ffvl.FLEX_VALUE = cc.segment3
    and ffvl.FLEX_VALUE_SET_ID = ffvs.flex_value_set_id
    and ffvs.flex_value_set_id = 2222222
    and bal.SET_OF_BOOKS_ID =555
    and cc.CHART_OF_ACCOUNTS_ID = 11111
    and bal.period_name = p.period_name
    and ffvl.ENABLED_FLAG = 'Y'
    and ffvl.END_DATE_ACTIVE is null
    and bal.TEMPLATE_ID IS NULL
    and bal.actual_flag='A'
    and bal.currency_code 'STAT'
    and ffvl.creation_date <= add_months(sysdate,(6*-1)-1)
    and cc.SEGMENT3 not in (
    select
    distinct gcc.SEGMENT3
    from apps.gl_je_lines l
    , apps.gl_code_Combinations gcc,
    (select period_name
    from apps.gl_periods
    where period_set_name ='abc Calendar'
    and end_date > add_months(last_day(sysdate),-1) and end_date <= last_day(sysdate)) lp
    where l.code_combination_id = gcc.code_combination_id
    and gcc.CHART_OF_ACCOUNTS_ID = 11111
    and l.period_name=lp.period_name
    and l.set_of_books_id = 555
    and l.status='P')
    group by cc.SEGMENT3
    HAVING sum(abs(nvl(bal.BEGIN_BALANCE_DR,0))-abs(nvl(bal.BEGIN_BALANCE_CR,0))+abs(nvl(bal.PERIOD_NET_DR,0))-abs(nvl(bal.PERIOD_NET_CR,0))) = 0--------------------------------------------------------------------------------
    Here's Explain Plan
    Operation Node Cost IO Cost CPU Cost Cardinality Object Name Options Object Type Optimizer
    SELECT STATEMENT 5155 5094 554583434 1 ALL_ROWS
    FILTER
    HASH (GROUP BY) 5155 5094 554583434 1 GROUP BY
    FILTER
    TABLE ACCESS (BY INDEX ROWID) 4 4 31301 1 GL_BALANCES BY INDEX ROWID TABLE ANALYZED
    NESTED LOOPS 18 18 427467 1
    MERGE JOIN (CARTESIAN) 14 14 396166 1 CARTESIAN
    TABLE ACCESS (BY INDEX ROWID) 4 4 49409 1 GL_CODE_COMBINATIONS BY INDEX ROWID TABLE ANALYZED
    NESTED LOOPS 8 8 82677 1
    NESTED LOOPS 4 4 33268 1
    NESTED LOOPS 4 4 31368 1
    INDEX (UNIQUE SCAN) 1 1 8171 1 FND_FLEX_VALUE_SETS_U1 UNIQUE SCAN INDEX (UNIQUE) ANALYZED
    TABLE ACCESS (BY INDEX ROWID) 3 3 23196 1 FND_FLEX_VALUES BY INDEX ROWID TABLE ANALYZED
    INDEX (RANGE SCAN) 2 2 15293 1 FND_FLEX_VALUES_N3 RANGE SCAN INDEX ANALYZED
    INDEX (UNIQUE SCAN) 0 0 1900 1 FND_FLEX_VALUES_TL_U1 UNIQUE SCAN INDEX (UNIQUE) ANALYZED
    INDEX (RANGE SCAN) 2 2 33113 4 GL_CODE_COMBINATIONS_N3 RANGE SCAN INDEX ANALYZED
    FILTER
    TABLE ACCESS (BY INDEX ROWID) 20 20 163416 1 GL_JE_LINES BY INDEX ROWID TABLE ANALYZED
    NESTED LOOPS 5136 5076 545022343 1
    MERGE JOIN (CARTESIAN) 5103 5043 544739760 4 CARTESIAN
    TABLE ACCESS (BY INDEX ROWID) 5 5 37587 1 GL_PERIODS BY INDEX ROWID TABLE ANALYZED
    INDEX (RANGE SCAN) 2 2 15043 4 GL_PERIODS_N2 RANGE SCAN INDEX ANALYZED
    BUFFER (SORT) 5098 5038 544702173 7 SORT
    TABLE ACCESS (FULL) 5098 5038 544702173 7 GL_CODE_COMBINATIONS FULL TABLE ANALYZED
    INDEX (RANGE SCAN) 3 3 29414 36 GL_JE_LINES_N1 RANGE SCAN INDEX ANALYZED
    BUFFER (SORT) 10 10 346757 1 SORT
    INDEX (FULL SCAN) 6 6 313489 1 GL_PERIODS_U1 FULL SCAN INDEX (UNIQUE) ANALYZED
    INDEX (RANGE SCAN) 2 2 15493 1 GL_BALANCES_N1 RANGE SCAN INDEX ANALYZEDThis query is taking two hrs to get results :
    How to tune this query to get results faster

    Hi,
    170 posts and still do not know how to use {noformat}{noformat} tags?
    Please read <a href="https://forums.oracle.com/forums/thread.jspa?threadID=2174552#9360002">How do I ask a question on the forums?</a>
    If you have a performance issue have a look at <a href="https://forums.oracle.com/forums/thread.jspa?threadID=2174552#9360003">How to improve the performance of my query? / My query is running slow. </a>
    Additionally when you put some code please enclose it between two lines starting with {noformat}{noformat}
    i.e.:
    {noformat}{noformat}
    SELECT ...
    {noformat}{noformat}
    Also consider closing some of your questions when someone is answering. Looking at your profile:
    Handle:      user518071 
    Status Level:      Newbie
    Registered:      Jun 30, 2006
    Total Posts:      170
    Total Questions:      92 (58 unresolved) it still looks that you have 58 unresolved questions. Are they really all unresolved?
    Regards.
    Al

  • How to populate budget files file_budget.csv and file_acct_budget.csv

    Hi, we have implemened Financial Analytics 7.9.5 on EBS system. We have successfully loaded all the Data except Budget information. Recently I came to know that there is no Budget ETL in ORAR12..and need to use Universal Adapator for populating the budget information.
    According to this guideline I'm supposed to populate file_budget.csv and file_acct_budget.csv files manually and start the extract. Now I'm having trouble filling these files. These files exoect many IDs to be filled in like ORG_ID etc..and documentation says these IDs shoule be same as one in Warehouse..I don't understand how to fill this. Has anybody done this already..if so please guide us how to fill these files and appreciate if you can post a sample record for each of these files.
    Thanks.

    You need to go to the corresponding dimensions and see how the integration_id is populated for this dimension. For this, you will have to open the corresponding SDE mapping in Informatica and trace back the integration_id. The document says which table's integration_id to look for, for each of the ids in the fact. For eg:
    GL_ACCOUNT_ID
    GL Account identifier. Populate with integration_id from w_gl_account_d.
    PRODUCT_ID
    Product identifier. Populate with integration_id from w_product_d.
    COMPANY_ORG_ID
    Company Org identifier. Populate with integration_id from w_int_org_d where company_flg = Y.
    For example, if w_gl_account_d's integration_id is formed from gl_code_combinations.code_combination_id in EBS, you need to populate the code_combination_id (from EBS) of your budget record, for each row in the budget fact csv file.

Maybe you are looking for

  • Why oh why? Randomly asks for me to connect to iTunes and activate on bootu

    On my replacement phone, I'm still continuing to get the Connect to ITunes screen when I turn it on in the morning. I then have to reboot the phone to get it to come up correctly(The very reason I had to exchange my brand new one was that it would ne

  • Live Chat not working

    Please can someone advise how I can actually speak to someone from Skype? I have tried to use the live chat feature a good dozen times and continually get a message saying that my chat session has opened in another window (which it has not).  I'm usi

  • Runtime error: OBJECTS_OBJREF_NOT_ASSIGNED

    Hi everybody, after Updating our (productive) SAP ERP 2005 System to SPS 11 we are facing a problem in the integration of another our testsystem e.g. in the DB13. Anytime I want to call upl the testsystem in the DB13 a runtime error appears. Another

  • OBIEE:Need formula for all characters to the right of the right-most space

    Hi: I need to extract the right-most word from a field that could have 2-3 spaces. Example: "Administration Main Boston" = "Boston" Thanks- Charlie Epes Buffalo, NY

  • Apache Poi Excel Question

    If I use Apacha Poi to create an xls on a machine that doesn't have excel, can I still read the values using Apache Poi HSSF of the create xls?