GL_BALANCES currency_balance_types

I am after a bit more information about how currency differences are handled in the GL_BALANCES table. From what I can see records in the GL_BALANCES table can have different currency codes which may or may not be the same as the currency_code in the corresponding GL_LEDGER record. I have found a bit of documentation that talks about:
TRANSLATED currencies
ENTERED_FOREIGN currencies
STAT currencies
BASE currencies
ENTERED_LEDGER currencies
unfortunately I am from a technical not functional background and I am not sure what these different types represent or how they interact so I was hoping someone in the know might be able to provide a plain english overview, or point me in the direction of some better documentation.

you Configure Time dependent Terms settings
SPRO>Financial Accounting>GL A/C>BT>Bank A/C Interest Calc>Interest Calc>Define Time Depemdent
Regards,
TML

Similar Messages

  • Query on GL_BALANCES Table is very slow

    Dear Members,
    I have prepared a query on GL_BALANCES Table which is as follows:
    SQL>
    select (nvl(sum(gb.period_net_dr), 0) - nvl(sum(gb.period_net_cr), 0))
    INTO V_AMT
    from gl_balances gb,
    gl_code_combinations gcc,
    fnd_flex_value_hierarchies ffvh
    where gb.set_of_books_id = 7
    and gb.actual_flag = 'B'
    and gb.period_year = P_YEAR --'2010'
    and gb.budget_version_id = P_BUD_VER_ID--1234
    and gb.code_combination_id = gcc.code_combination_id
    and gcc.segment3 >= ffvh.child_flex_value_low
    and gcc.segment3 <= ffvh.child_flex_value_high
    and ffvh.flex_value_set_id = 1012576
    and ffvh.parent_flex_value = P_FLEX_VAL;
    The above query is taking long time to complete.
    Plan of my query is as follows
    SELECT STATEMENT, GOAL = CHOOSE     Cost=49885     Cardinality=1     Bytes=64
    SORT AGGREGATE                                    Cardinality=1     Bytes=64
    MERGE JOIN               Cost=49885     Cardinality=12     Bytes=768
    SORT JOIN               Cost=49859     Cardinality=2192     Bytes=74528
    HASH JOIN               Cost=49822     Cardinality=2192     Bytes=74528
    TABLE ACCESS FULL     Object owner=GL     Object name=GL_BALANCES     Cost=47955     Cardinality=2192     Bytes=50416
    TABLE ACCESS FULL     Object owner=GL     Object name=GL_CODE_COMBINATIONS     Cost=1854     Cardinality=526850     Bytes=5795350
    FILTER                         
    SORT JOIN                         
    INDEX RANGE SCAN     Object owner=APPLSYS     Object name=FND_FLEX_VALUE_HIERARCHIES_N1     Cost=2     Cardinality=2     Bytes=60
    Can any one please help me in tuning this query.
    Thanks in advance.
    Best Regards.

    As per the other replies, you've not really given enough information to go on - what are you trying to achieve, versions, etc.
    On my old apps 11.5.8 system, the explain plan for your query uses GL_CODE_COMBINATIONS_U1 rather than a full scan of gl_code_combinations.
    Check your stats are up to date (select table_name, num_rows, last_analyzed from dba_tables where ...)
    See if you can also use period_name and/or period_set_name (or period_num) from GL_Periods rather than period_year (i.e. use P_YEAR to lookup the period_name/period_set_name/period_num from gl_periods). It might be faster to do per period and then consolidate for the whole year, as there are indexes on gl_balances for columns period_name, period_set_name, period_num.
    regards, Ivan

  • SQL Tuning- slow query on GL_BALANCES- Explain plan provided

    Hi- I really need some help here.
    The following SQL statement has been identified to perform poorly.
    It currently takes from 2-3 minutes to execute. I see it is because GL_BALANCES has so many rows.
    Is there any way around this? Explain and info below. Thanks gurus!
    This is the SQL statement:
    SELECT DISTINCT GLB.CODE_COMBINATION_ID CCID
    FROM gl_balances GLB, gl_code_combinations GCC
    WHERE GLB.ACTUAL_FLAG = 'A'
    AND GLB.Last_Update_Date > to_date('11-JAN-2010','DD-MON-YYYY')
    AND GLB.code_combination_id = GCC.code_combination_id
    AND EXISTS (
                  SELECT 1
                  FROM fnd_flex_value_sets A, fnd_flex_values B
                  WHERE A.flex_value_set_name = 'XXX_XXX'
                  AND UPPER(B.ATTRIBUTE3) = 'APPORTIONMENT'
                  AND A.flex_value_set_id = b.flex_value_set_id
                  AND GCC.segment11 = b.flex_value
               );The version of the database is 11.1.0.7.
    These are the parameters relevant to the optimizer:
    NAME TYPE VALUE
    optimizerautostats_job boolean FALSE
    optimizerextended_cursor_sharing_r string NONE
    el
    optimizer_capture_sql_plan_baselines boolean FALSE
    optimizer_dynamic_sampling integer 2
    optimizer_features_enable string 11.1.0.7
    optimizer_index_caching integer 0
    optimizer_index_cost_adj integer 100
    optimizer_mode string ALL_ROWS
    optimizer_secure_view_merging boolean FALSE
    optimizer_use_invisible_indexes boolean FALSE
    NAME TYPE VALUE
    optimizer_use_pending_statistics boolean FALSE
    optimizer_use_sql_plan_baselines boolean TRUE
    SQL> show parameter db_file_multi
    NAME TYPE VALUE
    db_file_multiblock_read_count integer 128
    SQL> show parameter db_block_size
    NAME TYPE VALUE
    db_block_size integer 8192
    SQL> show parameter cursor_sharing
    NAME TYPE VALUE
    optimizerextended_cursor_sharing_r string NONE
    el
    cursor_sharing string EXACT
    select
    2 sname
    3 , pname
    4 , pval1
    5 , pval2
    6 from
    7 sys.aux_stats$;
    SNAME PNAME PVAL1
    PVAL2
    SYSSTATS_INFO STATUS
    COMPLETED
    SYSSTATS_INFO DSTART
    09-02-2006 14:35
    SYSSTATS_INFO DSTOP
    09-02-2006 14:35
    SNAME PNAME PVAL1
    PVAL2
    SYSSTATS_INFO FLAGS 1
    SYSSTATS_MAIN CPUSPEEDNW 451.262136
    SYSSTATS_MAIN IOSEEKTIM 10
    SNAME PNAME PVAL1
    PVAL2
    SYSSTATS_MAIN IOTFRSPEED 4096
    SYSSTATS_MAIN SREADTIM
    SYSSTATS_MAIN MREADTIM
    SNAME PNAME PVAL1
    PVAL2
    SYSSTATS_MAIN CPUSPEED
    SYSSTATS_MAIN MBRC
    SYSSTATS_MAIN MAXTHR
    SNAME PNAME PVAL1
    PVAL2
    SYSSTATS_MAIN SLAVETHR
    13 rows selected.
    SQL> explain plan for
    2 SELECT DISTINCT GLB.CODE_COMBINATION_ID CCID
    3 FROM gl_balances GLB, gl_code_combinations GCC
    4 WHERE GLB.code_combination_id = GCC.code_combination_id
    5 AND GLB.ACTUAL_FLAG = 'A'
    6 AND GLB.Last_Update_Date > '11-JAN-2010'
    7 AND EXISTS (SELECT 1
    8 FROM fnd_flex_value_sets A, fnd_flex_values B
    9 WHERE A.flex_value_set_id = b.flex_value_set_id
    10 AND A.flex_value_set_name = 'XXX_XXX'
    11 AND UPPER(B.ATTRIBUTE3) = 'APPORTIONMENT'
    12 AND GCC.segment11 = b.flex_value);
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 1839014065
    | Id | Operation | Name | Rows | By
    tes | Cost (%CPU)| Time |
    PLAN_TABLE_OUTPUT
    | 0 | SELECT STATEMENT | | 4102 |
    296K| 955K (3)| 03:11:03 |
    | 1 | HASH UNIQUE | | 4102 |
    296K| 955K (3)| 03:11:03 |
    |* 2 | HASH JOIN | | 4102 |
    296K| 955K (3)| 03:11:03 |
    | 3 | NESTED LOOPS | | |
    | | |
    PLAN_TABLE_OUTPUT
    | 4 | NESTED LOOPS | | 23907 | 1
    354K| 2598 (1)| 00:00:32 |
    | 5 | NESTED LOOPS | | 1 |
    45 | 5 (0)| 00:00:01 |
    | 6 | TABLE ACCESS BY INDEX ROWID| FND_FLEX_VALUE_SETS | 1 |
    28 | 2 (0)| 00:00:01 |
    |* 7 | INDEX UNIQUE SCAN | FND_FLEX_VALUE_SETS_U2 | 1 |
    PLAN_TABLE_OUTPUT
    | 1 (0)| 00:00:01 |
    |* 8 | TABLE ACCESS BY INDEX ROWID| FND_FLEX_VALUES | 1 |
    17 | 3 (0)| 00:00:01 |
    |* 9 | INDEX RANGE SCAN | FND_FLEX_VALUES_N2 | 53 |
    | 1 (0)| 00:00:01 |
    |* 10 | INDEX RANGE SCAN | GL_CODE_COMBINATIONS_N11 | 25427 |
    | 106 (1)| 00:00:02 |
    PLAN_TABLE_OUTPUT
    | 11 | TABLE ACCESS BY INDEX ROWID | GL_CODE_COMBINATIONS | 18664 |
    236K| 2593 (1)| 00:00:32 |
    |* 12 | TABLE ACCESS FULL | GL_BALANCES | 1022K|
    15M| 952K (3)| 03:10:32 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
    2 - access("GLB"."CODE_COMBINATION_ID"="GCC"."CODE_COMBINATION_ID")
    7 - access("A"."FLEX_VALUE_SET_NAME"='SSA_SGL')
    8 - filter(UPPER("B"."ATTRIBUTE3")='APPORTIONMENT')
    9 - access("A"."FLEX_VALUE_SET_ID"="B"."FLEX_VALUE_SET_ID")
    10 - access("GCC"."SEGMENT11"="B"."FLEX_VALUE")
    12 - filter("GLB"."LAST_UPDATE_DATE">TO_DATE(' 2010-01-11 00:00:00', 'syyyy-mm
    -dd hh24:mi:ss') AND
    "GLB"."ACTUAL_FLAG"='A')
    30 rows selected.

    As per the other replies, you've not really given enough information to go on - what are you trying to achieve, versions, etc.
    On my old apps 11.5.8 system, the explain plan for your query uses GL_CODE_COMBINATIONS_U1 rather than a full scan of gl_code_combinations.
    Check your stats are up to date (select table_name, num_rows, last_analyzed from dba_tables where ...)
    See if you can also use period_name and/or period_set_name (or period_num) from GL_Periods rather than period_year (i.e. use P_YEAR to lookup the period_name/period_set_name/period_num from gl_periods). It might be faster to do per period and then consolidate for the whole year, as there are indexes on gl_balances for columns period_name, period_set_name, period_num.
    regards, Ivan

  • How can i subtract budget and actuals amount from gl_balances in discoverer

    I have a problem with a discoverer report.
    The table is GL_BALANCES (Financials), and i tried to subtract data of current year and last year, same month, or data from actuals and budgets amounts.
    Data from actuals have the "A" code in the ACTUAL_FLAG field, and budgets amounts have a "B" code. I construct a cross-tab report with ACTUAL_FLAG field in the "X" axis and the accounts segments in the "Y" axis (From GL_CODE_COMBINATIONS). The problem is: How can i substract budget and actuals amounts? Is the same field but differents columns in report.
    I cannot use analytics function because the version of database does not support that .
    Somebody told me: "...You need to construct a custom folder to handle this..."
    I don't want to finish the reports in Excel...
    Thanks.

    Hi Miguel
    You can either create a database view or custom folder to do this using aliases for the two joins to the same table.
    For example, you need something like this in the body of the SQL:
    select
    act.code_combination_id,
    nvl(act.period_net_dr,0) actual_net,
    nvl(bgt.period_net_dt,0) budget_net,
    nvl(bgt.period_net_dt,0) - nvl(act.period_net_dr,0) diff,
    act.period_name
    from
    gl_balances act,
    gl_balances bgt
    where
    act.set_of_books_id = bgt.set_of_books_id and
    act.code_combination_id = bgt.code_combination_id and
    act.period_name = bgt.period_name
    Of course you will still need to add your own joins to get the code combinations but I trust you get the gist.
    Hope this helps
    Regards
    Michael

  • GL_periods and GL_balances

    Can anyone explain how to retrieve the previous months amounts based on tables gl_period_statuses and gl_balances..For eg.aquiring the actual values for last 10 months, what is the process?

    Hello.
    Is there any reason for not using FSG to retrieve that information? It is the perfect tool to do it.
    Octavio

  • GL_Balances Table Add on

    please I need to populate a table with the donations/grants/total money received in USD from GL_Balances table in GL database, which columns will I consider?
    Thank you
    Rex

    Hi,
    Try to look into these tables:
    SKA1     G/L Account Master (Chart of Accounts)
    SKAT     G/L Account Master Record (Chart of Accounts- Description)
    SKB1     G/L account master (company code)
    AGKO     Cleared Accounts
    ANAR     Asset Types
    ANAT     Asset type text
    ANEK     Document Header Asset Posting
    ANEP     Asset Line Items
    ANEV     Asset downpymt settlement
    ANKT     Asset classes- Description
    ANLA     Asset Master Record Segment
    ANLB     Depreciation terms
    ANLC     Asset Value Fields
    ANLH     Main asset number
    AT02T     Transaction Activity Category- Description
    AT02A     Transaction Code for Menu TIMN
    AT10     Transaction type
    AT10T     Name of Transaction Type
    Is it helpful?

  • GL_BALANCES open transactions in R12

    Hi,
    Could you tell me how to drill down data from gl_balances table for open transactions.
    should i check any balances column > 0.
    any advice?
    Thanks.

    Hello.
    I'm not sure if i unsderstood your need at 100% but, just to give you an example, the amount of the customers debts shown in the GL Trial Balance should match with the total of any of the Aging Reports of AR.
    Octavio

  • Partitioning GL_BALANCES

    Hi All,
    We are planning to partition GL_BALANCES table in 11.5.10.2. E buzz with 10 g database.
    Partition method - Range
    Partitiion key - PERIOD_NAME
    Datatype of PERIOD_NAME - VBARCHAR2
    Ex values are JAN-00, JAN-01 etc .....
    If we use the below clause in the create table script, it will take values from APR-09, APR-08 as it is in VARCHAR2 which we dont want to ....
    partition P2001 values less than ('OCT-01'),
    Can you please advice on how to give the partition clause for this condition . < First partition should have rows from period less than oct 2001 ie OCT-01 and same thing for higher partitions...>
    Thanks & Regards,
    Rakesh

    create table and index syntax: (Using GL_BALANCES_PART and temp storage - rename it to correct when done)
    CREATE TABLE GL.GL_BALANCES_PART
    PARTITION BY RANGE (PERIOD_NAME)
    PARTITION apr03_per VALUES LESS THAN ('APR-03'),
    PARTITION apr04_per VALUES LESS THAN ('APR-04'),
    PARTITION apr05_per VALUES LESS THAN ('APR-05'),
    PARTITION apr06_per VALUES LESS THAN ('APR-06'),
    PARTITION apr07_per VALUES LESS THAN ('APR-07'),
    PARTITION apr08_per VALUES LESS THAN ('APR-08'),
    PARTITION apr09_per VALUES LESS THAN ('APR-09'),
    PARTITION apr10_per VALUES LESS THAN ('APR-10'),
    PARTITION apr11_per VALUES LESS THAN ('APR-11'),
    PARTITION apr12_per VALUES LESS THAN ('APR-12'),
    PARTITION apr13_per VALUES LESS THAN ('APR-13'),
    PARTITION aug03_per VALUES LESS THAN ('AUG-03'),
    PARTITION aug04_per VALUES LESS THAN ('AUG-04'),
    PARTITION aug05_per VALUES LESS THAN ('AUG-05'),
    PARTITION aug06_per VALUES LESS THAN ('AUG-06'),
    PARTITION aug07_per VALUES LESS THAN ('AUG-07'),
    PARTITION aug08_per VALUES LESS THAN ('AUG-08'),
    PARTITION aug09_per VALUES LESS THAN ('AUG-09'),
    PARTITION aug10_per VALUES LESS THAN ('AUG-10'),
    PARTITION aug11_per VALUES LESS THAN ('AUG-11'),
    PARTITION aug12_per VALUES LESS THAN ('AUG-12'),
    PARTITION aug13_per VALUES LESS THAN ('AUG-13'),
    PARTITION dec03_per VALUES LESS THAN ('DEC-03'),
    PARTITION dec04_per VALUES LESS THAN ('DEC-04'),
    PARTITION dec05_per VALUES LESS THAN ('DEC-05'),
    PARTITION dec06_per VALUES LESS THAN ('DEC-06'),
    PARTITION dec07_per VALUES LESS THAN ('DEC-07'),
    PARTITION dec08_per VALUES LESS THAN ('DEC-08'),
    PARTITION dec09_per VALUES LESS THAN ('DEC-09'),
    PARTITION dec10_per VALUES LESS THAN ('DEC-10'),
    PARTITION dec11_per VALUES LESS THAN ('DEC-11'),
    PARTITION dec12_per VALUES LESS THAN ('DEC-12'),
    PARTITION dec13_per VALUES LESS THAN ('DEC-13'),
    PARTITION feb03_per VALUES LESS THAN ('FEB-03'),
    PARTITION feb04_per VALUES LESS THAN ('FEB-04'),
    PARTITION feb05_per VALUES LESS THAN ('FEB-05'),
    PARTITION feb06_per VALUES LESS THAN ('FEB-06'),
    PARTITION feb07_per VALUES LESS THAN ('FEB-07'),
    PARTITION feb08_per VALUES LESS THAN ('FEB-08'),
    PARTITION feb09_per VALUES LESS THAN ('FEB-09'),
    PARTITION feb10_per VALUES LESS THAN ('FEB-10'),
    PARTITION feb11_per VALUES LESS THAN ('FEB-11'),
    PARTITION feb12_per VALUES LESS THAN ('FEB-12'),
    PARTITION feb13_per VALUES LESS THAN ('FEB-13'),
    PARTITION jan03_per VALUES LESS THAN ('JAN-03'),
    PARTITION jan04_per VALUES LESS THAN ('JAN-04'),
    PARTITION jan05_per VALUES LESS THAN ('JAN-05'),
    PARTITION jan06_per VALUES LESS THAN ('JAN-06'),
    PARTITION jan07_per VALUES LESS THAN ('JAN-07'),
    PARTITION jan08_per VALUES LESS THAN ('JAN-08'),
    PARTITION jan09_per VALUES LESS THAN ('JAN-09'),
    PARTITION jan10_per VALUES LESS THAN ('JAN-10'),
    PARTITION jan11_per VALUES LESS THAN ('JAN-11'),
    PARTITION jan12_per VALUES LESS THAN ('JAN-12'),
    PARTITION jan13_per VALUES LESS THAN ('JAN-13'),
    PARTITION JUL03_PER VALUES LESS THAN ('JUL-03'),
    PARTITION JUL04_PER VALUES LESS THAN ('JUL-04'),
    PARTITION JUL05_PER VALUES LESS THAN ('JUL-05'),
    PARTITION JUL06_PER VALUES LESS THAN ('JUL-06'),
    PARTITION JUL07_PER VALUES LESS THAN ('JUL-07'),
    PARTITION JUL08_PER VALUES LESS THAN ('JUL-08'),
    PARTITION JUL09_PER VALUES LESS THAN ('JUL-09'),
    PARTITION JUL10_PER VALUES LESS THAN ('JUL-10'),
    PARTITION JUL11_PER VALUES LESS THAN ('JUL-11'),
    PARTITION JUL12_PER VALUES LESS THAN ('JUL-12'),
    PARTITION JUL13_PER VALUES LESS THAN ('JUL-13'),
    PARTITION JUN03_PER VALUES LESS THAN ('JUN-03'),
    PARTITION JUN04_PER VALUES LESS THAN ('JUN-04'),
    PARTITION JUN05_PER VALUES LESS THAN ('JUN-05'),
    PARTITION JUN06_PER VALUES LESS THAN ('JUN-06'),
    PARTITION JUN07_PER VALUES LESS THAN ('JUN-07'),
    PARTITION JUN08_PER VALUES LESS THAN ('JUN-08'),
    PARTITION JUN09_PER VALUES LESS THAN ('JUN-09'),
    PARTITION JUN10_PER VALUES LESS THAN ('JUN-10'),
    PARTITION JUN11_PER VALUES LESS THAN ('JUN-11'),
    PARTITION JUN12_PER VALUES LESS THAN ('JUN-12'),
    PARTITION JUN13_PER VALUES LESS THAN ('JUN-13'),
    PARTITION MAR03_PER VALUES LESS THAN ('MAR-03'),
    PARTITION MAR04_PER VALUES LESS THAN ('MAR-04'),
    PARTITION MAR05_PER VALUES LESS THAN ('MAR-05'),
    PARTITION MAR06_PER VALUES LESS THAN ('MAR-06'),
    PARTITION MAR07_PER VALUES LESS THAN ('MAR-07'),
    PARTITION MAR08_PER VALUES LESS THAN ('MAR-08'),
    PARTITION MAR09_PER VALUES LESS THAN ('MAR-09'),
    PARTITION MAR10_PER VALUES LESS THAN ('MAR-10'),
    PARTITION MAR11_PER VALUES LESS THAN ('MAR-11'),
    PARTITION MAR12_PER VALUES LESS THAN ('MAR-12'),
    PARTITION MAR13_PER VALUES LESS THAN ('MAR-13'),
    PARTITION MAY03_PER VALUES LESS THAN ('MAY-03'),
    PARTITION MAY04_PER VALUES LESS THAN ('MAY-04'),
    PARTITION MAY05_PER VALUES LESS THAN ('MAY-05'),
    PARTITION MAY06_PER VALUES LESS THAN ('MAY-06'),
    PARTITION MAY07_PER VALUES LESS THAN ('MAY-07'),
    PARTITION MAY08_PER VALUES LESS THAN ('MAY-08'),
    PARTITION MAY09_PER VALUES LESS THAN ('MAY-09'),
    PARTITION MAY10_PER VALUES LESS THAN ('MAY-10'),
    PARTITION MAY11_PER VALUES LESS THAN ('MAY-11'),
    PARTITION MAY12_PER VALUES LESS THAN ('MAY-12'),
    PARTITION MAY13_PER VALUES LESS THAN ('MAY-13'),
    PARTITION NOV03_PER VALUES LESS THAN ('NOV-03'),
    PARTITION NOV04_PER VALUES LESS THAN ('NOV-04'),
    PARTITION NOV05_PER VALUES LESS THAN ('NOV-05'),
    PARTITION NOV06_PER VALUES LESS THAN ('NOV-06'),
    PARTITION NOV07_PER VALUES LESS THAN ('NOV-07'),
    PARTITION NOV08_PER VALUES LESS THAN ('NOV-08'),
    PARTITION NOV09_PER VALUES LESS THAN ('NOV-09'),
    PARTITION NOV10_PER VALUES LESS THAN ('NOV-10'),
    PARTITION NOV11_PER VALUES LESS THAN ('NOV-11'),
    PARTITION NOV12_PER VALUES LESS THAN ('NOV-12'),
    PARTITION NOV13_PER VALUES LESS THAN ('NOV-13'),
    PARTITION OCT03_PER VALUES LESS THAN ('OCT-03'),
    PARTITION OCT04_PER VALUES LESS THAN ('OCT-04'),
    PARTITION OCT05_PER VALUES LESS THAN ('OCT-05'),
    PARTITION OCT06_PER VALUES LESS THAN ('OCT-06'),
    PARTITION OCT07_PER VALUES LESS THAN ('OCT-07'),
    PARTITION OCT08_PER VALUES LESS THAN ('OCT-08'),
    PARTITION OCT09_PER VALUES LESS THAN ('OCT-09'),
    PARTITION OCT10_PER VALUES LESS THAN ('OCT-10'),
    PARTITION OCT11_PER VALUES LESS THAN ('OCT-11'),
    PARTITION OCT12_PER VALUES LESS THAN ('OCT-12'),
    PARTITION OCT13_PER VALUES LESS THAN ('OCT-13'),
    PARTITION SEP03_PER VALUES LESS THAN ('SEP-03'),
    PARTITION SEP04_PER VALUES LESS THAN ('SEP-04'),
    PARTITION SEP05_PER VALUES LESS THAN ('SEP-05'),
    PARTITION SEP06_PER VALUES LESS THAN ('SEP-06'),
    PARTITION SEP07_PER VALUES LESS THAN ('SEP-07'),
    PARTITION SEP08_PER VALUES LESS THAN ('SEP-08'),
    PARTITION SEP09_PER VALUES LESS THAN ('SEP-09'),
    PARTITION SEP10_PER VALUES LESS THAN ('SEP-10'),
    PARTITION SEP11_PER VALUES LESS THAN ('SEP-11'),
    PARTITION SEP12_PER VALUES LESS THAN ('SEP-12'),
    PARTITION SEP13_PER VALUES LESS THAN ('SEP-13'),
    partition MON_MAXX values less than (MAXVALUE)
    as
    select * from gl.gl_balances;
    CREATE INDEX GL.GL_BALANCES_PART_N1 ON GL.GL_BALANCES_PART
    (CODE_COMBINATION_ID, PERIOD_NAME)
    NOLOGGING
    TABLESPACE APPS_TS_TX_IDX
    PCTFREE 0
    INITRANS 11
    MAXTRANS 255
    STORAGE (
    INITIAL 128K
    NEXT 128K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE INDEX GL.GL_BALANCES_PART_N2 ON GL.GL_BALANCES_PART
    (PERIOD_NAME)
    NOLOGGING
    TABLESPACE APPS_TS_TX_IDX
    PCTFREE 0
    INITRANS 11
    MAXTRANS 255
    STORAGE (
    INITIAL 128K
    NEXT 128K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL LOCAL;
    CREATE INDEX GL.GL_BALANCES_PART_N3 ON GL.GL_BALANCES_PART
    (PERIOD_NUM, PERIOD_YEAR)
    NOLOGGING
    TABLESPACE APPS_TS_TX_IDX
    PCTFREE 0
    INITRANS 11
    MAXTRANS 255
    STORAGE (
    INITIAL 128K
    NEXT 128K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE INDEX GL.GL_BALANCES_PART_N4 ON GL.GL_BALANCES_PART
    (TEMPLATE_ID)
    NOLOGGING
    TABLESPACE APPS_TS_TX_IDX
    PCTFREE 0
    INITRANS 11
    MAXTRANS 255
    STORAGE (
    INITIAL 128K
    NEXT 128K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE INDEX GL.GL_BALANCES_PART_N99 ON GL.GL_BALANCES_PART
    (CODE_COMBINATION_ID, PERIOD_NAME, BUDGET_VERSION_ID)
    NOLOGGING
    TABLESPACE APPS_TS_TX_IDX
    PCTFREE 0
    INITRANS 11
    MAXTRANS 255
    STORAGE (
    INITIAL 128K
    NEXT 128K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    connect gl/???? ;
    alter table gl.gl_balances rename to gl_balances_old;
    commit;
    alter index GL.GL_BALANCES_N1 rename to GL_BALANCES_OLD_N1;
    commit;
    alter index GL.GL_BALANCES_N2 rename to GL_BALANCES_OLD_N2;
    commit;
    alter index GL.GL_BALANCES_N3 rename to GL_BALANCES_OLD_N3;
    commit;
    alter index GL.GL_BALANCES_N4 rename to GL_BALANCES_OLD_N4;
    commit;
    alter index GL.GL_BALANCES_N99 rename to GL_BALANCES_OLD_N99;
    commit;
    ======================
    alter table gl.gl_balances_part rename to gl_balances;
    commit;
    alter index GL.GL_BALANCES_PART_N1 rename to GL_BALANCES_N1;
    commit;
    alter index GL.GL_BALANCES_PART_N2 rename to GL_BALANCES_N2;
    commit;
    alter index GL.GL_BALANCES_PART_N3 rename to GL_BALANCES_N3;
    commit;
    alter index GL.GL_BALANCES_PART_N4 rename to GL_BALANCES_N4;
    commit;
    alter index GL.GL_BALANCES_PART_N99 rename to GL_BALANCES_N99;
    commit;
    - Compile invalid apps objects...

  • When does the actual balance create in gl_balance table?

    Hi,
    I have question on gl_balance table. when does the actual balance create in gl_balance table?
    We are in Oct-11 period and I can see 'E' and 'B' balance data have been created in gl_balance table for future peiord, such as 'Nov-11' .. However, there is no data for 'A' period. Is that right?
    Thank you for your help!
    DeeDee Wu

    Octavio,
    Thank you for your response.
    Do you mean that ‘Actual’ balance for Nov. period will not be in there until Nov. period is opened and have some journals posted?
    Can you help me to understand following data?
    There is one code combination has been closed in 'May' and has Jun period data with last_updated_date = '28-Apr-2010'. Is that Jun data created at 28-Apr-2010 or copied from May data when Jun. period opened?
    CC period LAST_UPDATE_DATE period LAST_UPDATE_DATE period LAST_UPDATE_DATE
    838826 Apr-10 28-APR-10 May-10 28-APR-10 Jun-10 28-APR-10
    Thank you!
    DeeDee Wu

  • SDE_ORAR1213_Adaptor.SDE_ORA_GLBalanceFact_Full

    Dears,
    when im trying run full load in finance analysts via dac, im getting error,
    Log file for your reference.
    DIRECTOR> VAR_27028 Use override value [DataWarehouse] for session parameter:[$DBConnection_OLAP].
    DIRECTOR> VAR_27028 Use override value [ORA_R1213] for session parameter:[$DBConnection_OLTP].
    DIRECTOR> VAR_27028 Use override value [ORA_R1213.DATAWAREHOUSE.SDE_ORAR1213_Adaptor.SDE_ORA_GLBalanceFact_Full.log] for session parameter:[$PMSessionLogFile].
    DIRECTOR> VAR_27028 Use override value [1000] for mapping parameter:[$$DATASOURCE_NUM_ID].
    DIRECTOR> VAR_27027 Use default value [] for mapping parameter:[mplt_BC_ORA_GL_Balance_Fact.$$FILTER_BY_LEDGER_ID].
    DIRECTOR> VAR_27027 Use default value [] for mapping parameter:[mplt_BC_ORA_GL_Balance_Fact.$$FILTER_BY_LEDGER_TYPE].
    DIRECTOR> VAR_27027 Use default value [] for mapping parameter:[mplt_BC_ORA_GL_Balance_Fact.$$INITIAL_EXTRACT_DATE].
    DIRECTOR> VAR_27027 Use default value [] for mapping parameter:[mplt_BC_ORA_GL_Balance_Fact.$$LAST_EXTRACT_DATE].
    DIRECTOR> VAR_27027 Use default value [] for mapping parameter:[mplt_BC_ORA_GL_Balance_Fact.$$LEDGER_ID_LIST].
    DIRECTOR> VAR_27027 Use default value [] for mapping parameter:[mplt_BC_ORA_GL_Balance_Fact.$$LEDGER_TYPE_LIST].
    DIRECTOR> VAR_27028 Use override value [DEFAULT] for mapping parameter:[$$TENANT_ID].
    DIRECTOR> TM_6014 Initializing session [SDE_ORA_GLBalanceFact_Full] at [Fri Apr 12 22:05:36 2013].
    DIRECTOR> TM_6683 Repository Name: [Oracle_BI_DW_Base]
    DIRECTOR> TM_6684 Server Name: [Oracle_BI_DW_Base_Integration_Service]
    DIRECTOR> TM_6686 Folder: [SDE_ORAR1213_Adaptor]
    DIRECTOR> TM_6685 Workflow: [SDE_ORA_GLBalanceFact_Full] Run Instance Name: [] Run Id: [2324]
    DIRECTOR> TM_6101 Mapping name: SDE_ORA_GLBalanceFact [version 1].
    DIRECTOR> TM_6963 Pre 85 Timestamp Compatibility is Enabled
    DIRECTOR> TM_6964 Date format for the Session is [MM/DD/YYYY HH24:MI:SS]
    DIRECTOR> TM_6827 [E:\Informatica\9.0.1\server\infa_shared\Storage] will be used as storage directory for session [SDE_ORA_GLBalanceFact_Full].
    DIRECTOR> CMN_1805 Recovery cache will be deleted when running in normal mode.
    DIRECTOR> CMN_1802 Session recovery cache initialization is complete.
    DIRECTOR> TM_6708 Using configuration property [DisableDB2BulkMode,Yes]
    DIRECTOR> TM_6708 Using configuration property [ServerPort,4006]
    DIRECTOR> TM_6708 Using configuration property [SiebelUnicodeDB,apps@R12PLY baw@orcl]
    DIRECTOR> TM_6708 Using configuration property [overrideMptlVarWithMapVar,Yes]
    DIRECTOR> TM_6703 Session [SDE_ORA_GLBalanceFact_Full] is run by 64-bit Integration Service [node01_OBIEETESTAPP], version [9.0.1 HotFix2], build [1111].
    MANAGER> PETL_24058 Running Partition Group [1].
    MANAGER> PETL_24000 Parallel Pipeline Engine initializing.
    MANAGER> PETL_24001 Parallel Pipeline Engine running.
    MANAGER> PETL_24003 Initializing session run.
    MAPPING> CMN_1569 Server Mode: [ASCII]
    MAPPING> CMN_1570 Server Code page: [MS Windows Latin 1 (ANSI), superset of Latin1]
    MAPPING> TM_6151 The session sort order is [Binary].
    MAPPING> TM_6156 Using low precision processing.
    MAPPING> TM_6180 Deadlock retry logic will not be implemented.
    MAPPING> TM_6187 Session target-based commit interval is [10000].
    MAPPING> TM_6307 DTM error log disabled.
    MAPPING> TE_7022 TShmWriter: Initialized
    MAPPING> TM_6007 DTM initialized successfully for session [SDE_ORA_GLBalanceFact_Full]
    DIRECTOR> PETL_24033 All DTM Connection Info: [<NONE>].
    MANAGER> PETL_24004 Starting pre-session tasks. : (Fri Apr 12 22:05:37 2013)
    MANAGER> PETL_24027 Pre-session task completed successfully. : (Fri Apr 12 22:05:37 2013)
    DIRECTOR> PETL_24006 Starting data movement.
    MAPPING> TM_6660 Total Buffer Pool size is 12582912 bytes and Block size is 128000 bytes.
    READER_1_1_1> DBG_21438 Reader: Source is [R12PLY], user [apps]
    READER_1_1_1> BLKR_16003 Initialization completed successfully.
    WRITER_1_*_1> WRT_8146 Writer: Target is database [orcl], user [baw], bulk mode [ON]
    WRITER_1_*_1> WRT_8106 Warning! Bulk Mode session - recovery is not guaranteed.
    WRITER_1_*_1> WRT_8124 Target Table W_ACCT_BUDGET_FS :SQL INSERT statement:
    INSERT INTO W_ACCT_BUDGET_FS(GL_ACCOUNT_ID,LEDGER_ID,BUDGET_LEDGER_ID,BUDGET_ID,PERIOD_BEGIN_DT,PERIOD_END_DT,BUDGET_LOC_AMT,LOC_CURR_CODE,CHANGED_BY_ID,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,ADJUSTMENT_FLG,DATASOURCE_NUM_ID,INTEGRATION_ID,TENANT_ID,X_CUSTOM) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    WRITER_1_*_1> WRT_8146 Writer: Target is database [orcl], user [baw], bulk mode [ON]
    WRITER_1_*_1> WRT_8106 Warning! Bulk Mode session - recovery is not guaranteed.
    WRITER_1_*_1> WRT_8124 Target Table W_GL_BALANCE_FS :SQL INSERT statement:
    INSERT INTO W_GL_BALANCE_FS(BUSN_AREA_ORG_ID,GL_ACCOUNT_ID,BALANCE_DATE,DB_CR_IND,BALANCE_ACCT_AMT,BALANCE_LOC_AMT,ACTIVITY_ACCT_AMT,ACTIVITY_LOC_AMT,ACCT_CURR_CODE,LOC_CURR_CODE,INTEGRATION_ID,DATASOURCE_NUM_ID,TENANT_ID,X_CUSTOM,ADJUSTMENT_FLAG,BALANCE_TYPE_FLAG,TRANSLATED_FLAG,SUMMARY_ACCOUNT_FLAG,LAST_UPDATE_DATE,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,LEDGER_ID) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    WRITER_1_*_1> WRT_8270 Target connection group #1 consists of target(s) [W_ACCT_BUDGET_FS, W_GL_BALANCE_FS]
    WRITER_1_*_1> WRT_8003 Writer initialization complete.
    READER_1_1_1> BLKR_16007 Reader run started.
    WRITER_1_*_1> WRT_8005 Writer run started.
    WRITER_1_*_1> WRT_8158
    *****START LOAD SESSION*****
    Load Start Time: Fri Apr 12 22:05:37 2013
    Target tables:
    W_ACCT_BUDGET_FS
    W_GL_BALANCE_FS
    READER_1_1_1> RR_4029 SQ Instance [mplt_BC_ORA_GL_Balance_Fact.SQ_GL_BALANCES] User specified SQL Query [SELECT
    BAL.LEDGER_ID,
    BAL.CODE_COMBINATION_ID,
    BAL.CURRENCY_CODE,
    LED.CURRENCY_CODE,
    PER.PERIOD_NAME,
    BAL.ACTUAL_FLAG,
    BAL.TRANSLATED_FLAG,
    BAL.TEMPLATE_ID,
    BAL.PERIOD_NET_DR,
    BAL.PERIOD_NET_CR,
    ( BAL.BEGIN_BALANCE_DR + BAL.PERIOD_NET_DR ),
    ( BAL.BEGIN_BALANCE_CR + BAL.PERIOD_NET_CR) ,
    BAL.PERIOD_NET_DR_BEQ,
    BAL.PERIOD_NET_CR_BEQ,
    ( BAL.BEGIN_BALANCE_DR_BEQ + BAL.PERIOD_NET_DR_BEQ ) PERIOD_END_BALANCE_DR_BEQ,
    ( BAL.BEGIN_BALANCE_CR_BEQ + BAL.PERIOD_NET_CR_BEQ ) PERIOD_END_BALANCE_CR_BEQ,
    PER.START_DATE,
    PER.END_DATE,
    BAL.LAST_UPDATE_DATE AS LAST_UPDATE_DATE_BAL,
    BAL.LAST_UPDATED_BY AS LAST_UPDATED_BY_BAL,
    PER.LAST_UPDATE_DATE AS LAST_UPDATE_DATE_PERIODS,
    PER.LAST_UPDATED_BY AS LAST_UPDATED_BY_PERIODS,
    LED.LAST_UPDATE_DATE AS LAST_UPDATE_DATE_SOB,
    LED.LAST_UPDATED_BY AS LAST_UPDATED_BY_SOB,
    BAL.BUDGET_VERSION_ID AS BUDGET_VERSION_ID,
    PER.ADJUSTMENT_PERIOD_FLAG AS ADJUSTMENT_PERIOD_FLAG,
    CASE WHEN
    BAL.TRANSLATED_FLAG = 'Y' THEN 'TRANSLATED'
    WHEN
    BAL.TRANSLATED_FLAG = 'R' THEN 'ENTERED_FOREIGN'
    WHEN
    BAL.CURRENCY_CODE = 'STAT' THEN 'STAT'
    WHEN
    ((BAL.PERIOD_NET_DR_BEQ = 0) OR (BAL.PERIOD_NET_DR_BEQ IS NULL)) AND
    ((BAL.PERIOD_NET_CR_BEQ = 0) OR (BAL.PERIOD_NET_CR_BEQ IS NULL)) AND
    ((BAL.BEGIN_BALANCE_DR_BEQ = 0) OR (BAL.BEGIN_BALANCE_DR_BEQ IS NULL)) AND
    ((BAL.BEGIN_BALANCE_CR_BEQ = 0) OR (BAL.BEGIN_BALANCE_CR_BEQ IS NULL))
    THEN 'BASE'
    ELSE 'ENTERED_LEDGER'
    END CURRENCY_BALANCE_TYPE
    FROM
    GL_BALANCES BAL
    , GL_LEDGERS LED
    , GL_PERIODS PER
    WHERE LED.LEDGER_ID = BAL.LEDGER_ID
    AND PER.PERIOD_SET_NAME = LED.PERIOD_SET_NAME
    AND BAL.PERIOD_NAME = PER.PERIOD_NAME
    AND BAL.PERIOD_TYPE = PER.PERIOD_TYPE
    AND NVL(BAL.TRANSLATED_FLAG, 'X') IN ('Y', 'X', 'R')
    AND BAL.ACTUAL_FLAG IN ( 'A','B')
    AND BAL.TEMPLATE_ID IS NULL
    AND
    BAL.LAST_UPDATE_DATE >=
    TO_DATE('', 'MM/DD/YYYY HH24:MI:SS')
    OR PER.LAST_UPDATE_DATE >=
    TO_DATE('', 'MM/DD/YYYY HH24:MI:SS')
    AND DECODE(, 'Y', LED.LEDGER_ID, 1) IN ()
    AND DECODE(, 'Y', LED.LEDGER_CATEGORY_CODE, 'NONE') IN ()]
    READER_1_1_1> RR_4049 SQL Query issued to database : (Fri Apr 12 22:05:37 2013)
    READER_1_1_1> CMN_1761 Timestamp Event: [Fri Apr 12 22:05:37 2013]
    *READER_1_1_1> RR_4035 SQL Error [*
    ORA-00936: missing expression
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT
    BAL.LEDGER_ID,
    BAL.CODE_COMBINATION_ID,
    BAL.CURRENCY_CODE,
    LED.CURRENCY_CODE,
    PER.PERIOD_NAME,
    BAL.ACTUAL_FLAG,
    BAL.TRANSLATED_FLAG,
    BAL.TEMPLATE_ID,
    BAL.PERIOD_NET_DR,
    BAL.PERIOD_NET_CR,
    ( BAL.BEGIN_BALANCE_DR + BAL.PERIOD_NET_DR ),
    ( BAL.BEGIN_BALANCE_CR + BAL.PERIOD_NET_CR) ,
    BAL.PERIOD_NET_DR_BEQ,
    BAL.PERIOD_NET_CR_BEQ,
    ( BAL.BEGIN_BALANCE_DR_BEQ + BAL.PERIOD_NET_DR_BEQ ) PERIOD_END_BALANCE_DR_BEQ,
    ( BAL.BEGIN_BALANCE_CR_BEQ + BAL.PERIOD_NET_CR_BEQ ) PERIOD_END_BALANCE_CR_BEQ,
    PER.START_DATE,
    PER.END_DATE,
    BAL.LAST_UPDATE_DATE AS LAST_UPDATE_DATE_BAL,
    BAL.LAST_UPDATED_BY AS LAST_UPDATED_BY_BAL,
    PER.LAST_UPDATE_DATE AS LAST_UPDATE_DATE_PERIODS,
    PER.LAST_UPDATED_BY AS LAST_UPDATED_BY_PERIODS,
    LED.LAST_UPDATE_DATE AS LAST_UPDATE_DATE_SOB,
    LED.LAST_UPDATED_BY AS LAST_UPDATED_BY_SOB,
    BAL.BUDGET_VERSION_ID AS BUDGET_VERSION_ID,
    PER.ADJUSTMENT_PERIOD_FLAG AS ADJUSTMENT_PERIOD_FLAG,
    CASE WHEN
    BAL.TRANSLATED_FLAG = 'Y' THEN 'TRANSLATED'
    WHEN
    BAL.TRANSLATED_FLAG = 'R' THEN 'ENTERED_FOREIGN'
    WHEN
    BAL.CURRENCY_CODE = 'STAT' THEN 'STAT'
    WHEN
    ((BAL.PERIOD_NET_DR_BEQ = 0) OR (BAL.PERIOD_NET_DR_BEQ IS NULL)) AND
    ((BAL.PERIOD_NET_CR_BEQ = 0) OR (BAL.PERIOD_NET_CR_BEQ IS NULL)) AND
    ((BAL.BEGIN_BALANCE_DR_BEQ = 0) OR (BAL.BEGIN_BALANCE_DR_BEQ IS NULL)) AND
    ((BAL.BEGIN_BALANCE_CR_BEQ = 0) OR (BAL.BEGIN_BALANCE_CR_BEQ IS NULL))
    THEN 'BASE'
    ELSE 'ENTERED_LEDGER'
    END CURRENCY_BALANCE_TYPE
    FROM
    GL_BALANCES BAL
    , GL_LEDGERS LED
    , GL_PERIODS PER
    WHERE LED.LEDGER_ID = BAL.LEDGER_ID
    AND PER.PERIOD_SET_NAME = LED.PERIOD_SET_NAME
    AND BAL.PERIOD_NAME = PER.PERIOD_NAME
    AND BAL.PERIOD_TYPE = PER.PERIOD_TYPE
    AND NVL(BAL.TRANSLATED_FLAG, 'X') IN ('Y', 'X', 'R')
    AND BAL.ACTUAL_FLAG IN ( 'A','B')
    AND BAL.TEMPLATE_ID IS NULL
    AND
    BAL.LAST_UPDATE_DATE >=
    TO_DATE('', 'MM/DD/YYYY HH24:MI:SS')
    OR PER.LAST_UPDATE_DATE >=
    TO_DATE('', 'MM/DD/YYYY HH24:MI:SS')
    AND DECODE(, 'Y', LED.LEDGER_ID, 1) IN ()
    AND DECODE(, 'Y', LED.LEDGER_CATEGORY_CODE, 'NONE') IN ()
    Oracle Fatal Error
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT
    BAL.LEDGER_ID,
    BAL.CODE_COMBINATION_ID,
    BAL.CURRENCY_CODE,
    LED.CURRENCY_CODE,
    PER.PERIOD_NAME,
    BAL.ACTUAL_FLAG,
    BAL.TRANSLATED_FLAG,
    BAL.TEMPLATE_ID,
    BAL.PERIOD_NET_DR,
    BAL.PERIOD_NET_CR,
    ( BAL.BEGIN_BALANCE_DR + BAL.PERIOD_NET_DR ),
    ( BAL.BEGIN_BALANCE_CR + BAL.PERIOD_NET_CR) ,
    BAL.PERIOD_NET_DR_BEQ,
    BAL.PERIOD_NET_CR_BEQ,
    ( BAL.BEGIN_BALANCE_DR_BEQ + BAL.PERIOD_NET_DR_BEQ ) PERIOD_END_BALANCE_DR_BEQ,
    ( BAL.BEGIN_BALANCE_CR_BEQ + BAL.PERIOD_NET_CR_BEQ ) PERIOD_END_BALANCE_CR_BEQ,
    PER.START_DATE,
    PER.END_DATE,
    BAL.LAST_UPDATE_DATE AS LAST_UPDATE_DATE_BAL,
    BAL.LAST_UPDATED_BY AS LAST_UPDATED_BY_BAL,
    PER.LAST_UPDATE_DATE AS LAST_UPDATE_DATE_PERIODS,
    PER.LAST_UPDATED_BY AS LAST_UPDATED_BY_PERIODS,
    LED.LAST_UPDATE_DATE AS LAST_UPDATE_DATE_SOB,
    LED.LAST_UPDATED_BY AS LAST_UPDATED_BY_SOB,
    BAL.BUDGET_VERSION_ID AS BUDGET_VERSION_ID,
    PER.ADJUSTMENT_PERIOD_FLAG AS ADJUSTMENT_PERIOD_FLAG,
    CASE WHEN
    BAL.TRANSLATED_FLAG = 'Y' THEN 'TRANSLATED'
    WHEN
    BAL.TRANSLATED_FLAG = 'R' THEN 'ENTERED_FOREIGN'
    WHEN
    BAL.CURRENCY_CODE = 'STAT' THEN 'STAT'
    WHEN
    ((BAL.PERIOD_NET_DR_BEQ = 0) OR (BAL.PERIOD_NET_DR_BEQ IS NULL)) AND
    ((BAL.PERIOD_NET_CR_BEQ = 0) OR (BAL.PERIOD_NET_CR_BEQ IS NULL)) AND
    ((BAL.BEGIN_BALANCE_DR_BEQ = 0) OR (BAL.BEGIN_BALANCE_DR_BEQ IS NULL)) AND
    ((BAL.BEGIN_BALANCE_CR_BEQ = 0) OR (BAL.BEGIN_BALANCE_CR_BEQ IS NULL))
    THEN 'BASE'
    ELSE 'ENTERED_LEDGER'
    END CURRENCY_BALANCE_TYPE
    FROM
    GL_BALANCES BAL
    , GL_LEDGERS LED
    , GL_PERIODS PER
    WHERE LED.LEDGER_ID = BAL.LEDGER_ID
    AND PER.PERIOD_SET_NAME = LED.PERIOD_SET_NAME
    AND BAL.PERIOD_NAME = PER.PERIOD_NAME
    AND BAL.PERIOD_TYPE = PER.PERIOD_TYPE
    AND NVL(BAL.TRANSLATED_FLAG, 'X') IN ('Y', 'X', 'R')
    AND BAL.ACTUAL_FLAG IN ( 'A','B')
    AND BAL.TEMPLATE_ID IS NULL
    AND
    BAL.LAST_UPDATE_DATE >=
    TO_DATE('', 'MM/DD/YYYY HH24:MI:SS')
    OR PER.LAST_UPDATE_DATE >=
    TO_DATE('', 'MM/DD/YYYY HH24:MI:SS')
    AND DECODE(, 'Y', LED.LEDGER_ID, 1) IN ()
    AND DECODE(, 'Y', LED.LEDGER_CATEGORY_CODE, 'NONE') IN ()
    Oracle Fatal Error].
    READER_1_1_1> CMN_1761 Timestamp Event: [Fri Apr 12 22:05:37 2013]
    READER_1_1_1> BLKR_16004 ERROR: Prepare failed.
    WRITER_1_*_1> WRT_8333 Rolling back all the targets due to fatal session error.
    WRITER_1_*_1> WRT_8325 Final rollback executed for the target [W_ACCT_BUDGET_FS, W_GL_BALANCE_FS] at end of load
    WRITER_1_*_1> WRT_8035 Load complete time: Fri Apr 12 22:05:37 2013
    LOAD SUMMARY
    ============
    WRT_8036 Target: W_ACCT_BUDGET_FS (Instance Name: [W_ACCT_BUDGET_FS])
    WRT_8044 No data loaded for this target
    WRT_8036 Target: W_GL_BALANCE_FS (Instance Name: [W_GL_BALANCE_FS])
    WRT_8044 No data loaded for this target
    WRITER_1__1> WRT_8043 ****END LOAD SESSION*****
    MANAGER> PETL_24031
    ***** RUN INFO FOR TGT LOAD ORDER GROUP [1], CONCURRENT SET [1] *****
    Thread [READER_1_1_1] created for [the read stage] of partition point [mplt_BC_ORA_GL_Balance_Fact.SQ_GL_BALANCES] has completed. The total run time was insufficient for any meaningful statistics.
    Thread [TRANSF_1_1_1] created for [the transformation stage] of partition point [mplt_BC_ORA_GL_Balance_Fact.SQ_GL_BALANCES] has completed. The total run time was insufficient for any meaningful statistics.
    Thread [WRITER_1_*_1] created for [the write stage] of partition point [W_ACCT_BUDGET_FS, W_GL_BALANCE_FS] has completed. The total run time was insufficient for any meaningful statistics.
    MANAGER> PETL_24005 Starting post-session tasks. : (Fri Apr 12 22:05:37 2013)
    MANAGER> PETL_24029 Post-session task completed successfully. : (Fri Apr 12 22:05:38 2013)
    MAPPING> TM_6018 The session completed with [0] row transformation errors.
    MANAGER> PETL_24002 Parallel Pipeline Engine finished.
    DIRECTOR> PETL_24013 Session run completed with failure.
    DIRECTOR> TM_6022
    SESSION LOAD SUMMARY
    ================================================
    DIRECTOR> TM_6252 Source Load Summary.
    DIRECTOR> CMN_1740 Table: [SQ_GL_BALANCES] (Instance Name: [mplt_BC_ORA_GL_Balance_Fact.SQ_GL_BALANCES])
         Output Rows [0], Affected Rows [0], Applied Rows [0], Rejected Rows [0]
    DIRECTOR> TM_6253 Target Load Summary.
    DIRECTOR> CMN_1740 Table: [W_ACCT_BUDGET_FS] (Instance Name: [W_ACCT_BUDGET_FS])
         Output Rows [0], Affected Rows [0], Applied Rows [0], Rejected Rows [0]
    DIRECTOR> CMN_1740 Table: [W_GL_BALANCE_FS] (Instance Name: [W_GL_BALANCE_FS])
         Output Rows [0], Affected Rows [0], Applied Rows [0], Rejected Rows [0]
    DIRECTOR> TM_6023
    ===================================================
    DIRECTOR> TM_6020 Session [SDE_ORA_GLBalanceFact_Full] completed at [Fri Apr 12 22:05:38 2013].

    Check this..
    BI Apps load - DAC variables not substituted.....
    Its very common error message.
    Ensure that you restart the informatica services and DAC services once you follow above resolution.
    please mark correct if it resolves your issue.
    Regards,
    Veeresh Rayan

  • Regarding Financial Analytics Full Load in DAC

    Hi All,
    Today i have started full Load for financial analytics for subject areas : "Revenue, Receivables, Paybles, General Ledger, Cost of goods Sold". The issue is "SDE_ORA_GLBlanceFact_Full", "SDE_ORA_GLJournals_Full" these two tasks failed due Database driven error(Unable to execute the query in Sourcequalifier). Because of these two tasks remaining tasks are gone into "Stopped" status in DAC. Out of 400 tasks only 56 tasks successful, 342 in stopped status, 2 failure. Can anyone please tell me how to resolve the error and start the remaining tasks. Please guide me if am i miss any steps while configuration.
    Regards
    Sundar

    SDE_ORA_GLBalanceFact:
    I had changed the number data type precision and scale from (22,7) to (28,10). Even though i am getting same error. Please find the below Informatica log file
    Severity     Timestamp     Node     Thread     Message Code     Message
    ERROR     10/4/2011 6:04:04 PM     node01_WIN-O0IX1SFES7T     READER_1_1_1     RR_4035     SQL Error [
    ORA-00936: missing expression
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT
    BAL.LEDGER_ID,
    BAL.CODE_COMBINATION_ID,
    BAL.CURRENCY_CODE,
    LED.CURRENCY_CODE,
    PER.PERIOD_NAME,
    BAL.ACTUAL_FLAG,
    BAL.TRANSLATED_FLAG,
    BAL.TEMPLATE_ID,
    BAL.PERIOD_NET_DR,
    BAL.PERIOD_NET_CR,
    ( BAL.BEGIN_BALANCE_DR + BAL.PERIOD_NET_DR ),
    ( BAL.BEGIN_BALANCE_CR + BAL.PERIOD_NET_CR) ,
    BAL.PERIOD_NET_DR_BEQ,
    BAL.PERIOD_NET_CR_BEQ,
    ( BAL.BEGIN_BALANCE_DR_BEQ + BAL.PERIOD_NET_DR_BEQ ) PERIOD_END_BALANCE_DR_BEQ,
    ( BAL.BEGIN_BALANCE_CR_BEQ + BAL.PERIOD_NET_CR_BEQ ) PERIOD_END_BALANCE_CR_BEQ,
    PER.START_DATE,
    PER.END_DATE,
    BAL.LAST_UPDATE_DATE AS LAST_UPDATE_DATE_BAL,
    BAL.LAST_UPDATED_BY AS LAST_UPDATED_BY_BAL,
    PER.LAST_UPDATE_DATE AS LAST_UPDATE_DATE_PERIODS,
    PER.LAST_UPDATED_BY AS LAST_UPDATED_BY_PERIODS,
    LED.LAST_UPDATE_DATE AS LAST_UPDATE_DATE_SOB,
    LED.LAST_UPDATED_BY AS LAST_UPDATED_BY_SOB,
    BAL.BUDGET_VERSION_ID AS BUDGET_VERSION_ID,
    PER.ADJUSTMENT_PERIOD_FLAG AS ADJUSTMENT_PERIOD_FLAG,
    CASE WHEN
    BAL.TRANSLATED_FLAG = 'Y' THEN 'TRANSLATED'
    WHEN
    BAL.TRANSLATED_FLAG = 'R' THEN 'ENTERED_FOREIGN'
    WHEN
    BAL.CURRENCY_CODE = 'STAT' THEN 'STAT'
    WHEN
    ((BAL.PERIOD_NET_DR_BEQ = 0) OR (BAL.PERIOD_NET_DR_BEQ IS NULL)) AND
    ((BAL.PERIOD_NET_CR_BEQ = 0) OR (BAL.PERIOD_NET_CR_BEQ IS NULL)) AND
    ((BAL.BEGIN_BALANCE_DR_BEQ = 0) OR (BAL.BEGIN_BALANCE_DR_BEQ IS NULL)) AND
    ((BAL.BEGIN_BALANCE_CR_BEQ = 0) OR (BAL.BEGIN_BALANCE_CR_BEQ IS NULL))
    THEN 'BASE'
    ELSE 'ENTERED_LEDGER'
    END CURRENCY_BALANCE_TYPE
    FROM
    GL_BALANCES BAL
    , GL_LEDGERS LED
    , GL_PERIODS PER
    WHERE LED.LEDGER_ID = BAL.LEDGER_ID
    AND PER.PERIOD_SET_NAME = LED.PERIOD_SET_NAME
    AND BAL.PERIOD_NAME = PER.PERIOD_NAME
    AND BAL.PERIOD_TYPE = PER.PERIOD_TYPE
    AND NVL(BAL.TRANSLATED_FLAG, 'X') IN ('Y', 'X', 'R')
    AND BAL.ACTUAL_FLAG IN ( 'A','B')
    AND BAL.TEMPLATE_ID IS NULL
    AND
    BAL.LAST_UPDATE_DATE >=
    TO_DATE('', 'MM/DD/YYYY HH24:MI:SS')
    OR PER.LAST_UPDATE_DATE >=
    TO_DATE('', 'MM/DD/YYYY HH24:MI:SS')
    AND DECODE(, 'Y', LED.LEDGER_ID, 1) IN ()
    AND DECODE(, 'Y', LED.LEDGER_CATEGORY_CODE, 'NONE') IN ()
    Oracle Fatal Error
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT
    BAL.LEDGER_ID,
    BAL.CODE_COMBINATION_ID,
    BAL.CURRENCY_CODE,
    LED.CURRENCY_CODE,
    PER.PERIOD_NAME,
    BAL.ACTUAL_FLAG,
    BAL.TRANSLATED_FLAG,
    BAL.TEMPLATE_ID,
    BAL.PERIOD_NET_DR,
    BAL.PERIOD_NET_CR,
    ( BAL.BEGIN_BALANCE_DR + BAL.PERIOD_NET_DR ),
    ( BAL.BEGIN_BALANCE_CR + BAL.PERIOD_NET_CR) ,
    BAL.PERIOD_NET_DR_BEQ,
    BAL.PERIOD_NET_CR_BEQ,
    ( BAL.BEGIN_BALANCE_DR_BEQ + BAL.PERIOD_NET_DR_BEQ ) PERIOD_END_BALANCE_DR_BEQ,
    ( BAL.BEGIN_BALANCE_CR_BEQ + BAL.PERIOD_NET_CR_BEQ ) PERIOD_END_BALANCE_CR_BEQ,
    PER.START_DATE,
    PER.END_DATE,
    BAL.LAST_UPDATE_DATE AS LAST_UPDATE_DATE_BAL,
    BAL.LAST_UPDATED_BY AS LAST_UPDATED_BY_BAL,
    PER.LAST_UPDATE_DATE AS LAST_UPDATE_DATE_PERIODS,
    PER.LAST_UPDATED_BY AS LAST_UPDATED_BY_PERIODS,
    LED.LAST_UPDATE_DATE AS LAST_UPDATE_DATE_SOB,
    LED.LAST_UPDATED_BY AS LAST_UPDATED_BY_SOB,
    BAL.BUDGET_VERSION_ID AS BUDGET_VERSION_ID,
    PER.ADJUSTMENT_PERIOD_FLAG AS ADJUSTMENT_PERIOD_FLAG,
    CASE WHEN
    BAL.TRANSLATED_FLAG = 'Y' THEN 'TRANSLATED'
    WHEN
    BAL.TRANSLATED_FLAG = 'R' THEN 'ENTERED_FOREIGN'
    WHEN
    BAL.CURRENCY_CODE = 'STAT' THEN 'STAT'
    WHEN
    ((BAL.PERIOD_NET_DR_BEQ = 0) OR (BAL.PERIOD_NET_DR_BEQ IS NULL)) AND
    ((BAL.PERIOD_NET_CR_BEQ = 0) OR (BAL.PERIOD_NET_CR_BEQ IS NULL)) AND
    ((BAL.BEGIN_BALANCE_DR_BEQ = 0) OR (BAL.BEGIN_BALANCE_DR_BEQ IS NULL)) AND
    ((BAL.BEGIN_BALANCE_CR_BEQ = 0) OR (BAL.BEGIN_BALANCE_CR_BEQ IS NULL))
    THEN 'BASE'
    ELSE 'ENTERED_LEDGER'
    END CURRENCY_BALANCE_TYPE
    FROM
    GL_BALANCES BAL
    , GL_LEDGERS LED
    , GL_PERIODS PER
    WHERE LED.LEDGER_ID = BAL.LEDGER_ID
    AND PER.PERIOD_SET_NAME = LED.PERIOD_SET_NAME
    AND BAL.PERIOD_NAME = PER.PERIOD_NAME
    AND BAL.PERIOD_TYPE = PER.PERIOD_TYPE
    AND NVL(BAL.TRANSLATED_FLAG, 'X') IN ('Y', 'X', 'R')
    AND BAL.ACTUAL_FLAG IN ( 'A','B')
    AND BAL.TEMPLATE_ID IS NULL
    AND
    BAL.LAST_UPDATE_DATE >=
    TO_DATE('', 'MM/DD/YYYY HH24:MI:SS')
    OR PER.LAST_UPDATE_DATE >=
    TO_DATE('', 'MM/DD/YYYY HH24:MI:SS')
    AND DECODE(, 'Y', LED.LEDGER_ID, 1) IN ()
    AND DECODE(, 'Y', LED.LEDGER_CATEGORY_CODE, 'NONE') IN ()
    Oracle Fatal Error].
    ERROR     10/4/2011 6:04:04 PM     node01_WIN-O0IX1SFES7T     READER_1_1_1     BLKR_16004     ERROR: Prepare failed.
    INFO     10/4/2011 6:04:04 PM     node01_WIN-O0IX1SFES7T     WRITER_1_*_1     WRT_8333     Rolling back all the targets due to fatal session error.
    INFO     10/4/2011 6:04:04 PM     node01_WIN-O0IX1SFES7T     WRITER_1_*_1     WRT_8325     Final rollback executed for the target [W_ACCT_BUDGET_FS, W_GL_BALANCE_FS] at end of load
    SDE_ORA_GLJournals Task Log File
    Severity     Timestamp     Node     Thread     Message Code     Message
    ERROR     10/4/2011 6:04:05 PM     node01_WIN-O0IX1SFES7T     READER_1_1_1     RR_4035     SQL Error [
    ORA-00936: missing expression
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT
    JEL.JE_HEADER_ID,
    JEL.JE_LINE_NUM,
    JEL.LAST_UPDATE_DATE,
    JEL.LAST_UPDATED_BY,
    JEL.LEDGER_ID,
    JEL.CODE_COMBINATION_ID,
    JEL.PERIOD_NAME,
    JEL.STATUS,
    JEL.CREATION_DATE,
    JEL.CREATED_BY,
    JEL.ENTERED_DR,
    JEL.ENTERED_CR,
    JEL.ACCOUNTED_DR,
    JEL.ACCOUNTED_CR,
    JEL.REFERENCE_1,
    JEL.REFERENCE_2,
    JEL.REFERENCE_3,
    JEL.REFERENCE_4,
    JEL.REFERENCE_5,
    JEL.REFERENCE_6,
    JEL.REFERENCE_7,
    JEL.REFERENCE_8,
    JEL.REFERENCE_9,
    JEL.REFERENCE_10,
    JEL.GL_SL_LINK_ID,
    JEH.JE_CATEGORY,
    JEH.JE_SOURCE,
    JEH.NAME,
    JEH.CURRENCY_CODE,
    JEH.POSTED_DATE,
    JEB.NAME,
    PRDS.START_DATE,
    PRDS.END_DATE,
    GL.LEDGER_CATEGORY_CODE,
    PRDS.ADJUSTMENT_PERIOD_FLAG
    FROM
    GL_JE_LINES JEL,
    GL_JE_HEADERS JEH,
    GL_JE_BATCHES JEB,
    GL_PERIOD_STATUSES PRDS,
    GL_LEDGERS GL
    WHERE
    JEL.JE_HEADER_ID = JEH.JE_HEADER_ID
    AND JEH.ACTUAL_FLAG = 'A'
    AND JEB.STATUS = 'P'
    AND JEH.JE_BATCH_ID = JEB.JE_BATCH_ID (+)
    AND JEL.PERIOD_NAME = PRDS.PERIOD_NAME
    AND JEL.LEDGER_ID = PRDS.SET_OF_BOOKS_ID
    AND JEL.LEDGER_ID = GL.LEDGER_ID
    AND PRDS.APPLICATION_ID = 101
    AND JEH.CURRENCY_CODE<>'STAT'
    AND ( JEB.CREATION_DATE >=
    TO_DATE('01/01/1753 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    AND DECODE(, 'Y', GL.LEDGER_ID, 1) IN ()
    AND DECODE(, 'Y', GL.LEDGER_CATEGORY_CODE, 'NONE') IN ()
    Oracle Fatal Error
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT
    JEL.JE_HEADER_ID,
    JEL.JE_LINE_NUM,
    JEL.LAST_UPDATE_DATE,
    JEL.LAST_UPDATED_BY,
    JEL.LEDGER_ID,
    JEL.CODE_COMBINATION_ID,
    JEL.PERIOD_NAME,
    JEL.STATUS,
    JEL.CREATION_DATE,
    JEL.CREATED_BY,
    JEL.ENTERED_DR,
    JEL.ENTERED_CR,
    JEL.ACCOUNTED_DR,
    JEL.ACCOUNTED_CR,
    JEL.REFERENCE_1,
    JEL.REFERENCE_2,
    JEL.REFERENCE_3,
    JEL.REFERENCE_4,
    JEL.REFERENCE_5,
    JEL.REFERENCE_6,
    JEL.REFERENCE_7,
    JEL.REFERENCE_8,
    JEL.REFERENCE_9,
    JEL.REFERENCE_10,
    JEL.GL_SL_LINK_ID,
    JEH.JE_CATEGORY,
    JEH.JE_SOURCE,
    JEH.NAME,
    JEH.CURRENCY_CODE,
    JEH.POSTED_DATE,
    JEB.NAME,
    PRDS.START_DATE,
    PRDS.END_DATE,
    GL.LEDGER_CATEGORY_CODE,
    PRDS.ADJUSTMENT_PERIOD_FLAG
    FROM
    GL_JE_LINES JEL,
    GL_JE_HEADERS JEH,
    GL_JE_BATCHES JEB,
    GL_PERIOD_STATUSES PRDS,
    GL_LEDGERS GL
    WHERE
    JEL.JE_HEADER_ID = JEH.JE_HEADER_ID
    AND JEH.ACTUAL_FLAG = 'A'
    AND JEB.STATUS = 'P'
    AND JEH.JE_BATCH_ID = JEB.JE_BATCH_ID (+)
    AND JEL.PERIOD_NAME = PRDS.PERIOD_NAME
    AND JEL.LEDGER_ID = PRDS.SET_OF_BOOKS_ID
    AND JEL.LEDGER_ID = GL.LEDGER_ID
    AND PRDS.APPLICATION_ID = 101
    AND JEH.CURRENCY_CODE<>'STAT'
    AND ( JEB.CREATION_DATE >=
    TO_DATE('01/01/1753 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    AND DECODE(, 'Y', GL.LEDGER_ID, 1) IN ()
    AND DECODE(, 'Y', GL.LEDGER_CATEGORY_CODE, 'NONE') IN ()
    Oracle Fatal Error].
    ERROR     10/4/2011 6:04:05 PM     node01_WIN-O0IX1SFES7T     READER_1_1_1     BLKR_16004     ERROR: Prepare failed.

  • Discoverer Report showing Null VS Show SQL query showing results !!!

    I created a simple Cross Tab Discoverer report from a custom SQL which has a calculation for balances. The output is giving all null values even though there are balances. The output doesn't seem right. So I copied the query from Tools-->Show SQL and ran the query in the TOAD where I'm showing balances for the report. I don't understand why it is not showing in the discoverer. Please help.
    Thanks
    Edited by: PA1B on Jan 27, 2010 11:40 AM

    Sorry for late reply.
    Below is the Show SQL query. I don't think the query is application dependent. C_1 is my calculation.
    SELECT o279709.SEGMENT3 as E279727,
    o279709.SEGMENT4 as E279728,
    CASE WHEN o279709.CURRENCY_CODE = 'USD' AND o279709.TRANSLATED_FLAG <> 'Y' THEN SUM(o279709.ENDING_BAL) ELSE 0 END as C_1,
    GROUPING_ID(o279709.CURRENCY_CODE,o279709.SEGMENT3,o279709.SEGMENT4,o279709.TRANSLATED_FLAG) as GID
    FROM ( --Foriegn Entity USD Balances
    SELECT                B.SEGMENT1,
                                       B.SEGMENT2,     
                                       B.SEGMENT3,
                                  (select distinct substr(cat.COMPILED_VALUE_ATTRIBUTES,5,1) from apps.fnd_flex_values cat
                   where FLEX_VALUE_SET_ID = (select bat.FLEX_VALUE_SET_ID from apps.fnd_id_flex_structures_vl aat, apps.fnd_id_flex_segments_vl bat
                                                                                                                       where bat.id_flex_code = 'GL#' and
                                                                                                                            bat.id_flex_code = aat.id_flex_code and
                                                                                                                            aat.APPLICATION_ID = bat.APPLICATION_ID and
                                                                                                                            aat.APPLICATION_ID = 101 and
                                                                                                                            bat.SEGMENT_NAME = 'Prime Account' and
                                                                                                                            aat.id_flex_num = bat.id_flex_num
                                                                                                                            and bat.id_flex_num in (select distinct chart_of_accounts_id from apps.gl_code_combinations gat
                                                                                                                                                                              where gat.code_combination_id = A.code_combination_id))
                                       and cat.flex_value = b.segment3) ACCT_TYPE ,
                                       B.SEGMENT4,
                                       B.SEGMENT5,
                                       B.SEGMENT6,
                                       B.SEGMENT7,
                                       B.SEGMENT8,
                                       B.SEGMENT9,
                                       B.SEGMENT10,
                                       B.SEGMENT11,
                                       B.SEGMENT12,
                                       B.SEGMENT13,
                                       C.NAME,
    A.SET_OF_BOOKS_ID,
                                       A.CURRENCY_CODE,A.TRANSLATED_FLAG,
                                  SUM(NVL(A.BEGIN_BALANCE_DR,0) - NVL(A.BEGIN_BALANCE_CR,0)) BEG_BAL,
                                  SUM(NVL(A.PERIOD_NET_DR,0)) DEBITS,
    SUM( NVL(A.PERIOD_NET_CR,0)) CREDITS ,
    A.PERIOD_NAME,
                                  SUM(NVL(A.BEGIN_BALANCE_DR,0) - NVL(A.BEGIN_BALANCE_CR,0))+ SUM(NVL(A.PERIOD_NET_DR,0) - NVL(A.PERIOD_NET_CR,0)) ENDING_BAL
    FROM                     APPS.GL_BALANCES A ,
                                       APPS.GL_CODE_COMBINATIONS B,
                                       APPS.GL_SETS_OF_BOOKS     C
    WHERE                     A.CODE_COMBINATION_ID = B.CODE_COMBINATION_ID
    --AND                           A.PERIOD_NAME = 'SEP-09'
    AND                          C.SET_OF_BOOKS_ID = A.SET_OF_BOOKS_ID
    --AND                           A.TRANSLATED_FLAG <> 'Y'
    --AND                           B.SEGMENT1 = '83101'
    --AND                           B.SEGMENT3 = '14602'
    --AND                           A.SET_OF_BOOKS_ID = 77
    --AND                           A.CURRENCY_CODE = 'USD'
    GROUP BY           A.CODE_COMBINATION_ID,
                                  B.SEGMENT1,
                                       B.SEGMENT2,     
                                       B.SEGMENT3,
                                       B.SEGMENT4,
                                       B.SEGMENT5,
                                       B.SEGMENT6,
                                       B.SEGMENT7,
                                       B.SEGMENT8,
                                       B.SEGMENT9,
                                       B.SEGMENT10,
                                       B.SEGMENT11,
                                       B.SEGMENT12,
                                       B.SEGMENT13,          
                                       A.CURRENCY_CODE,
                                       A.TRANSLATED_FLAG,
                                       C.NAME,A.PERIOD_NAME,
    A.SET_OF_BOOKS_ID
    ) o279709
    WHERE (o279709.PERIOD_NAME = 'DEC-09')
    AND (o279709.SET_OF_BOOKS_ID <> 72)
    AND (o279709.SEGMENT12 = '000')
    AND (o279709.SEGMENT3 IN ('10101','10301','10502','12001'))
    AND (o279709.SEGMENT1 IN ('82901','82902','82903','83001','83003','83201'))
    GROUP BY GROUPING SETS(( o279709.CURRENCY_CODE,o279709.SEGMENT3,o279709.SEGMENT4,o279709.TRANSLATED_FLAG ),( o279709.SEGMENT3,o279709.SEGMENT4 ),( o279709.SEGMENT3 ))
    HAVING (GROUP_ID()=0)
    ORDER BY GID DESC;
    Thanks,
    PA1
    Edited by: PA1B on Jan 29, 2010 12:50 PM

  • How to create a function that returns multiple rows in table

    Dear all,
    I want to create a funtion that returns multiple rows from the table (ex: gl_balances). I done following:
    -- Create type (successfull)
    Create or replace type tp_gl_balance as Object
    PERIOD_NAME VARCHAR2(15),
    CURRENCY_CODE VARCHAR2(15),
    PERIOD_TYPE VARCHAR2(15),
    PERIOD_YEAR NUMBER(15),
    BEGIN_BALANCE_DR NUMBER,
    BEGIN_BALANCE_CR NUMBER
    -- successfull
    create type tp_tbl_gl_balance as table of tp_gl_balance;
    but i create a function for return some rows from gl_balances, i can't compile it
    create or replace function f_gl_balance(p_period varchar2) return tp_tbl_gl_balance pipelined
    as
    begin
    return
    (select gb.period_name, gb.currency_code, gb.period_type, gb.period_year, gb.begin_balance_dr, gb.begin_balance_cr
    from gl_balances gb
    where gb.period_name = p_period);
    end;
    I also try
    create or replace function f_gl_balance(p_period varchar2) return tp_tbl_gl_balance pipelined
    as
    begin
    select gb.period_name, gb.currency_code, gb.period_type, gb.period_year, gb.begin_balance_dr, gb.begin_balance_cr
    from gl_balances gb
    where gb.period_name = p_period;
    return;
    end;
    Please help me solve this function.
    thanks and best reguard

    hi,
    Use TABLE FUNCTIONS,
    [http://www.oracle-base.com/articles/9i/PipelinedTableFunctions9i.php]
    Regards,
    Danish

  • Select from v$sql_plan in a procedure

    Hi
    I''m attempting to save plans (from V$SQL_PLAN) into a table using a procedure in schema APPS, but keep getting missing table error,
    PL/SQL: ORA-00942: table or view does not existI then granted an explicit SELECT to APPS on the V$SQL_PLAN table from a schema with
    a DBA role, but still get the same error when compiling the procedure.
    SQL> create table gl_imp_post_plans as ( select * from v$sql_plan where rownum < 1);
    Table created.
    SQL> select count(*) from v$sql_plan;
      COUNT(*)
         13506
    SQL> create or replace procedure Ins_Plan_from_Dictionary as
      2 
      3    begin
      4      insert into GL_Imp_Post_Plans
      5      select  sqo.*
      6      from    v$sql_plan sqo
      7      where  (sqo.sql_id) not in (select distinct gipi.SQL_ID
      8                                  from   GL_Imp_Post_Plans gipi)
      9      and    (sqo.sql_id) in     (select distinct
    10                                         sqi.sql_id
    11                                  from   v$sql_plan sqi
    12                                  where  sqi.object_owner = 'APPS'
    13                                  and    sqi.object_name  in ('GL_BALANCES','GL_DAILY_BALANCES','GL_JE_LINES') );
    14      commit;
    15 
    16 
    17      exception
    18        when others then
    19          rollback;
    20  --        sysao_util.Message ('O', 'Error ' || sqlerrm);
    21 
    22  end Ins_Plan_from_Dictionary;
    23  /
    Warning: Procedure created with compilation errors.
    SQL> show err
    Errors for PROCEDURE INS_PLAN_FROM_DICTIONARY:
    LINE/COL ERROR
    4/5      PL/SQL: SQL Statement ignored
    11/40    PL/SQL: ORA-00942: table or view does not exist
    SQL>
    SQL> l 11
    11*                                 from   v$sql_plan sqiThe same error occurs when I attempt to select from GV$SQL_PLAN or DBA_HIST_SQL_PLAN.
    Could anybody suggest how I can persist the rows into a table using a procedure?
    thanks

    thanks, yes this works:
    create or replace procedure Ins_Plan_from_Dictionary as
      begin
        execute immediate 'begin
                            insert into GL_Imp_Post_Plans
                            select  sqo.*
                            from    v$sql_plan sqo
                            where  (sqo.sql_id) not in (select distinct gipi.SQL_ID
                                                        from   GL_Imp_Post_Plans gipi)
                            and    (sqo.sql_id) in     (select distinct
                                                               sqi.sql_id
                                                        from   v$sql_plan sqi
                                                        where  sqi.object_owner = ''APPS''
                                                        and    sqi.object_name  in (''GL_BALANCES'',''GL_DAILY_BALANCES'',''GL_JE_LINES'') );
                            commit;
                           end;';
        exception
          when others then
            rollback;
    --        sysao_util.Message ('O', 'Error ' || sqlerrm);
    end Ins_Plan_from_Dictionary;
    /

  • Unable to use flexfield lexical oracle.apps.fnd.flex.kff.segments_metadata

    EBS 11.5.10.2
    XMLP 5.6.3
    ARXAGMW.rdf
    Hello,
    I am trying to convert an Oracle Report to XML Publisher, and I am having problems getting lexicals in the Data Template to work.
    I raised an SR for this since both related threads in this forum from two years ago were unresolved. Oracle had no answers for me, and told me to ask the question here.
    So anyone who has any ideas, please chime in!
    Here is a simplified version of the data template, narrowed down to just the use of the lexicals:
    <?xml version="1.0" encoding="utf-8"?>
    <dataTemplate name="XXWLC_ARXAGMW"
                  description="samples from doco"
                  defaultPackage=""
                  dataSourceRef="ORA_EBS"
                  version="1.0">
      <properties>
        <property name="xml_tag_case"       value="upper" />
        <property name="include_parameters" value="true"  />
        <property name="debug_mode"         value="on"    />
      </properties>
      <parameters>
        <parameter name="P_ID_FLEX_NUM" dataType = "number" defaultValue="101" />
      </parameters>
      <lexicals>
        <lexical type="oracle.apps.fnd.flex.kff.segments_metadata"
                 name="FLEX_GL_BALANCING_APROMPT"
                 comment="Comment"
                 application_short_name="SQLGL"
                 id_flex_code="GL#"
                 id_flex_num=":P_ID_FLEX_NUM"
                 segments="GL_BALANCING"
                 show_parent_segments="Y"
                 metadata_type="ABOVE_PROMPT"/>
        <lexical type="oracle.apps.fnd.flex.kff.segments_metadata"
                 name="FLEX_GL_ACCOUNT_LPROMPT"
                 comment="Comment"
                 application_short_name="SQLGL"
                 id_flex_code="GL#"
                 id_flex_num=":P_ID_FLEX_NUM"
                 segments="GL_ACCOUNT"
                 show_parent_segments="Y"
                 metadata_type="LEFT_PROMPT"/>
        <lexical type="oracle.apps.fnd.flex.kff.segments_metadata"
                 name="ACCT_BAL_LPROMPT"
                 application_short_name="SQLGL"
                 id_flex_code="GL#"
                 id_flex_num=":P_ID_FLEX_NUM"
                 segments="GL_BALANCING"
                 show_parent_segments="Y"
                 metadata_type="LEFT_PROMPT" />
      </lexicals>
      <dataQuery>
        <sqlStatement name="Q_DOCO_SAMPLE">
          <![CDATA[
            SELECT
               &FLEX_GL_BALANCING_APROMPT alias_gl_balancing_aprompt
              ,&FLEX_GL_ACCOUNT_LPROMPT   alias_gl_account_lprompt
              ,&ACCT_BAL_LPROMPT          alias_acct_bal_lprompt
            FROM dual
          ]]>
        </sqlStatement>
      </dataQuery>
      <dataStructure>
        <group name="G_DOCO_SAMPLE" dataType="varchar2" source="Q_DOCO_SAMPLE">
          <element name="sample_gl_balancing_aprompt" dataType="varchar2" value="alias_gl_balancing_aprompt" />
          <element name="sample_gl_account_lprompt"   dataType="varchar2" value="alias_gl_account_lprompt"   />
          <element name="sample_acct_bal_lprompt"     dataType="varchar2" value="alias_acct_bal_lprompt"     />
        </group>
      </dataStructure>
    </dataTemplate>The lexicals "compile" and run successfully, but they return String values that SHOULD be wrapped with quotes; but this doesn't happen, so the SQL that runs is:
    SELECT
       COMPANY alias_gl_balancing_aprompt
      ,ACCT  alias_gl_account_lprompt
      ,CO          alias_acct_bal_lprompt
    FROM dualThus, the concurrent program ends with ERROR, due to java.sql.SQLException: ORA-00904: "CO": invalid identifier
    The first two lexicals and their corresponding sql statement are samples directly from the user guide (which is full of errors). The third lexical is the one from ARXAGMW.rdf.xml that I am trying to make work.
    Edited by: user650442 on Apr 30, 2010 3:58 PM

    By the way, simply adding the quotes around the lexical names in the sql statement doesn't work. That causes the lexical references to be ignored as simple string values:
    SELECT
       '&FLEX_GL_BALANCING_APROMPT' alias_gl_balancing_aprompt
      ,'&FLEX_GL_ACCOUNT_LPROMPT'   alias_gl_account_lprompt
      ,'&ACCT_BAL_LPROMPT'          alias_acct_bal_lprompt
    FROM dualI turned on statement-level debugging via xdodebug.cfg and saw how it compiled the lexicals. By replicating the call to apps.fnd_flex_xml_publisher_apis.kff_segments_metadata that I found there, I was able to hack together a workaround for this issue.
    Please point me to a better way of doing this if possible, as I had to GRANT EXECUTE on this apps package to my custom code schema. Is there a better lexical/flexfields reference than the XML Publisher documentation?
    Here is the call I made in my before-report trigger:
    --set ACCT_BAL_LPROMPT flexfield segment metadata lexical
    begin
    apps.fnd_flex_xml_publisher_apis.kff_segments_metadata(
      'FLEX_ACCT_BAL_LPROMPT',
      'SQLGL',
      'GL#',
      101,
      'GL_BALANCING',
      'Y',
      'LEFT_PROMPT',
      c_FLEX_ACCT_BAL_LPROMPT
    end;

Maybe you are looking for

  • Creating variables in OLAP DML - 11g

    Hi Experts, My understanding is that the OLAP metadata is exposed to GUI via formulas only. if I create a variable in OLAP DML worksheet, is it possible to expose it to cube view, and awm by formulas/programs etc? Kind Regards

  • Variable values in composite.xml property

    Hi, i've got the similar proble to: variable values in composite.xml property Static value for property <property name="oracle.webservices.auth.password" type="xs:string" many="false" override="may">admin</property> <property name="oracle.webservices

  • Oracle install problem in linux

    hi, cannot execute the Export command before running the command ./RUNINSTALL.SH Error is OraSID#export DISPLAY=ipaddress:0.0 cannot find the command but i can find the export command in sbin and also i checked echo$DISLPAY and got output as :0.0 and

  • HT203171 Why is my cursor jumping around?

    THe cursor on my Macbook Pro has suddenly started jumping around even when I am touching nothing. It seems to have started after I installed a free Photoshop trial. I have done a Safe Start but nothing  has changed.

  • How do i access advanced black & white print mode with CS6 using OS 10.8

    We are using CS6 at our printmaking facility and recently upgraded our workstation to Mac OS 10.8.5. Now we are not able to access the advanced black & white print mode anymore when printing gray scale images. Is anyone else having this problem and w