Goto link query is not giving exact results

Hi Folks
I am having issue with GOTO query.
My main query gives details of Employee seperation in particular year.
For this query i have goto query.
When i am checking the details of goto query ,it is giving incorrect results.
Your help is appreciated.
Thanks & Regards,
Hari Reddy

Hi Hari,
    Check in RSBBS, whether you specified the receiver query correctly...
Check the link:
[http://help.sap.com/saphelp_nw04/helpdata/en/99/08629bd3e41d418530c6849df303c9/content.htm]
    Hope this helps you.
Regards,
Yokesh.

Similar Messages

  • MIX sale return problem(query not giving required result)

    i have written following query which is running sucessfully.the concept behind this query is to get a exact quantity of sold items after subtracting the sale return from the sale.now the problem is that when user take sale return against invoice then this query providing ok result but when user take sale return against MIX items not knowing exactly the invoice then query is not showing result means not subtracting MIX sale from sale.please help me to get required result from this query.
    i m using oracle 9i with developer 6i
    select s.price,s.item_code,S.DESCR,
    sum(decode(d.MONno,01,NVL(S.QTY,0),0)) JAN,
    sum(decode(d.MONno,02,NVL(S.QTY,0),0)) FEB,
    sum(decode(d.MONno,03,NVL(S.QTY,0),0)) MAR,
    sum(decode(d.MONno,04,NVL(S.QTY,0),0)) APR,
    sum(decode(d.MONno,05,NVL(S.QTY,0),0)) MAY,
    sum(decode(d.MONno,06,NVL(S.QTY,0),0)) JUN,
    sum(decode(d.MONno,07,NVL(S.QTY,0),0)) JULY,
    sum(decode(d.MONno,08,NVL(S.QTY,0),0)) AUG,
    sum(decode(d.MONno,09,NVL(S.QTY,0),0)) SEP,
    sum(decode(d.MONno,10,NVL(S.QTY,0),0)) OCT,
    sum(decode(d.MONno,11,NVL(S.QTY,0),0)) NOV,
    sum(decode(d.MONno,12,NVL(S.QTY,0),0)) DEC,
    sum(S.qty) TU
    FROM
    (select nvl(sales_detail.qty,0)+NVL(sales_detail.bonus,0) as qty,
    sales_detail.item_code AS ITEM_CODE,stock_reg.price price,
    stock_reg.descr AS descr,
    s_date as sale_date FROM
    SALES_DETAIL,SALES_HEADER,STOCK_REG
    WHERE SALES_DETAIL.S_ID = SALES_HEADER.S_ID AND
    SALES_DETAIL.STOCKCODE = STOCK_REG.STOCKCODE AND
    STOCK_REG.COMCODE=:COM AND
    STOCK_REG.GROUPID = :GID
    UNION ALL
    SELECT -1*QTY,ITEM_CODE,PRICE,DESCR,SALE_DATE FROM
    (select nvl(sales_detailR.qty,0)+NVL(sales_detailR.bonus,0) as qty,
    sales_detailR.item_code AS ITEM_CODE,stock_reg.price as price,
    stock_reg.descr AS descr,
    RETURN_date as sale_date FROM
    SALES_DETAILR,SALES_HEADERR,STOCK_REG
    WHERE SALES_DETAILR.SR_ID = SALES_HEADERR.SR_ID AND
    SALES_DETAILR.STOCKCODE = STOCK_REG.STOCKCODE AND
    STOCK_REG.COMCODE=:COM AND
    STOCK_REG.GROUPID = :GID
    UNION ALL
    select  -1nvl(sales_detailR.qty,0)+NVL(sales_detailR.bonus,0) as qty,*
    sales_detailR.item_code AS ITEM_CODE,stock_reg.price as price,
    stock_reg.descr AS descr,
    RETURN_date as sale_date  FROM
    SALES_DETAILR,SALES_HEADERR,STOCK_REG
    WHERE SALES_DETAILR.SR_ID = SALES_HEADERR.SR_ID AND
    SALES_DETAILR.STOCKCODE = STOCK_REG.STOCKCODE AND
    SALES_HEADERR.S_ID = 'MIX' AND
    STOCK_REG.COMCODE=:COM AND
    STOCK_REG.GROUPID = :GID)) S,
    (select level as MONno
    from dual
    connect by level <= 12) d
    where d.MONno = to_char(s.sALE_date, 'MM') AND trunc(S.SALE_DATE,'MONTH') BETWEEN TO_DATE(:FDATE,'MMYY') AND TO_DATE(:TDATE,'MMYY')
    GROUP BY S.ITEM_CODE,S.DESCR,S.PRICE
    ORDER BY S.DESCR ASC

    Gaurav,
    Can you print all the binding variables and update the ouput here.
    And I didn't get this date format 'dd-mon-rrrr', normally it will be like 'dd-mon-yyyy' right?
    Thanks,
    With regards,m
    Kali.
    OSSI.

  • Why this query does not show the result?

    Why the query with the schema prefixed does not show the result and the query without schema display the correct results?
    SQL> select data_object_id,object_type from dba_objects where object_name='HR'.'JOBS';
    select data_object_id,object_type from dba_objects where object_name='HR'.'JOBS'
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> select data_object_id,object_type from dba_objects where object_name='HR.JOBS';
    no rows selected
    SQL> select data_object_id, OWNER, object_type from dba_objects where object_name='JOBS';
    DATA_OBJECT_ID     OWNER                          OBJECT_TYPE
    69662              HR                                 TABLE
                       OE                                 SYNONYM
    SQL> SELECT USER FROM DUAL;
    USER
    SYS

    Hi,
    the column object_name refers to a object_name which is 'JOBS', the column owner refers to the owner 'HR', the value isn't stored together, so you have to select the two columns. It is the same behaviour as every other table/view. Have a look at the values in the view DBA_OBJECTS.
    Herald ten Dam
    Superconsult.nl

  • SPEL not giving desired result

    Hi ALL,
    SPEL
    *${oa.TestPVO1.xxDisable}* on Disable Property for a button
    In CO
    OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
    am.invokeMethod("hide");
    In AM
    public void hide()
    OAViewObject disvo = (OAViewObject)getTestPVO1();
    if (!disvo.isPreparedForExecution())
    disvo.executeQuery();
    Row drow = disvo.createRow();//.getCurrentRow();
    disvo.insertRow(drow);
    drow.setAttribute("xxDisable", Boolean.FALSE);
    NOT giving desired o/p to disable the button
    Thanks,
    Sombit.
    Edited by: Sombit on Oct 1, 2009 7:33 AM

    Try assigning the SPEL value in the *VORowImpl.
    First, in order to assign a value to SPEL, you'll need to create a custom VO. Here's a sample query I've used to create my VO to pull data pertainining to if an Attribute should be mandatory/rendered.
    SELECT min(descriptive_flex_context_code) descriptive_flex_context_code, min(Enabled) Enabled, min(END_USER_COLUMN_NAME) END_USER_COLUMN_NAME, min(required_flag) required_flag, min(application_column_name) application_column_name,
    min(xxx.LOV) LOV
    from
    (SELECT descriptive_flex_context_code,'Y' Enabled, END_USER_COLUMN_NAME, required_flag, application_column_name,
    decode(ffvv.flex_value,null,'N','Y') LOV
    FROM FND_DESCR_FLEX_COL_USAGE_VL fdfc,
    fnd_flex_values_vl ffvv
    WHERE (fdfc.APPLICATION_ID=20045)
    and (fdfc.DESCRIPTIVE_FLEXFIELD_NAME LIKE 'SPL Account Map')
    and fdfc.enabled_flag = 'Y'
    and fdfc.display_flag = 'Y'
    and fdfc.application_column_name = 'ATTRIBUTE5'
    and ffvv.flex_value_set_id(+) = fdfc.flex_value_set_id
    and rownum = 1) xxx
    Once the VO is created, I created several transient "boolean" attributes in my VO. These attributes will be assigned a value based on code I place in my *VORowImpl since this is the file which controls attribute assignments.
    But before that, in my *VOImpl, I've defined a custom method which is used to execute the VO from my AM.
    public class Ref5PVOImpl extends OAViewObjectImpl
    * This is the default constructor (do not remove)
    public Ref5PVOImpl()
    public void initRef5PVO()
    // setWhereClause("descriptive_flex_context_code in (select vendor_name from spl_account_map where cont_cd = :1)");
    setWhereClauseParams(null); //Always reset
    // setWhereClauseParam(0, acct);
    // System.out.println("value_selected customer>> "+acct);
    executeQuery();
    In my *VORowImpl, I've added custom code to my Attribute methods so that they return the proper values when invoked...
    public String getMakeRequired()
    if (getRequiredFlag()!= null)
    if ("Y".equals(getRequiredFlag()))
    //if(getMessageChoiceAttribute()==null)
    System.out.println("Required returned yes");
    return "yes";
    else
    System.out.println("Required returned no");
    return "no";
    else
    return "no"; //poplist will be disabled - DFF is not configured
    public Boolean getOptionRender()
    if (getLov()!= null)
    // In this method check if the Message Text Input is valid
    if ("N".equals(getLov()))
    System.out.println("OptionRender returned true "+ getLov());
    return Boolean.TRUE; //text input will be enabled if no LOV exists
    else
    System.out.println("OptionRender returned false "+ getLov());
    return Boolean.FALSE; //text input will be disabled if LOV exists
    else
    return Boolean.FALSE; //text input will be disabled - DFF is not configured
    Then add your SPEL directive into your field's Property inpector...
    ${oa.Ref5PVO1.MakeRequired}
    ${oa.Ref5PVO1.OptionRender}

  • Group by Query not giving desired results

    Hi,
    I've a requirement to find minimum month based on status:
    The following query is giving error :
    SELECT
              b.app_name,
              DECODE (a.status,
              'C','Closed',
              'O','Open',
              'F','Future',
              'W','Pending',
              'N','Not Opened') decode_status
              MIN(a.period_name)
    FROM     table a,
         table b
    WHERE     a.app_id     =     b.app_id
    AND          b.app_name      =     'NAME1'
    AND          a.book_id     =     &book_id
    AND          a.status      =      'O'
    GROUP BY      b.app_name,
              DECODE (a.status,
              'C','Closed',
              'O','Open',
              'F','Future',
              'W','Pending',
              'N','Not Opened') decode_status
    for ex: in the above query if I've four records with status 'O' and period_name as 'May-12', 'Jun-12','Jul-12' ,'Aug-12' then I need to pick 'May'
    Thanks,
    Kiran

    Hi, Kiran,
    user518071 wrote:
    Hi,
    I've a requirement to find minimum month based on status:
    The following query is giving error :
    SELECT
              b.app_name,
              DECODE (a.status,
              'C','Closed',
              'O','Open',
              'F','Future',
              'W','Pending',
              'N','Not Opened') decode_status
              MIN(a.period_name)
    FROM     table a,
         table b
    WHERE     a.app_id     =     b.app_id
    AND          b.app_name      =     'NAME1'
    AND          a.book_id     =     &book_id
    AND          a.status      =      'O'
    GROUP BY      b.app_name,
              DECODE (a.status,
              'C','Closed',
              'O','Open',
              'F','Future',
              'W','Pending',
              'N','Not Opened') decode_status
    for ex: in the above query if I've four records with status 'O' and period_name as 'May-12', 'Jun-12','Jul-12' ,'Aug-12' then I need to pick 'May'
    Thanks,
    KiranIt looks like you're almost there.
    If period_name is a DATE, then
    MIN (a.period_name)is finidng the earliest period name, such as 5 May 2012 17:03:49. If you just want to see 'May 2012', then change that to
    TO_CHAR ( MIN (a.period_name)
            , 'Mon YYYY'
            )If a.period_name is a VARCHAR2, then change it to a DATE. The best way to do this is permanently. There is no reason to store date information in VARCHAR2 columns. Oracle supplies DATE columns; there's no extra cost for using them. DATE columns were designed for storing date information, use them to do that.
    if you must keep your date information in VARCHAR2 a column, then use TO_DATE in the query. It will be slow, and you'll have run-time errors if any of the information is in the wrong format. That's what happens when you store date information in VARCHAR2 columns.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using.
    See the forum FAQ {message:id=9360002}

  • 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

  • Query not retrieving exact results.

    I have a query which shows different result from what i have it in the cube.
    I have a document number in rows and two key figures one amount and another  which shows no. of days for clearance. In the cube, for the same selection criteria , it gives me three records for the same document no. but in query its is gving me one record with different values in KF.
    sample.
    In cube
    Doc  Amount  No. Days for CLearance
    59    100  31
    59    400  14
    59    500  38
    In query the result shows as
    59   1000   1
    Any Ideas where it is doing wrong.  No of days for clearance is calculated from the difference btw posting date and clearing date. I need No. of Days to further develop this query.Is it something to do with compression, or query cache..
    Any Ideas!!1
    Thanks in Advance..
    Veeru

    Sorry, the Result I've shown may be little confusion .. Here is the clear picture..
    In query..
    DOC -
    Amount -
    No.of Days to CLearing
    59 -
    1000 -
    1
    In Cube
    DOC -
    Amount -
    No.of Days to CLearing
    59 -
    100----
    31
    59 -
    500-------14
    59--400-----18
    the value of Days to Clearing is showing as 1.
    Properties of that key figure are defined as follows..
    KF as NUMBER
    Aggregation :Summation
    Exp.Aggregation : Counter All Values.
    Ref Characteristic : cal day.
    Is this something related to the display properties in BEX. Again, In cube the records are correct..
    Thanks
    Veeru

  • Query not giving any result

    SQL> set long 2000
    SQL> select * from v$version;
    select username from dba_users where username like '%KRO%';
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Productio
    NLSRTL Version 10.2.0.4.0 - Production
    SQL>
    USERNAME
    SUPRKRON
    KRONREAD
    SQL>
    select sum(bytes/1024/1024/1024) from dba_segments where owner='SUPRKRON'SQL> ;
    SUM(BYTES/1024/1024/1024)
    3.62319946
    SQL> select sum(bytes/1024/1024/1024) from dba_segments where owner='KRONREAD';
    SUM(BYTES/1024/1024/1024)
    -------------------------

    user11919409 wrote:
    SQL> set long 2000
    SQL> select * from v$version;
    select username from dba_users where username like '%KRO%';
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Productio
    NLSRTL Version 10.2.0.4.0 - Production
    SQL>
    USERNAME
    SUPRKRON
    KRONREAD
    SQL>
    select sum(bytes/1024/1024/1024) from dba_segments where owner='SUPRKRON'SQL> ;
    SUM(BYTES/1024/1024/1024)
    3.62319946
    SQL> select sum(bytes/1024/1024/1024) from dba_segments where owner='KRONREAD';
    SUM(BYTES/1024/1024/1024)
    -------------------------OK, KRONREAD does not own any objects.
    a READONLY schema?

  • Outer Join not giving correct result

    I have two tables=> tab_child_tmp (product_id,region,child_val,mst_product) and
    tab_master_tmp (master_product_id,region,master_val)
    tab_child_tmp.mst_product is the foreign key referencing tab_master_tmp.master_product_id.
    Currently the tables are populated with below values
    tab_child_tmp
    PRODUCT_ID REGION CHILD_VAL MST_PRODUCT
    Arm-01,     CAL,     100,     Arm-Master
    Arm-01,     DEL,     222,     Arm-Master
    Arm-01,     CHEN,     55,     Arm-Master
    Arm-02,     MUM,     69,     Arm-Master
    Arm-02,     DEL,     90,     Arm-Master
    tab_master_tmp
    MST_PRODUCT     REGION     MASTER_VAL
    Arm-Master     , CAL,     390
    Arm-Master     , DEL,     300
    Arm-Master, CHEN,     450
    Arm-Master, MUM,     600
    Now I want to display the result in the below format
    PRODUCT_ID REGION CHILD_VAL MASTER_VAL
    1. Arm-01     , CAL, 100,     390
    2. Arm-01     , DEL, 222,     300
    3. Arm-01     , CHEN, 55,     450
    4. Arm-01     , MUM, 0,     600
    5. Arm-02     , MUM, 69,     600
    6. Arm-02     , DEL, 90,     300
    7. Arm-02     , CHEN, 0,     450
    8. Arm-02     , CAL, 0,     390
    When I am running the below query it is not returning the above 4,7 and 8 rows. Can you please provide the correct sql to get the above desired output
    SELECT
    a.product_id,
    nvl(a.region,b.region) geo,
    nvl(a.child_val,0)match_val,
    b.master_val
    FROM
    tab_child_tmp a,
    tab_master_tmp b
    WHERE
    a.mst_product(+) = b.master_product AND
    a.region(+) = b.region
    Thanks

    Hi
    Thanks for the reply. Please find below the details.
    Oracle Version*
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for Solaris: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Create Table Script_
    create table TAB_CHILD_TMP
    PRODUCT_ID VARCHAR2(50),
    REGION VARCHAR2(100),
    CHILD_VAL NUMBER,
    MST_PRODUCT VARCHAR2(50)
    create table TAB_MASTER_TMP
    MST_PRODUCT VARCHAR2(50),
    REGION VARCHAR2(100),
    MASTER_VAL NUMBER
    Insert Script_
    INSERT INTO tab_child_tmp VALUES ('Arm-01','CAL',100,'Arm-Master');
    INSERT INTO tab_child_tmp VALUES ('Arm-01','DEL',222,'Arm-Master');
    INSERT INTO tab_child_tmp VALUES ('Arm-01','CHEN',55,'Arm-Master');
    INSERT INTO tab_child_tmp VALUES ('Arm-Master','MUM',69,'PLC1');
    INSERT INTO tab_child_tmp VALUES ('Arm-Master','DEL',90,'PLC1');
    INSERT INTO tab_master_tmp VALUES ('Arm-Master','CAL',390);
    INSERT INTO tab_master_tmp VALUES ('Arm-Master','DEL',300);
    INSERT INTO tab_master_tmp VALUES ('Arm-Master','CHEN',450);
    INSERT INTO tab_master_tmp VALUES ('Arm-Master','MUM',600);
    INSERT INTO tab_master_tmp VALUES ('PLC1','MUM',199);
    INSERT INTO tab_master_tmp VALUES ('PLC1','DEL',299);
    INSERT INTO tab_master_tmp VALUES ('PLC1','CHEN',399);
    Expected output logic*
    Need to display the product value for each region along with the value of master product for the corresponding product and region. If a product doesn't belong to a particular region, but the corresponding master product is, then that value also needs to be displayed for that product and region with child value as zero.
    ie. for product Arm-01 there is no record in tab_child_tmp for region "MUM", but it's master product 'Arm-Master' has a record for region 'MUM' in tab master_tmp table. So in ouput there will be a record for product 'Arm-01' and region-'MUM' with child value as 0 and master value as 600.
    Expected Output*
    PRODUCT_ID ~~~ REG ~~~ CHILD_VAL ~~~ MASTER_VAL
    Arm-01 ~~~ CAL ~~~ 100 ~~~ 390
    Arm-01 ~~~ DEL ~~~ 222 ~~~ 300
    Arm-01 ~~~ CHEN ~~~ 55 ~~~ 450
    Arm-01 ~~~ MUM ~~~ 0 ~~~ 600
    Arm-MASTER ~~~ MUM ~~~ 69 ~~~ 199
    Arm-MASTER ~~~ DEL ~~~ 90 ~~~ 299
    Arm-MASTER ~~~ CHEN ~~~ 0 ~~~ 399
    Please help

  • % Change is not giving correct results.

    Hi,
    I am using Ago Function to calculate Current month cx count , previous month cx count, present month acct count, previous month acct count and in the report parameter selecting Reporting Month as DEC 09. The results are coming perfectly fine... but when I create % Change Previous Month Cx count and % change Previous month Account count, It is not showing the correct results and getting only 0% listed even if the Difference is huge and should be around 10% ...
    The code written to calculate % change is :
    CASE WHEN ("EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count" IS NULL OR "EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count" = 0) AND NOT "EIP BDW Analytics"."EIP Reporting FACT"."Current Month Account Count" IS NULL AND "EIP BDW Analytics"."EIP Reporting FACT"."Current Month Account Count" <> 0 THEN 100.0 WHEN ("EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count" IS NULL OR "EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count" = 0) AND ("EIP BDW Analytics"."EIP Reporting FACT"."Current Month Account Count" IS NULL OR "EIP BDW Analytics"."EIP Reporting FACT"."Current Month Account Count" = 0) THEN 0.0 WHEN "EIP BDW Analytics"."EIP Reporting FACT"."Current Month Account Count" IS NULL AND NOT "EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count" IS NULL AND "EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count" <> 0 THEN -(100.0) ELSE 100.0 * ("EIP BDW Analytics"."EIP Reporting FACT"."Current Month Account Count" - "EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count") / "EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count" END
    Can some one tell me what I need to do in order to get the desired results.
    I am using a time dimension with the following hierarchy ( Year - Month - Period_ID) joined with the Reporting Table Fact which has count of cx and Count of Accts.

    We have two assets one acquired on 01/04/2014 and another on 26/04/2014.  Everything else is same for both assets like asset class , keys etc.
    Now here are two calculations.
    System is giving calculation ok , what should we do so that for both assets we are left with same scrap value (1047)  (and not 1119.68 as in last line )
    Can anyone help how to get value in last field of screen shot given below asset vale date or it is always blank.
    wanted to add something in our case DEP to the DAY is also ticked in dep key.
    regards
    Sanjeev Mehndiratta

  • Simple Select query but not arriving at results!

    Hello All,
    I have a table with primary key (antrag_nr, beladeflag, stempel)
    Desc test88
    Name Null? Type
    ANTRAG_NR NOT NULL NUMBER
    A_PROZESS NUMBER
    STEMPEL NOT NULL DATE
    BELADEFLAG NOT NULL VARCHAR2(1)
    desc test99
    Name Null? Type
    ANTRAG_NR NOT NULL NUMBER
    A_PROZESS NUMBER
    STEMPEL NOT NULL DATE
    BELADEFLAG NOT NULL VARCHAR2(1)
    select * from test99;
    ANTRAG_NR A_PROZESS STEMPEL B
    2 4 05-JAN-05 m
    1 6 07-JAN-05 m
    1 7 08-JAN-05 m
    1 8 09-JAN-05 m
    2 5 06-JAN-05 m
    select * from test88;
    ANTRAG_NR A_PROZESS STEMPEL B
    1 1 01-JAN-05 m
    1 2 02-JAN-05 m
    1 2 03-JAN-05 m
    1 3 04-JAN-05 m
    2 1 01-JAN-05 m
    2 2 02-JAN-05 m
    2 3 04-JAN-05 m
    1 4 05-JAN-05 m
    1 5 06-JAN-05 m
    1 6 07-JAN-05 m
    2 4 05-JAN-05 m
    ANTRAG_NR A_PROZESS STEMPEL B
    1     7 08-JAN-05 m
    My query:
    insert into test88
    (select a.antrag_nr, a.a_prozess, a.stempel, a.beladeflag from test88 a, test99 b
    where
    a.antrag_nr = b.antrag_nr
    and
    a.a_prozess not in (select a_prozess from test99 where antrag_nr = a.antrag_nr)
    and
    a.stempel = ( select max(stempel) from test88));
    what the query does is:
    selects the highest value for the entire stempel column in table test88 and checks the condition a.antrag_nr = b.antrag_nr &a.a_prozess not in (select a_prozess from test99 where antrag_nr = a.antrag_nr)
    but what I would like to have is
    that it should check the max(stempel) for each antrag_nr in test88 & then insert.
    For example when antrag_nr = 1 and then the max (stempel) in table test 88 => 08-jan-2005
    Then it should check with the antrag_nr =2
    and then max(stempel) in the table test88 => 05-JAN-05 and then insert the table test88 from the source table test99 & so on
    according to my query it checks the highest values of stempel column 08-jan-2005 where antrag_nr=1
    but it doesn’t check for antrag_nr = 2 at all.
    How can I arrive at such a result, Can anyone throw some insight..
    Thanks in advance,
    Karthik krishna.
    -- Thanks to splazm for answering my previous post!

    Hello All,
    I have a table with primary key (antrag_nr, beladeflag, stempel)
    Desc test88
    Name Null? Type
    ANTRAG_NR NOT NULL NUMBER
    A_PROZESS NUMBER
    STEMPEL NOT NULL DATE
    BELADEFLAG NOT NULL VARCHAR2(1)
    desc test99
    Name Null? Type
    ANTRAG_NR NOT NULL NUMBER
    A_PROZESS NUMBER
    STEMPEL NOT NULL DATE
    BELADEFLAG NOT NULL VARCHAR2(1)
    select * from test99;
    ANTRAG_NR A_PROZESS STEMPEL B
    2 4 05-JAN-05 m
    1 6 07-JAN-05 m
    1 7 08-JAN-05 m
    1 8 09-JAN-05 m
    2 5 06-JAN-05 m
    select * from test88;
    ANTRAG_NR A_PROZESS STEMPEL B
    1 1 01-JAN-05 m
    1 2 02-JAN-05 m
    1 2 03-JAN-05 m
    1 3 04-JAN-05 m
    2 1 01-JAN-05 m
    2 2 02-JAN-05 m
    2 3 04-JAN-05 m
    1 4 05-JAN-05 m
    1 5 06-JAN-05 m
    1 6 07-JAN-05 m
    2 4 05-JAN-05 m
    ANTRAG_NR A_PROZESS STEMPEL B
    1     7 08-JAN-05 m
    My query:
    insert into test88
    (select a.antrag_nr, a.a_prozess, a.stempel, a.beladeflag from test88 a, test99 b
    where
    a.antrag_nr = b.antrag_nr
    and
    a.a_prozess not in (select a_prozess from test99 where antrag_nr = a.antrag_nr)
    and
    a.stempel = ( select max(stempel) from test88));
    what the query does is:
    selects the highest value for the entire stempel column in table test88 and checks the condition a.antrag_nr = b.antrag_nr &a.a_prozess not in (select a_prozess from test99 where antrag_nr = a.antrag_nr)
    but what I would like to have is
    that it should check the max(stempel) for each antrag_nr in test88 & then insert.
    For example when antrag_nr = 1 and then the max (stempel) in table test 88 => 08-jan-2005
    Then it should check with the antrag_nr =2
    and then max(stempel) in the table test88 => 05-JAN-05 and then insert the table test88 from the source table test99 & so on
    according to my query it checks the highest values of stempel column 08-jan-2005 where antrag_nr=1
    but it doesn’t check for antrag_nr = 2 at all.
    How can I arrive at such a result, Can anyone throw some insight..
    Thanks in advance,
    Karthik krishna.
    -- Thanks to splazm for answering my previous post!

  • Am.getOADBTransaction().getOrgId() not giving desired result

    Hello,
    I am trying to query Operating Unit in controller of one OAF page.
    Code I tried was
    am.getOADBTransaction().getOrgId(), but it returns -1.
    The responsibility user selects is assigned a Global Security Profile, which has been added only one Operating Unit. So
    I was expecting to get id of that operating unit, but does not work.
    What API should be used in EBS 12 with Multi-Org, to query one or more operating units attached with the responsibility.
    Also when I run
    select * from Per_Security_Profiles on that instance, for the Global security profile in question I see in the table
    organization_id as NULL, though in the forms UI, I can see one operating unit added to this Global Security Profile.
    regards, Yora

    hey,
    If u want the header to get printed once in the main window make a table in that u will have header,main area and footer.
    IF u dont want the header to repeat put the haeder in the header section else if u want the header to repeat then put it in the main area.
    U can check the additional events such as only on first page like that to suffice your requirements.

  • Query is not returni9ng any results

    Hi guys!
    We have upgraded from 4.6C to ECC 6.0 and now when we are executing queries,  no results are being displayed. If you have any ideas please let me know.
    Regards,
    Ileana

    Hi,
    You have a rule in autogenerated program via SAP Query:
    the following is the naming convention in generated program:
    1-4 : Query area/server
    Next 12 : User Group
    Rest others : Query name
    This is the way the name will be stored...Now you will be the query name and user group that r required in the FM input and try to regenrated it...
    For eg: Assigned report: AQZZ/SAPQUERY/ABAGENCY1======
    Here SAPQUERY is user group
    and ABAGENCY1 is the query
    Reward if useful
    Regards
    Shiva

  • Access and JDBC not giving correct results

    I am running a Query on an access DB
    SELECT COUNT(*) FROM TABLE1 WHERE [First Name] LIKE '*Jamie*'
    is the SQL query that should be executed. I get 0 errors or warnings but I get a result back as 0
    res.next(); int max = res.getInt(1);
    The max is always returned as 0.
    When I do the SAME SQL query but
    SELECT COUNT(*) FROM TABLE1 WHERE [First Name] = 'Jamie'
    and with the above code, I get results
    I am confused... please help!

    why should you? sql doesn't read minds. it's an error only in your understanding. you passed a perfectly reasonable string the first time.
    %

  • N86 camera not giving good results

    I have recently purchased N86 with 8 MP camera, I have heard that it takes stunning pictures but the results are not upto the mark. Colors are faded, pics taken at night are often blur, my friend has a blackberry phone with 3 mp camera when compared blackberry pictures were better than my phone.
    May be I haven't set the camera properly please guide me how to set it properly currently I have following settings:
    Image Quality: 8MP
    Extended Digital Zoom: off
    Face Detection: off
    Screen mode: Automatic
    Flash: Automatic
    Sequence Mode: Single Shot

    Best to consult and expert !
    http://3lib.ukonline.co.uk/sshow/ss111.html
    http://www.allaboutsymbian.com/features/item/How_to_Take_better_photos_on_your_Nokia_Nseries_smartph...
    If I have helped at all, a click on the White Star is always appreciated :
    you can also help others by marking 'accept as solution' 

Maybe you are looking for

  • Can't See New Type on My Page

    I'm having trouble with DW5.5 on Mac OS 10.6.8. I'm trying to update my resume and when I type in my new info, "Is This How I Look?" I can't see it on my design page, but it shows up on the code page. Here is the code from the top of the page and fol

  • Embedding youtube video in flash with as2 - problem with black bars

    I have successfully embedded the youtube video in my flash code with: //create area to put youtube video on screen this.createEmptyMovieClip("reason1_video", 10000); reason1_video._xscale = 60; reason1_video._yscale = 60; this.reason1_video.loadMovie

  • Fonts not showing in Illustrator CS4

    I am running CS4 on my Mac and after re-loading the software on to my new harddrive none of my computers fonts are showing up.  It seems like just the few that the program comes with are available for use.  They all show just fine in my other program

  • Possible to parse HTML in TextArea?

    Hi All, I'd like to know whether it is possible to display HTML code in textarea when we use webui page. We have a table column with HTML code in it(something like <font style="...">, <span style="background:xxxx">, <a href=""> and so on), and we wan

  • "Ask a question" is missing in the Microsoft community

    How can I ask a question in the Microsoft community? There's no "Ask a question" feature in this forum and I really need a help. Here it is: http://answers.microsoft.com/en-us/windows/forum/windows8_1?tab=Threads. Thank you. Vasja Stojkovic