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}

Similar Messages

  • 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

  • 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.

  • If statement is not giving desired result..

    i want to connct a java program to sql database only if a condition is met..
    n im using if statemnt for this..
    if(condition)
    try
    Class.forName(driver);
    but this program is connecting without meeting the condition...
    what could be wrong?

    Rooty,
    Check whether you have made any typo mistake like semicolon after IF condition. This may cause problem.
    I mean,
    if(condition)*;*
    }This should be,
    if(condition)
    }Other possibility is "=" instead of "==".
    should be
    if(a==b)Thanks
    Umesh Bongale

  • Price = Sales / Volume ... FOREACH not giving desired results

    This should be easy but I am tearing my hair out... I want to use an IP formula to calculate Sales Price by Gross Sales / Sales Volume.
    We use an account model where CMROW = '000030' means Sales Volume (stored in key figure A0QTYVAR0), CMROW = '000050' means Gross Sales (stored in key figure 0AMOUNT). The formula is:
    FOREACH PLANVER.
      IF PLANVER = '#'.
         FOREACH CALYEAR.
             IF CALYEAR = '2008'.
                FOREACH SHIPTO.
                   SALES_VOL = 0.
                   GROSS_SALES = 0.
                   FOREACH CMROW.
                      FOREACH INFOPROV.
                            SALES_VOL = SALES_VOL + { A0QTYVAR0, '2008', INFOPROV, SHIPTO, '000030', '#' }.
                            GROSS_SALES = GROSS_SALES + { 0AMOUNT, '2008', INFOPROV, SHIPTO, '000050', '#'}.
                      ENDFOR.
                   ENDFOR.
                  MESSAGE I000(38) WITH 'SHIPTO = ' SHIPTO.
                  MESSAGE I000(38) WITH 'GROSS_SALES = ' GROSS_SALES 'SALES_VOL = ' SALES_VOL.
                  { 0AMOUNT, V_TARGETYEAR, 'A2APSBUP1', SHIPTO, '002000', V_PLANVER } = GROSS_SALES / SALES_VOL.
                ENDFOR.  
             ENDIF.
          ENDFOR.
       ENDIF.
    ENDFOR.
    When I run it I get output like:
    SHIPTO = 0005000053
    GROSS_SALES = 2,9 SALES_VOL = 0,0
    GROSS_SALES = 0,0 SALES_VOL = 1,8
    SHIPTO = 0005000149
    GROSS_SALES = 2,9 SALES_VOL = 0,0
    GROSS_SALES = 0,0 SALES_VOL = 2,1
    etc. and the price written to the planning cube is always zero, since variables GROSS_SALES and SALES_VOL are never non-zero at the same time.
    What am I doing wrong?!

    Hi,
    Please try this, and let me know your outputs...
    Supose the following: FTBCH {KF, 0CALYEAR, 0CMROW, 0INFOPROV, PLANVER}
    V_TARGETYEAR as input from user
    V_PLANVER as inpur from user.
    SALES_VOL = 0.
    GROSS_SALES = 0.
    FOREACH CALYEAR, CMROW, INFOPROV.
      IF CALYEAR = '2008'.
         SALES_VOL = SALES_VOL + { A0QTYVAR0, CALYEAR, '000030', 'ZIC_SOURCE', #}.
         GROSS_SALES = GROSS_SALES + { 0AMOUNT, CALYEAR, '000050', 'ZIC_SOURCE', #}.
       ENDIF.
    ENDFOR.
    MESSAGE I000(38) WITH 'GROSS_SALES = ' GROSS_SALES 'SALES_VOL = ' SALES_VOL.
    { 0AMOUNT, V_TARGETYEAR, 'A2APSBUP1', '002000', V_PLANVER } = GROSS_SALES / SALES_VOL.

  • The dashboard propmt not showing desired results

    Hi,
    I have propmt created using this condition.But it is not showing me the desired results.The code seems to be correct.any help plz...
    case when TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 0 and 30 or TimeStampDiff(SQL_TSI_DAY,"TB1".CL2,CURRENT_DATE) between 0 and 30 then '30 days'
    when TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 31 and 60 or TimeStampDiff(SQL_TSI_DAY,"TB1".CL2,CURRENT_DATE) between 31 and 60 then ' last 60 days'
    when TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 61 and 90 or TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 61 and 90 then 'last 90 days'
    else '> 90 and max 100 Days' end

    Hi,
    Create a dummy column for the below code
    case when TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 0 and 30 or TimeStampDiff(SQL_TSI_DAY,"TB1".CL2,CURRENT_DATE) between 0 and 30 then '30 days'
    when TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 31 and 60 or TimeStampDiff(SQL_TSI_DAY,"TB1".CL2,CURRENT_DATE) between 31 and 60 then ' last 60 days'
    when TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 61 and 90 or TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 61 and 90 then 'last 90 days'
    else '> 90 and max 100 Days' endfilter it as is prompted for that column after giving filter as is prompted you can hide that column or remove it.
    Save the report
    Assign points and close thread, if your question is answered....
    Cheers,
    Aravind

  • % 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

  • Query not showing desired result

    Hi All,
    DB :-10.2.0.3
    I am using following query to extarct the backuppice, which falls between the dates specified by query. I am really amazed, why it's not giving me the expected results.
    select handle, to_char(start_time, 'dd-mon-yy hh24:mi:ss') "start_time" , to_char(completion_time, ' dd-mon-yy hh24:mi:ss') "end_time" from
    v$backup_piece where
    to_char(start_time,'dd-mon-yy hh24:mi:ss') >'27-oct-10 23:00:00'
    and
    to_char(completion_time,'dd-mon-yy hh24:mi:ss')<'28-oct-10 04:20:53'
    Results truncated, just to fit in this window.
    23:02:25
    /data/oracle/LNEVRPP1/backup/database/c-465769364-20100927-0c                         27-sep-10 23:02:39           27-sep-10
    23:02:40
    /data/oracle/LNEVRPP1/backup/database/LNEVRPP1_ctl_l1_t730854174_s32554_p1.rmn        27-sep-10 23:02:58           27-sep-10
    23:02:59
    /data/oracle/LNEVRPP1/backup/database/c-465769364-20100927-0d                         27-sep-10 23:03:02           27-sep-10
    23:03:02
    /data/oracle/LNEVRPP1/backup/database/LNEVRPP1_arc_l1_t730854220_s32556_p1.rmn        27-sep-10 23:03:41           27-sep-10
    23:03:44
    /data/oracle/LNEVRPP1/backup/database/c-465769364-20100927-0e                         27-sep-10 23:03:51           27-sep-10
    23:03:51
    /data/oracle/LNEVRPP1/backup/database/LNEVRPP1_dbf_l0_t733532449_s33531_p1.rmn        27-oct-10 23:00:50           27-oct-10
    23:36:00
    /data/oracle/LNEVRPP1/backup/database/LNEVRPP1_dbf_l0_t733534566_s33532_p1.rmn        27-oct-10 23:36:07           27-oct-10
    23:48:38
    HANDLE                                                                                start_time                  end_time
    /data/oracle/LNEVRPP1/backup/arc2adsm/LNEVRPP1_arc_l0_t733536053_s33534_p1.rmn        28-oct-10 00:00:54           28-oct-10
    00:01:13
    /data/oracle/LNEVRPP1/backup/database/c-465769364-20101028-00                         28-oct-10 00:01:22           28-oct-10
    00:01:23
    /data/oracle/LNEVRPP1/backup/database/LNEVRPP1_dbf_l0_t733535322_s33533_p1.rmn        27-oct-10 23:48:43           28-oct-10
    00:20:06
    /data/oracle/LNEVRPP1/backup/database/LNEVRPP1_dbf_l0_t733537209_s33536_p1.rmn        28-oct-10 00:20:10           28-oct-10
    00:33:44
    /data/oracle/LNEVRPP1/backup/database/c-465769364-20101028-01                         28-oct-10 00:33:47           28-oct-10
    00:33:48
    /data/oracle/LNEVRPP1/backup/database/LNEVRPP1_ctl_l0_t733538041_s33538_p1.rmn        28-oct-10 00:34:04           28-oct-10
    00:34:04
    /data/oracle/LNEVRPP1/backup/database/c-465769364-20101028-02                         28-oct-10 00:34:06           28-oct-10
    00:34:07

    Hi
    Try:
    select handle, to_char(start_time, 'dd-mon-yy hh24:mi:ss') "start_time" , to_char(completion_time, ' dd-mon-yy hh24:mi:ss') "end_time"
    from v$backup_piece
    where start_time > to_date ('27-oct-10 23:00:00','dd-mon-yy hh24:mi:ss')
    and completion_time < to_date ('28-oct-10 23:00:00','dd-mon-yy hh24:mi:ss')
    Regards,
    Tycho

  • 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.

  • 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

  • Format-number,decimal not giving desired output for PO Print report XSL-FO

    Hi All,
    My requirement was to get the Unit price in european format which is 10.000,00
    Iam getting it as 10000,00 but the client needs the thousand's seperator.
    if have used the decimal seperator but iam getting the Unit Price value as 'NAN' when i submit it for an international language like Italian or Spanish
    This is what i have done
    set the decimal format
    <xsl:decimal-format name="euro" decimal-separator="," grouping-separator="."/>
    <xsl:value-of select="format-number(UNIT_PRICE, '#.###,####', 'euro')"/>
    This gives the desired output when i select the US language.
    While submitting through the conc request
    If i change the Numeric char to '.,' by clickin on Language settings..It works great
    I have tried to use the replace function but the syntax is not correct
    format-number(replace('UNIT_PRICE',',','.'), '#.###.###.###,####', 'euro')
    Any Help would be greatly appreciated.
    Thanks
    Mirza

    Hi Mirza,
    I'm struggling having the same problem. Have you found any solution?
    Best regards
    Kenneth

  • Help!!!it's not the desired result of oci bulk update!!

    here is demo_update of oci/samples cdemodr1.c,i modified a little,and the other of cdemodr1.c keeps unchanged:
    1.
    give the result:
    after demo_insert
    in4[i] = 400.555 + (float)i;//c4 value
    get the result:
    C1 C4
    1 400.554993
    2 401.554993
    3 402.554993
    4 403.554993
    5 404.554993
    6 405.554993
    7 406.554993
    8 407.554993
    9 408.554993
    10 409.554993
    i expect to update c4 value to:
    in4[i] = 1401.555 + (float)i;
    and get the result:
    C1 C4
    1 1400.554993
    2 1401.554993
    3 1402.554993
    4 1403.554993
    5 1404.554993
    6 1405.554993
    7 1406.554993
    8 1407.554993
    9 1408.554993
    10 1409.554993
    but after my modified demo_update,
    the result is not the expectation,
    the resule is:
    C1 C4
    1 1403.55505
    2 1403.55505
    3 1403.55505
    4 1403.55505
    5 1403.55505
    6 1403.55505
    7 1403.55505
    8 1403.55505
    9 1403.55505
    10 1403.55505
    2.
    table create script:
    create table TAB1
    c1 integer not null
    c2 char(40),
    c3 varchar2(40),
    c4 float,
    c5 decimal,
    c6 decimal(8,3),
    c7 numeric,
    c8 numeric(7,2),
    c9 date,
    c10 raw(40),
    constraint ind_tab1
    organization index;

    3.
    here is my modified demo_update():
    please help me to check out where it goes wrong!!
    thank you!!!
    static sword demo_update(OCISvcCtx svchp, OCIStmt stmthp,
    OCIBind bndhp[], OCIError errhp)
    int i, j;
    int range_size = 3; /* iterations */
    sb4     len;
    * This function updates columns in table TAB1, for certain rows
    * depending on the values of the :low and :high values in
    * in the WHERE clause. It executes this statement 3 times, (3 iterations)
    * each time with a different set of values for :low and :high
    * Thus for each iteration, multiple rows are returned depending
    * on the number of rows that matched the WHERE clause.
    * The rows it updates here are the rows that were inserted by the
    * cdemodr1.sql script.
    /* The Update Statement with RETURNING clause */
    text sqlstmt = (text )
    "UPDATE TAB1 SET C2 = :1, C3 = :1, \
    C4 = :1, C5 = :1, C6 = :1, \
    C7 = :1, C8 = :1, C9 = :1, C10 = :1 \
    /* Prepare the statement */
    if (OCIStmtPrepare(stmthp, errhp, sqlstmt, (ub4)strlen((char *)sqlstmt),
    (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT))
    (void) printf("FAILED: OCIStmtPrepare() update\n");
    report_error(errhp);
    return OCI_ERROR;
    /* Initialise the buffers for insertion */
    for (i = 0; i < MAXITER; i++)
    //in1[i] = 300 + i;
    memset((void *)in2, (int) 'a'+i%26, (size_t) 40);
    memset((void *)in3[i], (int) 'A'+i%26, (size_t) 40);
    in4[i] = 1401.555 + (float)i;
    in5[i] = 500 + i;
    in6[i] = 600.280 + (float)i;
    in7[i] = 700 + i;
    in8[i] = 800.620 + (float)i;
    in9[i][0] = 119;
    in9[i][1] = 185 - (ub1)i%10;
    in9[i][2] = (ub1)i%12 + 1;
    in9[i][3] = (ub1)i%25 + 1;
    in9[i][4] = 0;
    in9[i][5] = 0;
    in9[i][6] = 0;
    for (j = 0; j < 40; j++)
    in10[i][j] = (ub1) (i%0x08);
    rowsret[i] =0;
    len = /*sizeof(in1[0]) + */sizeof(in2[0]) + sizeof(in3[0]) + sizeof(in4[0]) + sizeof(in5[0])
         + sizeof(in6[0]) + sizeof(in7[0]) + sizeof(in8[0]) + sizeof(in9[0]) + sizeof(in10[0]);
    /* Bind all the input buffers to place holders (:1, :2. :3, etc ) */
    //if (bind_input(stmthp, bndhp, errhp))
    // return OCI_ERROR;
    if (/*OCIBindByPos(stmthp, &bndhp[0], errhp, (ub4) 10,
    (dvoid *) &in1[0], (sb4) sizeof(in1[0]), SQLT_INT,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    ||*/ OCIBindByPos(stmthp, &bndhp[1], errhp, (ub4) 1,
    (dvoid *) in2[0], (sb4) sizeof(in2[0]), SQLT_AFC,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[2], errhp, (ub4) 2,
    (dvoid *) in3[0], (sb4) sizeof(in3[0]), SQLT_CHR,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[3], errhp, (ub4) 3,
    (dvoid *) &in4[0], (sb4) sizeof(in4[0]), SQLT_FLT,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[4], errhp, (ub4) 4,
    (dvoid *) &in5[0], (sb4) sizeof(in5[0]), SQLT_INT,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[5], errhp, (ub4) 5,
    (dvoid *) &in6[0], (sb4) sizeof(in6[0]), SQLT_FLT,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[6], errhp, (ub4) 6,
    (dvoid *) &in7[0], (sb4) sizeof(in7[0]), SQLT_INT,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[7], errhp, (ub4) 7,
    (dvoid *) &in8[0], (sb4) sizeof(in8[0]), SQLT_FLT,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[8], errhp, (ub4) 8,
    (dvoid *) in9[0], (sb4) sizeof(in9[0]), SQLT_DAT,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[9], errhp, (ub4) 9,
    (dvoid *) in10[0], (sb4) sizeof(in10[0]), SQLT_BIN,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT))
    (void) printf("FAILED: OCIBindByPos()\n");
    report_error(errhp);
    return OCI_ERROR;
    if (/*OCIBindArrayOfStruct(bndhp[0], errhp, s1, indsk[0], rlsk[0], rcsk[0])
    ||*/ OCIBindArrayOfStruct(bndhp[1], errhp, s2, indsk[1], rlsk[1], rcsk[1])
    || OCIBindArrayOfStruct(bndhp[2], errhp, s3, indsk[2], rlsk[2], rcsk[2])
    || OCIBindArrayOfStruct(bndhp[3], errhp, s4, indsk[3], rlsk[3], rcsk[3])
    || OCIBindArrayOfStruct(bndhp[4], errhp, s5, indsk[4], rlsk[4], rcsk[4])
    || OCIBindArrayOfStruct(bndhp[5], errhp, s6, indsk[5], rlsk[5], rcsk[5])
    || OCIBindArrayOfStruct(bndhp[6], errhp, s7, indsk[6], rlsk[6], rcsk[6])
    || OCIBindArrayOfStruct(bndhp[7], errhp, s8, indsk[7], rlsk[7], rcsk[7])
    || OCIBindArrayOfStruct(bndhp[8], errhp, s9, indsk[8], rlsk[8], rcsk[8])
    || OCIBindArrayOfStruct(bndhp[9], errhp, s10, indsk[9], rlsk[9], rcsk[9]))
    (void) printf("FAILED: OCIBindArrayOfStruct()\n");
    report_error(errhp);
    return OCI_ERROR;
    (void) printf("\n\n DEMONSTRATING UPDATE....RETURNING \n");
    if (OCIStmtExecute(svchp, stmthp, errhp, (ub4) range_size, (ub4) 0,
    (CONST OCISnapshot*) 0, (OCISnapshot*) 0,
    (ub4) OCI_DEFAULT))
    (void) printf("FAILED: OCIStmtExecute() update\n");
    report_error(errhp);
    return OCI_ERROR;
    /* Commit the changes */
    (void) OCITransCommit(svchp, errhp, (ub4) 0);
    /* Print out the values in the return rows */
    //(void) print_return_data(range_size);
    return OCI_SUCCESS;

  • Sdo_nn is not showing desired results

    Hello,
    We have the following query :
    SELECT p.codigo_proveedor_ca, p.descripcion AS Proveedor, DECODE(p.habitual,0,'N','S') AS HAB, DECODE(p.h_24,0,'N','S') H24,
         b.codigo_base, b.tipo_via || ' ' || b.nom_via || ',' || b.numero_via || ' ' || B.PISO AS DIRECCION_PROV, b.codigo_pais,
    b.codigo_provincia, b.codigo_ine, b.codigo_zona, mg.numero AS NUMERO_GEN, b.localidad, ROUND(MDSYS.SDO_NN_DISTANCE(1),0) AS DISTANCIA,
    b.GIS_X, b.GIS_Y, b.GIS_NIVEL_XY, b.GIS_GEO_OK, b.GIS_TIPO_SRIDENUM
    FROM SAT_BASES_PROVEEDORES b,
         SAT_BASE_PROVEEDOR_MEDIOS_GEN mg,
         SAT_PROVEEDORES_CA p
    WHERE b.codigo_pais = 'ESP' AND b.activo = 1
    AND mg.codigo_proveedor_ca = b.codigo_proveedor_ca AND mg.codigo_base = b.codigo_base
         -- Medio Genérico 'TAXI'
         AND mg.codigo_medio_generico = '2' AND mg.activo = 1 AND P.ACTIVO = 1
         AND p.codigo_proveedor_ca = b.codigo_proveedor_ca
         -- Coordinates of GRANOLLERS
         AND SDO_NN(b.GEOMETRIA,MDSYS.SDO_Geometry(2001, 1000000,MDSYS.SDO_Point_type(188161,5043776,NULL),NULL, NULL) ,
         'SDO_BATCH_SIZE = 25', 1 ) = 'TRUE'
    ORDER BY DISTANCIA;
    What we want is to get the providers which are near to a given town. To get this we are using SDO_NN function and also
    SDO_NN_DISTANCE to calculate the distance to the given coordinates.
    Our problem is that there are two providers with the same coordinates that should be shown in the query result but one of them is not shown and we don't understand why.
    If we use SDO_NUM_RES instead of SDO_BATCH_SIZE the provider is shown, but as far as I know, if you use this parameter not all the WHERE clauses are evaluated. Am I wrong?
    What are we doing wrong?
    Thanks in advance,
    Eva.

    Are you on Oracle 9i? In 9i, I have never been able to get this query to work successfully this way. I had to rewrite it to use a in-line view and a rownum and make some other changes. I think it is buggy, as are many of the 9i spatial objects (full of horrid memory leaks etc.)
    I have been able to hack around the fact that it cannot find the nearest neighbor on it's own, by using an inline view in this way, but it has holes, I am sure:
    Select DISTANCE, (list all your other selections) from
    SELECT /*+ordered*/ SDO_NN_DISTANCE(1) DISTANCE, p.codigo_proveedor_ca, p.descripcion AS Proveedor, DECODE(p.habitual,0,'N','S') AS HAB, DECODE(p.h_24,0,'N','S') H24,
    b.codigo_base, b.tipo_via || ' ' || b.nom_via || ',' || b.numero_via || ' ' || B.PISO AS DIRECCION_PROV, b.codigo_pais,
    b.codigo_provincia, b.codigo_ine, b.codigo_zona, mg.numero AS NUMERO_GEN, b.localidad, ROUND(MDSYS.SDO_NN_DISTANCE(1),0) AS DISTANCIA,
    b.GIS_X, b.GIS_Y, b.GIS_NIVEL_XY, b.GIS_GEO_OK, b.GIS_TIPO_SRIDENUM
    FROM SAT_BASES_PROVEEDORES b,
    SAT_BASE_PROVEEDOR_MEDIOS_GEN mg,
    SAT_PROVEEDORES_CA p
    WHERE b.codigo_pais = 'ESP' AND b.activo = 1
    AND mg.codigo_proveedor_ca = b.codigo_proveedor_ca AND mg.codigo_base = b.codigo_base
    -- Medio Genérico 'TAXI'
    AND mg.codigo_medio_generico = '2' AND mg.activo = 1 AND P.ACTIVO = 1
    AND p.codigo_proveedor_ca = b.codigo_proveedor_ca
    -- Coordinates of GRANOLLERS
    AND SDO_NN(b.GEOMETRIA,MDSYS.SDO_Geometry(2001, 1000000,MDSYS.SDO_Point_type(188161,5043776,NULL),NULL, NULL) ,
    'SDO_BATCH_SIZE = 25', 1 ) = 'TRUE'
    AND ROWNUM < 1000
    ORDER BY DISTANCE
    WHERE ROWNUM < 2';
    This should give you the closest result. If you want the closest 2, you would set that in the last line. I had to mess around with the rownum < 1000 line in my query. It appears that the order by distance has no affect. If I set it to ROWNUM < 50, often times, the closest 2 items weren't in the inner select elements. So they weren't available in the outer results.
    I also found this issue very frustrating. I actually had a hard time believeing it was so junky, until I proved it was the problem with this statement. Please let us know if it solves your issue also.

  • 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

  • 2.0 & iTunes 7.1 Screwed Original iPhone Big Time!

    It seems a lot of people are having issues with 2.0 and 7.1 iTunes but wondering if anyone is seeing these issues. I've add my original iPhone since Day 1 release (yes, 4 hours in line) and have been preaching the praises of Apple and this phone for

  • MS-SQL 7.0 Script Export to Oracle

    Hey, i have a Microsoft SQL 7.0 or SQL 2000 Script. Is there is a way to export the script (about 400 Lines), to Oracle 7.43 or Oracle 8i ? Thanks Roland Here is a short strip SQL 7.0: /****** Object: Database adalbb Script Date: 1/27/2001 3:39:47 PM

  • Date format in mail - "yesterday, the day before,..."

    Hello. When using mail in the new version, the left gutter gathering all the inboxes, each message summary displays the essentials infos. In many cases the date display is set to show the reception hour on the same day (fine), the previous day is sho

  • Workstation loosing policies

    Hello NG I have a serious problem with ZCM11 policies I defined grouppolicies on ZCM 11 and additional Policies for Office. I explain you how i did configure these policies. On a windows 7 gpo administration workstation i copied the office2010 admx f

  • Import P2 over FireWire like Final Cut Log and Transfer?

    Hello, The ONE issue keeping me from using Premiere (which came with my Master Collection CS5) is that I can't seem to import files from my Panasonic HVX200 in a simple way.   In trusty old Final Cut I can easily do it using Log and Transfer.  Rename