Bulk collect seems to retain previous row value when current returns null

Dear all,
I am currently writing package in plsql.
The main logic of the program is as follow .. Program works fine .. but ... when no data is found for current  V_1, V_2,V_3 , insertion is done with previous cursor row value of V_1,V_2,V_3, ... which is not good.
I tried to change the last nested cursor with first..last instead of 1..count, but result is the same.
Any idea?
open c_trt;
   loop  
   fetch c_trt bulk collect into bk_trig limit v_limit;
     open c_bkeve;
          fetch c_bkeve bulk collect into bk_eve limit v_limit;
               if bk_eve.count > 0 then
                     for k in 1..bk_eve.count loop;
                         case
                              when a =1 then    
                                   open c_bkieve(bk_eve(k).age,bk_eve(k).ope, bk_eve(k).eve);
                                        fetch c_bkieve bulk collect into bk_ieve limit v_limit;
                                             if bk_ieve.count > 0 then
                                                   for j in 1..bk_ieve.count loop
                                                       fetch c_bkieve bulk collect into bk_ieve limit v_limit;
                                                            if bk_ieve.count > 0 then
                                                              for j in 1..bk_ieve.count loop
                                                                 case bk_ieve(j).a
                                                                     when 'ABC' then
                                                                        V_1 := nvl(trim(bk_ieve(j).b),null);
                                                                     when 'XYZ' then
                                                                        V_2 := nvl(trim(substr(bk_ieve(j).b,1,4)),null);
                                                                        V_3 := nvl(trim(substr(bk_ieve(j).b,6,22)),null);
                                                                      else
                                                                           null;
                                                                     end case;
                                                                 end loop;
                                                            else
                                                                 V_1 := null;
                                                                 V_2 := null;
                                                                 V_3 := null;
                                                            end if;
                                        close c_bkieve;
                    insert into xxx values(V_1,V_2,V_3);
etc, etc
Thanks for your help
Jerome

Something like this
   select a.dco
        , a.agsa
        , a.agem
        , a.agde
        , a.ope
        , a.eve
        , a.tpr
        , a.nat
        , a.age
        , a.dev
        , a.ncp
        , a.suf
        , a.sen
        , a.dva
        , a.mon
        , a.lib
        , c.cli
     from bmvtg_mi a
     join bcom c
       on a.age = c.age
      and a.dev = c.dev
      and a.ncp = c.ncp
      and a.suf = c.suf 
     join (
               select x.*
                    , y.cur_char
                 from bkeve_mi x
                 left join wb_currency y
                   on x.csp4 = y.cur_num
          ) b
       on b.age = decode(v_var1, 'age', a.age, 'agem', a.agem, 'agsa', a.agsa, 'agde', a.agde, a.age)
    where exists
              select *
                from wb_client sc
               where c.cli = sc.customer_number
                 and ready = 1
      and exists
              select *
                from wb_pdt sp
               where c.cpro = sp.c_pro

Similar Messages

  • Compare previous row values for the same id and decide

    Hello ,
    I have this sample data
    create table #student_academic
    pk_id int identity(1,1) primary key ,
    student_id int ,
    [year] int,
    [aggr_marks] float
    insert into #student_academic
    student_id ,
    [year] ,
    [aggr_marks]
    values
    (112,2012,55.4),(113,2012,65.4),(114,2012,82.32),
    (112,2013,75.4),(113,2013,91.22),(114,2013,45.45),
    (112,2014,61.2),(113,2014,95.2),(114,2014,75.6)
    select * from #student_academic
    from the above data i have to generate an extra status column. this status column should be decided by comparing the previous row value. the exact output should be like below.
    student_id year aggr_marks Staus----------------------------------------------------------
    112 2012 55.4 None
    112 2013 75.4 Promoted
    112 2014 61.2 Demoted
    113 2012 95.2 None
    113 2013 75.6 Demoted
    113 2014 91.22 Promoted
    113 2012 45.45 None
    113 2013 65.4 Promoted
    113 2014 82.32 Promoted
    is there any way to write the t-sql with out using cursors ? this table has around 25GB of data. Any idea would be appreciated.
    Thanks in advance.

    Hello,
    The difficulty of your example is
    that there are several rows for
    the same year and the same student.
    I present a solution
    if there is
    one line per year per
    student:
    TRUNCATE TABLE #student_academicinsert into #student_academic
    student_id ,
    [year] ,
    [aggr_marks]
    values
    (112,2012,55.4),(113,2012,65.4),(114,2012,82.32),
    (112,2013,75.4),(113,2013,91.22),(114,2013,45.45),
    (112,2014,61.2),(113,2014,95.2),(114,2014,75.6)
    Go
    WITH CTE AS
    (SELECT pk_id, student_id, year, aggr_marks,
    (SELECT TOP 1 aggr_marks FROM #student_academic AS b
    WHERE a.student_id = b.student_id AND a.year -1 = b.year
    ORDER BY student_id) AS prev_aggr_marks
    FROM #student_academic AS a
    SELECT
    pk_id, student_id, year, aggr_marks,
    CASE
    WHEN prev_aggr_marks IS NULL THEN 'None'
    WHEN aggr_marks < prev_aggr_marks THEN 'Demoted'
    WHEN aggr_marks >= prev_aggr_marks THEN 'Promoted'
    END AS Status
    FROM CTE
    ORDER BY student_id, year
    Regards,
    Charlie
    Charlie Dancoisne - Independent Consultant & Trainer (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable. This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • How to propogate previous row value

    All,
    I have a query were I need to fill the null data with previous row value. Like I have a table were we record all the On hand quantity for a item for a date. Lets say I have only 2 rows in this table for a month then I am planning to write a view that will give me 31/30 rows for a month and if for a specific date is the value is null then it should read from previous row unitl it finds the data otherwise display 0.
    Ex. Actual table
    Item No Date Qty
    1 1/1/2010 10
    1 1/5/2010 15
    View I have written, I need to fill the null Qty with previous row data
    Item No Date Qty
    1 1/1/2010 10
    1 1/2/2010
    1 1/3/2010
    1 1/4/2010
    1 1/5/2010 15
    1 1/6/2010
    I want something like this how can i do this?
    Item No Date Qty
    1 1/1/2010 10
    1 1/2/2010 10
    1 1/3/2010 10
    1 1/4/2010 10
    1 1/5/2010 15
    1 1/6/2010 15
    Thanks

    Hi Sung, sorry by my delay
    Basically I'm building a Client Framework that a lot of actions are automatically managed, then I extend Objects
    for example EntityImpl. I let to user set any value to the
    database mapped fields but I will check this values
    using my own bussines rules before to insert into database
    and if this values are wrong I display an alert.
    My problem is that I catch insert event to call validate
    functions. But when any value is wrong I will show an alert, but if user commits transaction after validate
    funcion is not revalidated. Well I supose that is a bad implementation for validation rules, now amb reading about
    Validationlistener because I think is the best way to do
    all that I need. I let to the user add field values but
    these values not will commited while validationListeners
    return isValid = true;
    Thanks Sung.
    Albert.

  • Compounding using previous row values

    Greetings!
    Im trying to write SQL in Oracle 10.2.0.4. I have no success using OVER , PARTITION analytic functions. Can someone help with this requirement..
    Data :
    with t as (select 1 AS Calc_Seq, 700 as erncd, 0.05 as pct, 22 Hrly from dual union all
    select 2, 701, 0.05 , 22 from dual union all
    select 3, 702, 0.075 , 22 from dual)
    SELECT T.Calc_Seq,T.erncd,T.pct,T.hrly FROM T;
    Output required as follows ...
    Need compounded rate field, as PCT rate of previous row "Compounded rate" field value.
    CALC_SEQ     ERNCD          PCT          HRLY        Compounded rate
    1               700            0.05          22               23.1
    2              701            0.05          22               24.255
    3              702            0.075          22               26.074125Thanks in advance.
    Edited by: Rama on Jan 9, 2013 11:39 AM
    Edited by: Rama on Jan 9, 2013 11:50 AM

    Hi,
    Try this:
    WITH
      t AS
        SELECT      1    AS Calc_Seq    ,700  AS erncd    ,0.05 AS pct  ,22 Hrly  FROM      dual    UNION ALL
        SELECT      2                   ,701              ,0.05         ,22       FROM      dual    UNION ALL
        SELECT      3                   ,702              ,0.075        ,22       FROM      dual
    SELECT
    FROM
      T
    model
    dimension by (calc_seq)
    measures (erncd, pct, hrly, 0 cr)
    rules
    cr[any] order by calc_seq = case  when cv(calc_seq) = 1 then hrly[cv(calc_seq) ] * (1 +pct[cv(calc_seq)])
                                      else cr[ cv() -1] * (1 + pct[cv()]) end
    CALC_SEQ ERNCD PCT     HRLY  CR
           1   700 0.05    22    23.1
           2   701 0.05    22    24.255
           3   702 0.075   22    26.074125 Regards,
    Peter

  • DAX - how to use dax to return a previous row value?

    Hi,
    I was trying to use the EARLIER function but couldn't make it work:
    EVALUATE
    SUMMARIZE (
    CALCULATETABLE (
    'Inscricoes',
    'Ano Letivo'[ID_TB_DIM_ANO_LETIVO] <= VALUE(26),
    'Ano Letivo'[ID_TB_DIM_ANO_LETIVO] > VALUE(26) - 5,
    'Escola'[ID_TB_DIM_UNIDADE_ORGANICA] = VALUE(6),
    Curso[ID_TB_DIM_CURSO] = VALUE(372),
    'Tipo de Inscricao no Curso'[DS_TIPO_INSCRICAO_CURSO]
    = "Matrícula"
    'Ano Letivo'[ID_TB_DIM_ANO_LETIVO],
    'Ano Letivo'[DS_ANO_LETIVO],
    "NR_INSCRICOES", [NR_ESTUDANTES_INSCRITOS])
    This generates:
    ID_TB_DIM_ANO_LETIVO
    DS_ANO_LETIVO
    NR_INSCRICOES
    22
    2010-11
    93
    23
    2011-12
    101
    24
    2012-13
    84
    25
    2013-14
    85
    26
    2014-15
    104
    I need a new field that does returns the previous value of subscriptions (NR_INSCRICOES), so last 2 columns will be:
    93 - 
    101 - 93
    84 - 101
    85 - 84
    104 - 85
    Need some help. Thanks

    Hi Pedro,
    According to your description, you want to get the previous row data along with each row. Right?
    In DAX, we can use EARLIER() function to achieve this requirement. Please refer to link below:
    PowerPivot DAX Session Notes 2 – Previous Row
    In this scenario, I suggest you select the three columns into one table(let's say TABLE1). Then you can try the expression below:
    =CALCULATE(MAX(TABLE1[NR_ESTUDANTES_INSCRITOS]), (FILTER(TABLE1,EARLIER(TABLE1[ID_TB_DIM_ANO_LETIVO])>TABLE1[ID_TB_DIM_ANO_LETIVO])))
    Reference:
    EARLIER Function (DAX)
    Best Regards,
    Simon Hou
    TechNet Community Support

  • How to retain a form values when navigating to another form

    I have a createUser.jsp where i can create new user(CreateUserForm). I need to call an action which will take me to another jsp findPage.jsp (FindAssociateForm) where i perform some operations and then comes back to previous page createUser.jsp. When I come to createUser.jsp, all the form values (like first name, lasst name, etc) are getting lost. so I had to re-enter the whole information again which should not be case.
    I would like to retain the form values.
    Please note I have one pageflow but two form beans as both are different JSPs.
    Thanks for looking into this and I appreciate your help.
    -Ananth

    Hi Ananth,
    U need to define Pageflow formbeans.
    The formbean u defined is request scope. Pagefloe formbeans are global and can be used through out pageflow.
    Coming back to first page can be of different cases, form validation failure or navigation logic.
    In form validation Failure you can use, forward path as Jpf.Navigate.ToCurrentPage or Jpf.Navigate.ToPreviousPage depending on your flow. The values will be retained even if form bean is request scope.
    ex:     @Jpf.Action(forwards = {
                   @Jpf.Forward(name = "success", path = "findPage.jsp"),               
                   @Jpf.Forward(name = "failure", navigateTo = Jpf.NavigateTo.currentPage)})
    If its a navigation logic, the you need to add this formbean in the forward.
    ex: forward.addOutputForm(createUserForm);
    Let me know if you need anything more.
    Suman

  • Black & White Adjustment that retains same Greyscale values (when in Color)

    Hi all,
    I noticed that when I apply a simple Black&White Adjustment layer to my colored layers, the 'Greyscale values' either via LAB sliders /HSb brightness changes drastically.:
    http://i57.tinypic.com/16ifm8n.png
    eg the L slider for the turquoisy color jumps so much
    I've tried the Hue/Saturation & Black&White adjustment layers with default settings. Can someone tell me a quick B&W workaround conversion that adheres as close as possible to sliders values when the adjustment layer is off?  I used it for digital coloring to check my composition 'values' regularly, so complex grayscale conversions would be less preferable. Also, I do not need it to be perfect to human vision, just hopefully adhere roughly to the 'L' or 'B' slider values when the B&W adjustment is turned on/off
    thanks alot!

    I believe the tone shift to which you are referring is caused by the B&W adjustment layer as demonstrated here. This is the basic file (Adobe RGB):
    Add a duplicate layer and change its Blending Mode to Luminosity. The colors will not change. Then add a Black & White Adjustment Layer and it will modify the resultant color like this:
    For a clearer comparison, the image below shows the beginning image with the altered luminosity of the B&W Adjustment layer in the center circle
    (Notice Clipping Mask)
    So, the default setting of the sliders that appear in the B&W drop-down menu must be adjusted so that, at the start, this Adjustment layer of the Luminosity does not alter the color. To do that, I had to change the settings to:
    Reds     33
    Yellows 90
    Greens     60
    Cyans     72
    Blues     14
    Magentas 46
    You may save these settings as a Preset. so that they do not require resetting each time. The practical application of this is that it allows you to lighten and darken specific colors in a scene without resorting to selections. I have found this to be most useful in landscape images. (I overdid the changes in the sample below for demonstration purposes only.)

  • Issue : OBIEE applying default prompt values when pressing return button

    Hi All,
    On my dashboard, I am showing a summary report. This summary report has a link to detail report. I have provided a link for detail report just below the summary report on dashboard. Following is the issue which I am facing
    [1] I run the dashboard for a particular prompt value on the dashboard. Let's say a date value = '1/1/2010'.
    (There is no default value for the prompt).
    [2] Now my summary report is updated according to the prompt value which I selected.
    [3] I click on any value on summary reports and it drill down and recalculated the metrics
    [4] Now when I click on the detail report, i get the detail report too ( in a new window). The issue starts from here.
    [5] When I click on return link from the detail report page, it takes me back to the summary report page ( I land on the report which I got from step 3)
    [6] I click on the return button under the summary report (rememeber I had drilled down) to see the report which i get in step 2
    But, when I click on the return button under the summary report, it changes the prompt value too and applies the default value to the prompt and provides me the initial summary report with default promt value. The report which I got in step 2
    Whereas what i want is when I click on the return link then I should get the report which I got in step 3.
    Why does OBIEE applies the default value when I try to return back to my original summary report. Is this an OBIEE feature or I have some setting issue ?
    Hope I have been able to explain the scenario!
    Can anyone please reply on this. Any help would be much appreciated.
    Thanks,
    Ronny

    hey kart,
    the issue is not about going back to the summary report ...the issue is when i click on the return link below the summary report after returning from the detail report ( which opens in a new window) then it takes me to the initial summary report ( which was loaded by default when the dashboard was loaded) with all the default prompt filters whereas my requirement is to go back to the summary report with the filters which users selected from the prompt ....
    Please let me know.
    Thanks,
    Ronny

  • Populate other column value based on previous row value using t-sql

    Hi All,
    I have one table with 6 columns, let say ID1, ID2,status, EnteredDate,NewValue, Old Value. Where ID1 is the primary key field
     ID1       ID2       status             EnteredDate        NewValue      
    Old Value
      1          XYZ       New              07/12/2012           
    ABC               null
      2          XYZ       Renewal        08/19/2012            DEF               
    null
      3          XYZ       Cancel           10/21/2012            GHI               
    null
      4          ZYX       New              09/15/2012           
    BDF               null
      5          ZYX       Cancel           10/21/2012            MNS             
    null
      6          MBS       New              05/29/2012           
    EXP               null
      7          SBX        New              05/29/2012           
    SKS               null
      8          SBX        Renewal        06/21/2012            QSR              
    SKS
    Basically I need a sql query which should populate Output as below. Status=New will always have old date compared to Renewal and Cancel and also OldValue field will be null always for status=New
    Output:
     ID1       ID2       status           EnteredDate        NewValue      
    Old Value     Row_Num(based on ID1,ID2,Entereddate)
      1          XYZ       New              07/12/2012           
    ABC               null                 1
      2          XYZ       Renewal        08/19/2012            DEF               
    ABC                2
      3          XYZ       Cancel           10/21/2012            GHI               
    DEF                 3
      4          ZYX       New              09/15/2012           
    BDF               null                   1
      5          ZYX       Cancel           10/21/2012            MNS              
    BDF                 2
      6          MBS       New              05/29/2012           
    EXP               null                  1
      7          SBX        New              05/29/2012           
    SKS               null                  1
      8          SBX        Renewal        06/21/2012            QSR              
    SKS                2
    Thanks in Advance, its very urgent. Pls send me the query ASAP.
    RH
    sql

    Hi,
    In case of you are using SQL 2012, you can use new built-in function like LAG, try this;
    USE tempdb
    GO
    CREATE TABLE dbo.Test
    ID1 int PRIMARY KEY
    , ID2 char(3) NOT NULL
    , Status varchar(20) NOT NULL
    , EnteredDate date NOT NULL
    , NewValue char(3) NOT NULL
    , OldValue char(3) NULL
    GO
    INSERT INTO dbo.Test
    (ID1, ID2, Status, EnteredDate, NewValue, OldValue)
    VALUES
    (1, 'XYZ', 'New', '07/12/2012', 'ABC', null)
    , (2, 'XYZ', 'Renewal', '08/19/2012', 'DEF', null)
    , (3, 'XYZ', 'Cancel', '10/21/2012', 'GHI', null)
    , (4, 'ZYX', 'New', '09/15/2012' ,'BDF', null)
    , (5, 'ZYX', 'Cancel', '10/21/2012', 'MNS',null)
    , (6, 'MBS', 'New', '05/29/2012', 'EXP', null)
    , (7, 'SBX', 'New', '05/29/2012', 'SKS', null)
    , (8, 'SBX', 'Renewal', '06/21/2012', 'QSR', 'SKS')
    WITH cte
    AS
    (SELECT ID1, ID2, Status, EnteredDate, NewValue, OldValue
    , ROW_NUMBER() OVER(PARTITION BY ID2 ORDER BY ID2) Row_Num
    , LAG(NewValue, 1, 0) OVER(PARTITION BY ID2 ORDER BY ID2) NewOldValue
    FROM dbo.Test)
    SELECT ID1, ID2, Status, EnteredDate, NewValue
    , NULLIF(NewOldValue, '0') NewOldValue, Row_Num
    FROM cte
    ORDER BY ID1, ID2;
    Dinesh Priyankara
    http://dinesql.blogspot.com/
    Please use Mark as answer (Or Propose as answer) or Vote as helpful if the post is useful.

  • Query! calculation based on previous row value

    Hi,
    ID     Code     Direction     From Amount  To Perct      To Amount
    98     POI     F          5457.00          0     
    77     LKJ     T          0          50      (5457*(50/100))
    56     MNB     T          0          25      (5457*(25/100))How to calculate 'To Amount' with in the select query? To Amount will be calculated on the basis of
    From Amount of the First row multiplied by 'To Perct'
    When I wrote a select statement it's taking 0 as 'From Amount'( Because it's in current row) and giving me 0 as 'To Amount'
    Thanks

    One possibility:
    with t as (
    select 98 id,     'POI' Code,     'F' Direction, 5457.00 FromAmount,          0 ToPerct from dual     union all
    select 77,     'LKJ',     'T',          0,          50 from dual     union all
    select 56,     'MNB',     'T',          0,          25 from dual)
    select id, code, direction, FromAmount, ToPerct,
           (tmax.MaxAmount)*(ToPerct/100) ToAmount 
    from t,
         (select max(FromAmount) MaxAmount from t) tmax ;Results:
            ID COD D FROMAMOUNT    TOPERCT   TOAMOUNT
            98 POI F       5457          0          0
            77 LKJ T          0         50     2728,5
            56 MNB T          0         25    1364,25Regards,
    Miguel

  • Find the difference between previous row value

    Hi All,
    I have a Property Rent Review table which holds the last rent update done on a property.
    I need to be able to compare the rent change (%) at any interval for a property. - so the query should allow to pull the property rent at 2 or more points in time and I need a view that shows % increase or decrease between the 2 dates.
    Generally the dates would be 3 months apart (qtrly) but I would like to be able to enter my own dates in case I want to run monthly / annually or compare “before” and “after” the  Rent Review.
    Below is a sample data
    TenantCode PropCode Rent Charged  Rent Change Date
    31163        2469         157.68                 6/01/2014
    31163        2469         160.69                16/06/2014
    31163        2469         162.65                 1/12/2014
    51428        2469         162.65                 10/12/2014
    50824        3174         160.69                 28/03/2014
    50824        3174         160.69                 4/04/2014
    50111        3174         149.5                  21/05/2014
    50695        3852         256.5                 24/01/2014
    50695        3852         327.87               10/03/2014
    50695        3852         256.6                 31/03/2014
    50804        3865         278.48               18/03/2014
    50779        3865         236.67               21/05/2014
    50804        3865         237.82               31/07/2014
    51135        3865         237.82               21/08/2014
    51135        3865         165.69               12/09/2014
    51135        3865         230.15               17/11/2014

    Hi Diegoctn,
    Your query work perfectly. But can we get the view as Patricks view below
    With
    CTE
    AS
    SELECT
    ROW_NUMBER()OVER
    (PARTITIONBYProp_Code
    ORDERBYDATE_CHANGED_SQL)ASSeq,
    FROM
    R23
    SELECT
    c1.PROP_CODE,c1.TENANT_NUMB,c1.TOT_DEB_VAL,c1.DATE_CHANGED_SQL,(c1.TOT_DEB_VAL
    -c2.TOT_DEB_VAL)*100.0/NULLIF(c2.TOT_DEB_VAL,0) 
    AS[Rent(%)]
    FROM
    CTE c1
    LEFT
    JOINCTE
    c2
    ON
    c1.PROP_CODE
    =c2.PROP_CODE
    AND
    c1.Seq
    =c2.Seq
    +1
    Where
    c1.PROP_CODE
    ='1587'

  • Problem with Object returning previously set values, not current vlaues

    Please help if you can. I can send the full code directly to people if they wish.
    My problem is I enter title details for a book via an AWT GUI. When the user clicks the OK button it should display a new screen with the values just entered by the user. I added debug lines and found that the newInstance method has the values I set and the setObject created an object that was not null.
    However the first time you submit the details when it tries to get the object to display them back to the user it is null. However when you try and enter the details for a second time it will display the details entered on your first entry. Likewise if you went to enter a third title and put blank details in it would display the second set of details back to the user when they click OK.
    I'm very confused as to how it when I fetch an object I've just set it is out of step and points to previous values or null when used for the first time.
    Right onto the code.
    ----Shop.class - contains
    public static Object
    getObject()
    if ( save_ == null)
    System.out.println("Return save_ but it is null");
    return save_;
    public static void
    setObject( Object save )
    save_ = save;
    if ( save == null)
    System.out.println("Just taken save but it is null");
    if ( save_ == null)
    System.out.println("Just set save_ but it is null");
    ----AddTitlePanel.class contains
    private void okButtonActionPerformed(ActionEvent evt)
    ConfirmAddTitlePanel confirmAddTitlePanel =
    new ConfirmAddTitlePanel();
    // Gets the textField values here
    model.Title mss = model.Title.newInstance( fullISBN,
    ISBN,
    title,
    author,
    copiesInStock,
    price );
    model.Shop.setObject( mss );
    // Fetch reference to Graphical so buttons can use it to
    // display panels
    graph = model.Shop.getGraphical();
    graph.display( confirmAddTitlePanel );
    This creates a newInstance of Title and creates a copy using setObject when the user clicks on "OK" button. It also calls the ConfirmAddTitlePanel.class to display the details back to the user.
    ----ConfirmAddTitlePanel.class contains:
    private void
    setValues() throws NullPointerException
    model.Title mss = (model.Title) model.Shop.getObject();
    if ( mss != null )
    model.Field[] titleDetails = mss.getFullDetails();
    //model.Field[] titleDetails = model.Title.getFullDetails();
    fullISBNTextField.setText( titleDetails[0].asString() );
    //ISBNTextField.setText( titleDetails[1].asString() );
    titleTextField.setText( titleDetails[2].asString() );
    authorTextField.setText( titleDetails[3].asString() );
    copiesInStockTextField.setText( titleDetails[4].asString() );
    priceTextField.setText( titleDetails[5].asString() );
    else
    System.out.println( "\nMSS = null" );
    This is getting the Object back that we just set and fetching its details to display to the user by populating the TextFields.
    As I say first time you enter the details and click OK it displays the above panel and outputs "MSS = null" and cannot populate the fields. When you enter the next set of title details and click "OK" getObject is no longer setting mss to null but the values fetched to set the TextFields is the data entered for the first title and not the details just entered.
    ----Title.class contains:
    public static Title
    newInstance( String fullISBN,
    String ISBN,
    String title,
    String author,
    int copiesInStock,
    int price )
    Title atitle = new Title( fullISBN,
    ISBN,
    title,
    author,
    copiesInStock,
    price );
    System.out.println("Created new object instance Title\n");
    System.out.println( "FullISBN = " + getFullISBN() );
    System.out.println( "ISBN = " + getISBN() );
    System.out.println( "Title = " + getTitle() );
    System.out.println( "Author = " + getAuthor() );
    System.out.println( "Copies = " + getCopiesInStock() );
    System.out.println( "Price = " + getPrice() );
    return atitle;
    I'm really stuck and if I solve this I should hopefully be able to make progress again. I've spent a day and a half on it and I really need some help. Thanks in advance.
    Mark.

    Hi Mark:
    Have a look of the method okButtonActionPerformed:
            private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
             // if you create the confirmAddTitlePanel here, the value of
             // Shop.save_ is null at this moment (first time), becaouse you
             // call the methode setValues() in the constructor, bevore you've
             // called the method Shop.setObject(..), which has to initialize
             // the variable Shop.save_!!!
             // I think, you have to create confirmAddTitlePanel after call of
             // method Shop.setObject(...)!
             // ConfirmAddTitlePanel confirmAddTitlePanel = new ConfirmAddTitlePanel();
            ConfirmAddTitlePanel confirmAddTitlePanel = null;
            String fullISBN            = fullISBNTextField.getText();
            String ISBN                = "Test String";
            String title               = titleTextField.getText();
            String author              = authorTextField.getText();
            String copiesInStockString = copiesInStockTextField.getText();
            String priceString         = priceTextField.getText();
            int copiesInStock          = 0;
            int price                  = 0;
            try
                copiesInStock = Integer.parseInt( copiesInStockString );
            catch ( NumberFormatException e )
                // replace with error output, place in status bar or pop-up dialog
                // move focus to copies field
            try
               price = Integer.parseInt( priceString );
            catch ( NumberFormatException e )
                // replace with error output, place in status bar or pop-up dialog
                // move focus to price field
            model.Title mss = model.Title.newInstance( fullISBN,
                                     ISBN,
                                     title,
                                     author,
                                     copiesInStock,
                                     price );
            model.Shop.setObject( mss );
            // ---------- now, the Shop.save_ has the value != null ----------        
            confirmAddTitlePanel = new ConfirmAddTitlePanel();     
            // Fetch reference to Graphical so buttons can use it to
            // display panels
            graph = model.Shop.getGraphical();
            graph.display( confirmAddTitlePanel );
        }//GEN-LAST:event_okButtonActionPerformedI hope, I have understund your program-logic corectly and it will help you.
    Best Regards.

  • How to handle dynamically created row values when get upadted "please help"

    Hi,
    In my application I have requirement to display the data for specific date when user clicks on viewData. (it shows the entries for that specific days . There may be number of entries). For showing this I have created Value Object and I am setting all the entries for particular selection date to value object and (simply one day entry indicates one instance of my VO if there are 10 entries then I am creating 10 instances of VO and passing this to the actionfor)
    On my JSP page I am displaying that data by using <logic:iterate>
    <logic:iterate id=�myid� name =�nameofform� property =�Listproperty�>
    <tr>
    <td><input type=�text� property=�abc� value=<bean:write name=�myid� property=�propertyinVO�></td>
    // and same for other other values as well
    �.
    </logic:itearte>
    Now I have requirement that if user edit these entries and click on SAVEDATA the updated values should go to the DB.
    As I don�t have property mapped separately I am not able to take updated values of those as they are getting dynamically generated
    Is there is any way by which I can get these updated values.
    I am in badly need of that . Urgent help will highly appreciated.
    Thanks
    Sheena

    Hi, first off, no need to determine what has been checked or not. If the checkbox is checked, on the post, the value will be submitted as part of the request. If the checkbox is not checked, it will not be submitted (it's value will be null). Depending on what you need, I have approached this a number of different ways. One way is to name all checkboxes the same name. If you need to distinguish between two rows in the form, then in the value field for the checkbox, use some type of distinguishing factor, for example,
    <input type=checkbox name=chkName value="1:abc">
    <input type=checkbox name=chkName value="1:def">
    Now, you only have to make one call on the Servlet/JSP receiving the form post, request.getParameterValues("chkName") which will return an array of the non-null Strings that were checked.

  • How to update form item in IR with value when it is null when pressing Go?

    Hello,
    in an IR i have created a Date Picker Item. This item i want when user enters page to have a default value. Also when the user clears this field i want the corresponding item to get a default value. i have achieved the 1st but not the 2nd. I need this replacement in the item value because it its needed in a between where date expression in the report query and i want to have the bind variables only, not NVL them in order to avoid scanning all partitions of table. Thi item is used as an extra search field in the Report and it is included in the Page Items to Submit | Advanced Report Attributes.
    How can i do this ?
    What i have set up atm:
    Source Used
    Always, replacing any existing value in session state
    Source Type
    PL/SQL Expression or Function PL/SQL
    Source value or expression
    TRUNC(SYSDATE)
    and also in Default :
    Default value
    RETURN TO_DATE('01/01/1980','DD/MM/RRRR')
    Default Value Type
    PL/SQL Function Body
    TIA

    Dionyssis ,
    Normally you could, but IRRs are a little different. You can use the page rendering options, but page submit options will not fire when the report is being redrawn.
    To get you started, add this to the item's HTML Form Element Attributes:
    onblur="this.value = $v('PX_HIDDEN_DATE_ITEM')"Then just create a hidden date item and give it a default value. This will keep you from having to get into JavaScript date formatting which is terrible when compared to Oracle.
    Regards,
    Dan
    http://danielmcghan.us
    http://www.skillbuilders.com
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Referencing condition values when creating return order is wrong...

    Hello Experts,
    Lets say I have a billing document that has 3 line items namely material A, B and C.
    Now, I created a return order for material A with 2 separate line items because of different
    storage locations. Now, is there a user-exit that lets my 2nd line item copy the condition values of the
    1st line item of the reference billing document? because they are of the same material(A).
    Currently, we are having problems when creating a return order having multiple line items of the same material
    because the succeeding line items copies the wrong condition values of the referenced billing doc.
    For example:
    Original billing document:
    Material      Discount
    A          100
    B          200
    C          300
    Return Order:
    Material     Discount
    A          100
    A          200
    A          300
    The succeeding line items of my return order must point to the first line item since they are of the
    same material. Hope you can help me guys. Thank you and take care!

    You may need to explore in the copy control definition, especially the pricing type defined. Check if any customized requirements exists for condition which checks w.r.t to the document number instead of reference document number item.

Maybe you are looking for

  • Would I be able to get a replacement?

    Hey there guys! This is my first time ever posting on apple, so excuse me if I'm in the wrong section. Recently (end of November 2012) I began a plan with Telstra (I'm in Australia) for my iPhone 5. While I was on holidays in December, I accidently d

  • How can i get the list of DB02's Table spaces-overview?

    Dear Experts,        Could you help me about how can i get the list of DB02's Table spaces-overview? which function module can do it? Thanks a lot

  • Error when creating AP invoice batch in OpenScript using load Protocol

    In the script step: "Move window("NAVIGATOR") (68,77)" The following error is received: "Failed to read message from server. Caused by: java.io.IOException occurred. Error Message: null" This occurs in OpenScript for both 9.1 and 9.2 and in our R12 t

  • I cannot unlock my iPhone 4 regardless of unlocking giving directions by AT&T

    HT4061 Re: "The SIM card inserted in this iPhone does not appear to be supported." problem  Dec 27, 2013 12:00 PM (in response to spot2383) Hello, I am Lalo and I have the same problem. I was a former AT&T customer and I bought my iphone 4 to Mexico.

  • No Authorization check for MultiProvide (S_RS_MPRO)

    Hello Every body We have a problem regarding the authorization check for MultiProviders. We have assigned the auth. object S_RS_MPRO to a user for one specific MultiProvider. We have also turned on the settings for "MultiProvider" and "MultiPro. (Que