Generate rows base on complex logic

hi, i have a complex scenario that i am trying to solve. i will appreciate any help out there.
consider the following data.
WITH table1 AS
  SELECT 111 cid,  200 amt, 'P' ind FROM dual UNION all
  SELECT 111 cid,  200 amt, 'S' ind FROM dual UNION ALL
  SELECT 111 cid,  20  amt, 'AC' ind FROM dual UNION ALL
  SELECT 111 cid,  80 amt, 'S' ind FROM dual UNION ALL
  SELECT 222 cid,  100 amt, 'P' ind FROM dual UNION all
  SELECT 222 cid,  100 amt, 'S' ind FROM dual UNION ALL
  SELECT 222 cid,  20  amt, 'AC' ind FROM dual UNION ALL
  SELECT 333 cid,  300 amt, 'P' ind FROM dual UNION all
  SELECT 333 cid,  300 amt, 'S' ind FROM dual UNION ALL
  SELECT 333 cid,  30  amt, 'AC' ind FROM dual UNION ALL
  SELECT 333 cid,  90 amt, 'AC' ind FROM dual UNION all
  SELECT 333 cid,  20 amt, 'AC' ind FROM dual UNION all
)i need to break this down from column to rows which is something i know how to do.
however, the hard part is as follow. as you can see, for one particular cid, you could have
two rows with the same ind value. ex. cid=111 has two rows of ind='s', 333 has two rows with inc='ac'
what i need to do is as follow: lets take the simple scenario first
1. for cid=222 we can see that every rows has a different ind value. in this case, all i want to do is to
display columns to row. the output for 222 should be something like this
          cid       p_amt    s_amt   ac_amt
====      ====     =====   ======
222       100      100      20
   the only thing here is converting columns to rows.
2. the second step is the complex one. lets take cid=111. if you notice, there are two rows for ind=s
in this case what i want to do is to display this in two rows but the amount will differ.
the output should be something like this
         cid       p_amt    s_amt   ac_amt
====      ====     =====   ======
111       142.8    200      20
111       57.14    80       20
   what the output above shows is that columns got transform into rows but since there were two or more rows with same ind for a specific cid(ex 111)
i created two rows instead of 1 . also if you notice, the p_amount is not 200 but a percentage amount
i got the value of p_amt with the following formula: s_amount for each row/sum(ind='s') .
ex. (200 / (200+80 - sum of s ind)) * p_amt(ind=P) for the second rows same logic (80/(200+80) )* p_amt (ind=P)
same formula applay for ac amount (200 / (200+80 - sum of s ind)) * c_amt(ind=AC)
3. for cid=333 same logic as per step 2 but 3 ROWS needs to be display since there are 3 rows with ind=ac
in summary, when the ind for a specific cid is unique (no duplicate value, ex cid 222) then convert from columns to rows (1 row per specific cid)
when a particular cid has rows with same ind such as cid 111 and 333, then i want to convert columns to rows but instead of 1 row i want to convert into multiple
row and apply % to p_amt using formula above.
final output should be
         cid       p_amt    s_amt   ac_amt
====      ====     =====   ======
222       100      100      20
111       142.8    200      14.28
111       57.14    80       5.72
333       64.26    64.26    30
333       186.84   186.84   90
333       42.85    42.85    20
   can some one help write a query for such logic that produce result as above?
i am looking into having a query for this. but all solutions are welcome if it cannot be done in single query
thanks

Hi Frank, thanks for the query once again. i will run it later with the sample data. but first let me explain what i am trying to do here briefly.
here are answer to your comments and explanation follow
When there is only 1 row with ind='P' for a given cid, it looks like you want 1 row of output for each row where ind='AC', or for each row where ind='S', whichever is greater.
----yes when there is one P i want one row of output for each rows in AC or S only if S or AC has TWO or MORE rows whichever is greater
When there is more than 1 row with ind='P' for a given cid, it looks like you want each of those rows with ind='P' joined to each of the rows you would get otherwise.
--- for every P row same logic as point above applies for each P row. so if there are 1 P and two S we will see two rows. if there are two P and two S then we would see 4 rows
since for every P we need to apply the logic in in first question above
When all the rows for a cid have ind='P', you want them, so the query above has a outer-join between the "table" with the 'P' data and the other "tables". (Most of the "tables" are actually sub-query result sets.)
--- when all rows are P just display the data columns to rows for the same number of P rows. if there are two P, then two rows, if 3 P then 3 rows in row format.
also, if there is no P but you have S and AC. the number of rows display should be whichever is greater and of course the p_amt column will be null since there is no P. so in the case of cid=555, there should be one row for cid=555 with p amt null and s amount populated and c amount populated
so cid = 555 should be
cid     p_amt   s_amt    c_amt
===    =====    ======    =======
555    null     142.86  200
555    null     57.14    80
555    null     142.86  200
555    null     57.14    80In this case there is no P so take AC and apply formulat to S. also the same situation could happen where there is only S rows or only AC rows like cidi=666 and cid=777. these data should be diplay as same logic as cid=444
Below is an explanation
again consider the following data.
WITH table1 AS
  SELECT 111 cid,  200 amt, 'P' ind FROM dual UNION ALL
  SELECT 111 cid,  200 amt, 'P' ind FROM dual UNION all      --added another P
  SELECT 111 cid,  200 amt, 'S' ind FROM dual UNION ALL
  SELECT 111 cid,  20  amt, 'AC' ind FROM dual UNION ALL
  SELECT 111 cid,  80 amt, 'S' ind FROM dual UNION ALL
  SELECT 222 cid,  100 amt, 'P' ind FROM dual UNION all
  SELECT 222 cid,   80 amt, 'P' ind FROM dual UNION all    --added another P
  SELECT 222 cid,  100 amt, 'S' ind FROM dual UNION ALL
  SELECT 222 cid,  20  amt, 'AC' ind FROM dual UNION ALL
  SELECT 333 cid,  300 amt, 'P' ind FROM dual UNION all
  SELECT 333 cid,  300 amt, 'S' ind FROM dual UNION ALL
  SELECT 333 cid,  30  amt, 'AC' ind FROM dual UNION ALL
  SELECT 333 cid,  90 amt, 'AC' ind FROM dual UNION all
  SELECT 333 cid,  20 amt, 'AC' ind FROM dual union all
  SELECT 444 cid,  900 amt, 'P' ind FROM dual UNION all    --added these two
  SELECT 444 cid,  1000 amt, 'P' ind FROM dual UNION all
   SELECT 555 cid,  200 amt, 'S' ind FROM dual UNION ALL
   SELECT 555 cid,  200 amt, 'S' ind FROM dual UNION ALL
   SELECT 555 cid,  200 amt, 'AC' ind FROM dual union all
   SELECT 555 cid,  80 amt, 'AC' ind FROM dual union all
  SELECT 666 cid,  100amt, 'S' ind FROM dual UNION ALL
   SELECT 666 cid,  100amt, 'S' ind FROM dual UNION ALL
SELECT 777 cid,  50amt, 'AC' ind FROM dual UNION ALL
   SELECT 777 cid,  50amt, 'AC' ind FROM dual UNION ALL
this dataset represents amount. think of P indicator as a loan of $200 for cid=111. think of S as some type of interest. AC is along the same line as S.
one loan (P) could have multiple S and one or no AC.
one loan(P) could have just one row or more rows with P such as cid=444 and no S or AC
one loan P could have multiple AC and so on
each row in the output represent the percentage amount of the Loan base on the interest S or AC.
for example. lets take cid=111 in data above. we can see there are two Ps Two S and 1 AC.
for a particular cid, i want to check if there are one or more S or one or more AC.
in this case there are two S and i should display the data in row format in two rows. if there were 3 S then that would have been 3 rows display for cid=111.
if you look at the output below, you will see first two rows and the value for S remain the same as the data above(200 and 80)
if you look at the p_amt, the amt is NOT the same as the original data. the original data has 200. when you apply the formula mentioned in previous post, p amt gets split into different amount for the two rows and they add up to 200. if there were 3 S in the original data, then you will see 3 rows and the p amt as well as the c_amt will be less
since all need to add up to the original amount in the dataset. this scenario happen when there are two or more S or two or more AC.
the second set of data after the blank line, is the same as the first set. this is because there are two P with same amount, and the same logic should be apply for all the P present.
cid     p_amt   s_amt    c_amt
=====================
111  142.86  200.00   14.29
111   57.14   80.00    5.71
111  142.86  200.00   14.29
111   57.14   80.00    5.71lets take another example, cid=444 only has two P and no S or AC. in this case just display the data in row format. so there should be two rows only, s_amt and c_amt should be null since there is none.
another example is cid=222, there are two P, one S and one AC. since there is not two or more S or AC, then we need to convert all rows from columns to rows and display one rows. however, we can see that there is two P, so for the second P same logic apply. this is why you see duplicate rows because we need to apply same logic for every P row even though data might look the same.
222  100.00  100.00   20.00
222  80.00  100.00   20.00if there was only one P for cid=200 then we would have seen this output
222  100.00  100.00   20.00so in summary, we are converting from columns to rows for each set of cid and depending on the number of S rows or AC rows, that is how many rows should be display for a specific cid. then like in the case of cid=111, p_amt and c_amt in all rows should added up to the original amount. this is done by the RATION function that determine the percentage to apply base on the formula provided.
same with cid=333. in this case there are 3 AC so 3 rows should show and the p_amt and s_amt should be derive base on the percentage and add up to original value.
as i mentioned, there could be multiple P and they might have different amount, the same logic should apply for every P row therefore you could see duplication of rows such as output for cid=111
i know this is long but i hope this helps. feel free to ask any other questions and thanks for your help. i will try the query. if you feel you need to add something else to the query base on explanation above, feel free and let me know.
Edited by: elmasduro on Feb 16, 2011 7:07 AM
Edited by: elmasduro on Feb 16, 2011 7:14 AM
Edited by: elmasduro on Feb 16, 2011 7:42 AM
Edited by: elmasduro on Feb 16, 2011 8:48 AM
Edited by: elmasduro on Feb 16, 2011 10:37 AM

Similar Messages

  • What is the best approach to process data on row by row basis ?

    Hi Gurus,
    I need to code stored proc to process sales_orders into Invoices. I
    think that I must do row by row operation, but if possible I don't want
    to use cursor. The algorithm is below :
    for all sales_orders with status = "open"
    check for credit limit
    if over credit limit -> insert row log_table; process next order
    check for overdue
    if there is overdue invoice -> insert row to log_table; process
    next order
    check all order_items for stock availability
    if there is item that has not enough stock -> insert row to
    log_table; process next order
    if all check above are passed:
    create Invoice (header + details)
    end_for
    What is the best approach to process data on row by row basis like
    above ?
    Thank you for your help,
    xtanto

    Processing data row by row is not the fastest method out there. You'll be sending much more SQL statements towards the database than needed. The advice is to use SQL, and if not possible or too complex, use PL/SQL with bulk processing.
    In this case a SQL only solution is possible.
    The example below is oversimplified, but it shows the idea:
    SQL> create table sales_orders
      2  as
      3  select 1 no, 'O' status, 'Y' ind_over_credit_limit, 'N' ind_overdue, 'N' ind_stock_not_available from dual union all
      4  select 2, 'O', 'N', 'N', 'N' from dual union all
      5  select 3, 'O', 'N', 'Y', 'Y' from dual union all
      6  select 4, 'O', 'N', 'Y', 'N' from dual union all
      7  select 5, 'O', 'N', 'N', 'Y' from dual
      8  /
    Tabel is aangemaakt.
    SQL> create table log_table
      2  ( sales_order_no number
      3  , message        varchar2(100)
      4  )
      5  /
    Tabel is aangemaakt.
    SQL> create table invoices
      2  ( sales_order_no number
      3  )
      4  /
    Tabel is aangemaakt.
    SQL> select * from sales_orders
      2  /
            NO STATUS IND_OVER_CREDIT_LIMIT IND_OVERDUE IND_STOCK_NOT_AVAILABLE
             1 O      Y                     N           N
             2 O      N                     N           N
             3 O      N                     Y           Y
             4 O      N                     Y           N
             5 O      N                     N           Y
    5 rijen zijn geselecteerd.
    SQL> insert
      2    when ind_over_credit_limit = 'Y' then
      3         into log_table (sales_order_no,message) values (no,'Over credit limit')
      4    when ind_overdue = 'Y' and ind_over_credit_limit = 'N' then
      5         into log_table (sales_order_no,message) values (no,'Overdue')
      6    when ind_stock_not_available = 'Y' and ind_overdue = 'N' and ind_over_credit_limit = 'N' then
      7         into log_table (sales_order_no,message) values (no,'Stock not available')
      8    else
      9         into invoices (sales_order_no) values (no)
    10  select * from sales_orders where status = 'O'
    11  /
    5 rijen zijn aangemaakt.
    SQL> select * from invoices
      2  /
    SALES_ORDER_NO
                 2
    1 rij is geselecteerd.
    SQL> select * from log_table
      2  /
    SALES_ORDER_NO MESSAGE
                 1 Over credit limit
                 3 Overdue
                 4 Overdue
                 5 Stock not available
    4 rijen zijn geselecteerd.Hope this helps.
    Regards,
    Rob.

  • Unpivot task is generating rows for null inputs

    So I have a C# application (VS 2012 with .NET4.5) that builds SSIS (SQL2012) packages programatically.  the packages can be opened in the designer and they run fine.  However, there is one case that is giving me a problem.  I have an
    OleDb source connected to a table in SQL server.  I am using the unpivot task to convert columns in a sparse matrix to an Entity Attribute Value model.  So basically, the primary key value of the source table is a pass-through value in the unpivot
    task, each column is mapped to the destination column, and the attribute id is hard coded as the pivot key.  Like i said this works great EXCEPT i came across one column and a table that was null for all the rows in the table.  when I run the package,
    it fails with:
    OnError,SERVERNAME,DOMAIN\user,{94E83A3B-5386-4712-BEDC-11E35341675F},{94E83A3B-5386-4712-BEDC-11E35341675F},{3187347C-8D44-4D51-8FDB-B5C4159A58B0},9/14/2012 9:48:02 AM,9/14/2012 9:48:02 AM,-1071607780,0x,There was an error with OLE DB Destination.Inputs[OLE
    DB Destination Input].Columns[AttributeId] on OLE DB Destination.Inputs[OLE DB Destination Input]. The column status returned was: "The value violated the integrity constraints for the column."
    So I set up a data viewer on the data flow and found that the unpivot component was generating rows for every null value. not only that, but the values for the key column and the attribute id (which was hard coded) were also null for all the rows
    sent from the unpivot to the ole db destination.  I manually created a package with an unpivot for just the column in question and got the same result.  then I inserted a value for every row in the table and the same package runs fine.
    can someone offer any help or advice on what might be causing this?

    its just two columns of data that are concerned.  ten character numeric strings in the one and null in the other.  the pivot key is hard coded in the unpivot component configuration screen.  see the output of the data viewer below. How do
    I get Microsoft involved with this?
    2013399057 NULL
    2013399488 NULL
    2013399770 NULL
    2013402244 NULL
    2013402440 NULL
    2013404066 NULL
    2013404070 NULL
    2013404203 NULL
    2013404206 NULL
    2013404401 NULL
    2013404589 NULL
    2013404705 NULL
    2013404738 NULL
    2013404768 NULL
    2013404784 NULL
    2013404813 NULL

  • Capturing the row selector and perform logical delete

    Hi All ,
    I add a tabular report in one of my page .But in the MULTI_ROW_DELETE button I like to capture the checkbox (row selector) and fire a PL/SQL anonymous block where rather than performing actual row delete it will update a database field and perform some sort of logical delete .
    Now my problem is I cant able to capture that what are the rows need to be logically deleted :
    DECLARE
    vRow BINARY_INTEGER;
    BEGIN
    FOR i IN 1 .. apex_application.g_f01.COUNT
    LOOP
    vRow := apex_application.g_f01(i);
    update test123 set delete_flag='y' where col2=vRow ;
    end loop;
    end;
    Its throwing error .Can anyone help on this pls how to write the pl/sql code to perform the logical delete.
    Thanks in advance ,
    Regards,
    Debashis.

    Guys ,
    Got the solution by searhcing several of the therads from Denes...
    Create the checkbox from Form page :
    htmldb_item.checkbox(1,t.USERNAME) DeleteItem,
    and then captured it as :
    FOR i in 1..HTMLDB_APPLICATION.G_F01.count
    LOOP
    UPDATE table1 set DELETE_FLAG='Y'
    WHERE USERNAME = HTMLDB_APPLICATION.G_F01(i);
    END LOOP;
    Cheers,

  • How to generate row numbering over several pages in PAGES??

    How can I generate row numbering over several pages in PAGES??
    e.g. Page1 1-35
    Page2 36-...

    Hi Labrat,
    My suggestion would be to create a Template in the Page Layout mode. This template would have a 1-column Table to present the line numbers and a Text Box for the Body Text. If you want the Line Numbers to stay in alignment with the Body Text, set the spacing for both to Exactly. Set the Table Cell Borders to None. The faint cell borders that you see in the following example are there because I am in View Layout mode. They will not show when printed.
    For my example I have used Format > Advanced > Capture Pages to create a Pull-down +Page option for a Numbered Line Page. You can Capture as many versions of your numbered pages as you like to avoid having to modify the Line Numbers on successive pages.
    Here's my example:
    Regards,
    Jerry
    Message was edited by: Jerrold Green1

  • Require some complex logic scenario in message mapping

    Hi all,
                 I need some complex logic scenarios for practice in message mapping . Kindly forward some links for message mapping logic scenarios.
    Thank you so much in advance.

    always search sdn first....
    http://wiki.sdn.sap.com/wiki/display/XI/MappingConceptsinSAPXI

  • Complex Logic - Custom Script - Some other solution?

    Evening All,
    FDM v11.1.1.3
    Goal:_ To have conditional mapping based on a currency column. Original accts translate to summary account plus specific C2 member based on the currency. Solution is needed to aid in Currency Exposure reporting.
    I have been trying to use complex logic with no luck.
    Dimension Background:_
    Custom2 dimension has been built with duel purpose. For P&L accounts it provides Cost Center detail. For Balance Sheet it will provide Currency Exposure Detail. For any P&L accounts C2 is either the exact matching member from the file or C2#0000 if no Cost Center applies.
    So the intent was to read the Account/Currency combination and if Acct=<focus aact> then change C2#0000 to hard-coded C2 value as depicted in the example below.
    Example:_
    Curr=USD A#1020?? -> A#102001.C2#USD_USD
    Curr=AUD A#102038 -> A#102001.C2#USD_AUD
    Curr=GBP A#102047 -> A#102047.C2#USD_GBP
    Curr=GBP A#102051 -> A#102051.C2#USD_GBP
    Attempted Solution:_
    I previously had various Explicit/Between/In/Like definitions. I have tried to create Complex Logic accounts. When I IMPORT the source file. It creates the proper Logic Account records with the proper C2. But two issues emerge:
    1> I have one logical record and one original record
    2> When I VALIDATE I get converted dimension as per normal mapping not the hard coded value (C2#USD_AUD).
    I tried the following but still not getting expected results:
    Explicit Map 102038 -> IGNORE
    Explicit Map L102001_AUD -> 102001 Any advise would be greatly appreciated.

    You don't need a logic group for this. This is just conditional mapping. Take a look at the admin guide for examples.

  • OWB use unwanted RTRIM in generated row based code

    Hi everybody,
    In a pretty straightforward mapping with simple DELETE and then INSERT OWB generate row based code. This would not bother me too much but in INSERT statement OWB use TRIM for all character columns immediately converting fields with spaces into NULL which I badly need to avoid. Does anybody know if this is OWB feature or is it configurable and can be avoided?
    I would appreciate any suggestions,
    Alex

    There are more than one way you can do this. Put it in the pre-mapping process, as described by you, use an expression, use a trasformation or use a temporary table to store constant values calculated on the fly. It all depends on what exacltly you want to do and on your environment details.
    Regards:
    Igor

  • Installation stuck on "generating glibc base locales"

    I've been using Arch Linux for about a year in a VM, and it's been working great. Today, I finally try dual booting XP and Arch. I partitioned my drive using a GParted live CD, installed XP, and started the Arch installation. I got through the installation up until finishing the Configure System step.
    For about three hours now, I've been on "generating glibc base locales..." There's a 0 in the top right corner, and a cursor blinking in the bottom left. In my VM, this step usually took less than five minutes. The computer I'm currently installing Arch on has an Athlon 64 3500+, so I wouldn't expect it to take that long.
    Any ideas? Is it safe to reboot the computer and start the installation again?

    I rebooted, started over, and the install went fine this time. Thanks for the help.

  • Complex logic in loop..

    Hello,
    I want to write a very complex logic to achieve certain reuirement.
    I have an internal table i_tab with following values. Now when I loop at i_tab, whenever value is equal to or greater then '001', perform A. Just before when next value will be 001 perform C.
    001  -> perform A
    002  -> perform A
    003  -> perform A. perform C(because the next value is going to be 001)
    001  -> perform A
    002  -> perform A perform C
    001  -> perform A
    002  -> perform A
    003   -> perform A
    004   -> perform A peform C
    001
    So how can I find the next value of i_tab when I am looping because based on next value in i_tab , I have to perform a function during its previous value.
    Regards,
    Rajesh,

    dummy_i_tab[] = I_tab[].
    loop at i_tab.
    read dummy_itab with table index = current index of i_tab + 1.
      if dummy_itab  = 001
         perform A. perform C
      else.
         perform A.
      endif.
    endloop.
    thanks.
    james.

  • Join all rows bases on one column value

    Hi All,
    I have requrement like Join all rows bases on one column value, i am not getting how to accomplish that. Here is my requrement. i have table test(id,id_desc) with no key
    table:Test
    id id_desc
    1 desc_a
    1 desc_b
    1 desc_c
    Now the requremnet i have one more table as test1(id,id_desc) here id is primary key. where record i need to insert as
    id id_desc
    1 desc_a
    desc_b
    desc_c

    orza wrote:
    Hi All,
    I have requrement like Join all rows bases on one column value, i am not getting how to accomplish that. Here is my requrement. i have table test(id,id_desc) with no key
    table:Test
    id id_desc
    1 desc_a
    1 desc_b
    1 desc_c
    Now the requremnet i have one more table as test1(id,id_desc) here id is primary key. where record i need to insert as
    id id_desc
    1 desc_a
    desc_b
    desc_cI'm guessing you want to pivot the results in TEST and use that to insert into TEST1?
    If so this may be useful
    http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php

  • Get generated rows by Spry with jQuery

    i have a spry region like this
    <table class="widget-elenco">
    <tr spry:repeat="pv" spry:even="even" spry:odd="odd">
       <td>{soggetto_id}</td>
       <td>{codice_fiscale}</td>
       <td>{partita_iva}</td>
    </tr>
    </table>
    the problem: i cant' get the generated rows by spry:repeat with jquery
    i try with an observer, something like this
    var myObserver = function(nType, notifier, data){
      if (nType == 'onPostLoad') {
        $(function(){
          $('table.widget-elenco tr').each(function() {
            doSomething()
    ds.addObserver(myObserver);
    but this not woks :-/
    i can to change "onPostLoad" to "onPreLoad" or "onDataChanged"
    without solutions :-/
    any idea?
    many thanks!
    Rob

    hi gramps :-)
    thanks for your reply!
    here:
    http://qubica.in/manager/soggetti/index.cfm
    simple: i would "remove" the anti-estetic "onmouseover/onmouser" function added on a single <tr> for replace with a jquery function:
    $(function(){
        $('table.widget-elenco tbody tr').mouseover(function() {
            $(this).addClass('ui-state-highlight');
         }).mouseout(function() {
            $(this).removeClass('ui-state-highlight');
    yes, this is not a so important problem... :-) but, in general, the *REAL* question is "how do i get generated rows... using jQuery selector?"
    something lijke this:
    $(function(){
    $('ELEMENTS-IN-SPRY-REGION').each(function() {
        doSomethings();
    thanks!
    Rob

  • How to handle newly generated rows values?

    Hi all,
              My requirement is to generate rows after output is generated.I am able to generate the rows .But my problem is user can generate multiple empty rows.Suppose he generated 2 empty rows .After generating those 2 empty rows.In the first newly generated row he  will select one value help.My problem is that data_change event is trigerring when that f4 help is populated.After that I select the value from f4 help and goes to the second newly generated row and again does the same thing.Now my requirement is for these 2 lands,I want to pick up all the available tests from the database table for these 2 lands and display in the grid.There may be multiple tests available for each land in the database table.
    I am getting wrong values in the data_changed method.Can I use handle_data_changed_finished event for this.I am not able to catch the absolute values using data_change event.
    Can any one help in this regard?
    Thanks,
    Balaji

    Hi Gaurav,
    Thanks for the replay , here for table switcher how can we differienciate between the message text and lov ,to capture lov values i have searched alot, here is my code.
    In process from request.
    OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(oawebbean);
         OATableBean tb = (OATableBean)oawebbean.findIndexedChildRecursive("EamRetMaterialToInvDetail");
         OASwitcherBean SwitcherRN=(OASwitcherBean)oawebbean.findChildRecursive("EamMaterial");
         if(SwitcherRN!=null)
    // id EamAddNewMaterial
    if (pageContext.getParameter("EamAddNewMaterial")!=null)
    if(pageContext.isLovEvent())
    if("lovValidate".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)) || "lovUpdate".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM))||"lovPrepare".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
    String lovInputSourceId = (String)pageContext.getLovInputSourceId();
    if("EamMaterialName".equals(lovInputSourceId))
    /*String workorderID = null;
    String lovInput = (String) lovBean.getValue(pageContext);
    OAMessageLovInputBean lovBean=(OAMessageLovInputBean)oawebbean.findChildRecursive("EamMaterialName"); */
    // pageContext.writeDiagnostics(this,"After : "+pageContext.getParameter("EamAddNewMaterial"),4);
    pageContext.writeDiagnostics(this, "Vamsi: LOV caught", 4);
    Can you please sugget me

  • Complex Logic Account

    Good Evening,
    I'm trying to build a complex logic account to aggregate (sum) all my account with "ASSET" in UD9 field.
    I set:
    Dimension | Criteria Type | Criteria Value | Group By | Group Level
    UD9 | In | ASSET | | 0
    Operator: + | NA
    And it retrieves right values, but without sum.
    How can I solve?
    Thanks Francesco

    What is it doing then. Is it producing a logic account for every account wich is tagged asset?
    If something like the above is true you need to add criteria to group the other dimensions you are not interested in splitting the aggreagted value across, for example
    If you had the following dimensions Dim1, Dim2, Dim3, Dim4 and wanted to get the aggregate of all imported values where Dim4=ASSET you would need the following criteria in your logic group
    DIMENSION CRITERIATYPE CTRITERIAVALUE GROUPBY GROUPLEVEL
    Dim1 In * L_Dim1 0
    Dim2 In * L_Dim2 0
    Dim3 In * L_Dim3 0
    Dim4 In ASSET 0
    That should give you one output line L_Dim1|L_Dim2|L_Dim3|ASSET|Aggregated Amount
    Hope that makes sense :)
    Edited by: SH on May 11, 2011 5:43 PM

  • Generate Data Basis

    Hi,
    I have no idea why my "Generate Data Basis" button is gray. I have set it into mode ="Change" and not "Display"
    Appreciate any help.
    Thanks.

    Generate Databasis Button

Maybe you are looking for

  • Have no wifi on a 4s have reset network connections but still not working, any clues?

    HHave no wifi on a 4s already rest network but still no good.

  • Transfer of Files

    My Mac is: Hardware Overview: Machine Name: Power Mac G4 [Digital Audio] Machine Model: PowerMac3,4 CPU Type: PowerPC G4 (2.9) Number Of CPUs: 1 CPU Speed: 533 MHz L2 Cache (per CPU): 1 MB Memory: 640 MB Bus Speed: 133 MHz Boot ROM Version: 4.2.8f1 S

  • Make use of established database connection

    From within an application in the Application Navigation, I have successfully established a connection to a database which is on another host machine. The steps are: right-click on the name of the application > select New > Database Tier > Database C

  • AIR iOS URL Scheme

    I'm developing an AIR for iOS app for my client to run on an iPad, and my app needs to be able to launch other apps using a URL scheme, and also to be launched by another app, by receiving a URL scheme from it. From what I have read, it would appear

  • How to save Camera Raw image as JPEG

    I have opened a jpeg as Camera Raw (7.3) and adjusted it and wanted to save it as jpeg, but the only option is *.dng? Any ideas? Thanks