Finding the row index of a value in a JTable ..

I have a JTable with one of its column containing a list of "unique names" Strings ....
example:
column1 | column2
name1 | val1
name2 | val2
I want to create a method which returns me the line number of a name...:
public int rowIndex(String name)
return line;// The line where the String name is found...
any help ?

Well, its not really efficient but it should do it:
traverse the rows with for and get the value with getValueAt (row, column). At every iteration you test if the specified value is found.
hope it helps
Leander Eyer

Similar Messages

  • [svn:fx-trunk] 5002: Fix up the lookup in DataGroup when finding the appropriate index in the dataProvider given a particular renderer .

    Revision: 5002
    Author:   [email protected]
    Date:     2009-02-18 16:33:42 -0800 (Wed, 18 Feb 2009)
    Log Message:
    Fix up the lookup in DataGroup when finding the appropriate index in the dataProvider given a particular renderer. With this fix, we now correctly support FxLists's displaying and interacting correctly with duplicate items in the dataProvider, a la:
            Flex
            Flex
            Flex
    The lookup now goes through the itemToRenderer data structure which holds the on-screen renderers.
    Reviewer: Ryan
    Tests: Checkin, yes. Mustella tests: DataGroup, FxDataContainer, FxList, FxButtonBar pass.
    QA: Yes, lets get tests for this added to FxList testsuite
    Doc: No
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • Module pool ---Problem in finding the line index for the table control

    Hi Friends,
    I am working in Module pool programming.
    My requirement is when i select any record on the lead selection I need to find out the index of the line on which  row i have selected.
    Could any one please suggest me the proper solution how to get the line index for the table control in module pool programming.
    Thanks
    Satish Raju

    Hi Raju,
    Follow the steps
    <li>U should take one variable in your internal table or in structure which is used for table control fields.
          DATA :BEGIN OF itab OCCURS 0 ,
                mark TYPE c ,
                matnr LIKE mara-matnr ,
                matkl LIKE mara-matkl,
                maktx LIKE makt-maktx,
            END OF itab .
       controls: tabc types tableview using screen 100.
    <li>This mark variable should be given in Table control properties. follow the path
    double click on the table control-->attributes .->select w/SelColumn and in that give itab-mark.
    <li>Flow logic of the screen
       process before output.
         MODULE status_0100.
         LOOP AT itab with control tabc
         endloop.
       process after input.
         module cancel at exit-command.
         LOOP AT itab.
           MODULE read_table_control.
         ENDLOOP.
         MODULE user_command_0100.
    <li>read_table_control module code
         MODULE read_table_control INPUT.
         MODIFY itab INDEX tabc-current_line."this will update the itab table
                                             "mark field with 'X ' whatever we
                                             "have selected on table control
         ENDMODULE.
    <li>If you want to Delete some of the records from Table control follow this code u2026Create one pushbutton and give Fucnction code to that and write below code
       CASE okcode.
         WHEN 'DELETE'.
           LOOP AT itab WHERE mark = 'X'.
             DELETE itab.
           ENDLOOP.
       ENDCASE.
    I hope that it helps you.
    Thanks
    Venkat.O

  • Need help finding the row where BI load failed

    Hi all,
    We use an ETL tool to load data from our staging database into our production data warehouse environment. The environment is Oracle 10g Release 1 on Red Hat Enterprise Linux Server. The ETL tool is Business Objects Data Integrator. At hand the issue is that the data load failed due to an Oracle error
    ORA-12899: value too large for column
    When I examined the table definition in question, the load fails on one of the table columns in staging since the column is a VARCHAR2 with length of 5 and the ETL load wants to load a value for the table of length 13.
    One possible solution is to change the column definition to accomodate the data load. However, since this is a production system, I cannot do this right now.
    Is there a method to find exactly what row it failed on during the ETL load for the table in question?
    Thanks!
    B. Scott

    1) Yes, DML error logging is nice feature but it is New Feature in Oracle Database 10g Release 2.
    2) Some tools (e.g. Oracle Warehouse Builder) enable you to run your "mappping" (ETL job) in 2 modes - set based (single transaction INS/UPD/DEL/MERGE) or in row based mode (PL/SQL loop, row by row processing). OWB even enables failover mode (I failed in set-based mode, let's failover to row-based mode to find out where is the problem; the errors will be reported in log; you can set maximum number of errors before the mapping terminates with failure status).
    3) If you do not have this functionality in your tool than I suggest: Try to understand the transformation and investigate the source data. You can usually find the culprit in the source data. Sometimes you can even extract the SQL behind the transformation and run CTAS (create table as select) and find the exceptions.
    Regards,
    Pavel

  • How to find the row being deleted in a Tabular Form?

    version 3.2.1
    How do I find out what row is being deleted in a Tabular Form (SQL Query (updateable report) )?
    I have a process to delete records from another table when the record in the report is deleted. I need to capture the primary key to pass to the process that deletes the record from the other table.
    Thanks,
    Joe

    Hm,
    The best thing is to do this using triggers before delete. Looping through the list of checked checkboxes is not an optimal solution. If the standard MRD process fails for whatever reason, your delete process for the rows in the other table will still delte the records with the selected primary key.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • SQL to find grouped rows which have changed values?

    Hi,
    I am wondering if there is an efficient pure SQL way to do this...?
    I have a table that has a number of columns:
    InsertionDate
    Indentity
    Col-a to Col-z - some data.
    the pair (InsertionDate, Identity) are unique.
    The rows represent the same values as they change over time, for example:
    Select * from <mytable> order by Identity, InsertionDate;
    InsertionDate Identity Balance
    10-Feb-01 1001 -100
    11-Feb-01 1001 1
    12-Feb-01 1001 50
    10-Feb-01 1002 10
    11-Feb-01 1002 10
    12-Feb-01 1002 76
    I want to do the following:
    Select from <mytable> where InsertionDate and the next InsertionDate have a different value for Balance 'grouped by' Identity and InsertionDate = "10-Feb-01";
    [I use 'grouped by' very cautiously - I cannot explain in "pseudo sql"  without using the misleading grouped by term]
    To produce the output:
    InsertionDate Identity Balance
    10-Feb-01 1001 -100
    11-Feb-01 1001 1
    Select from <mytable> where InsertionDate and the next InsertionDate have a different value for Balance 'grouped by' Identity and InsertionDate = "11-Feb-01";
    InsertionDate Identity Balance
    11-Feb-01 1001 1
    12-Feb-01 1001 50
    11-Feb-01 1002 10
    12-Feb-01 1002 76
    There may be many columns in addition to Balance which also need to be checked for changes.
    Cheers,
    Karl.

    Hi, Karl,
    One way is to self-join two copies of the table, so you can compare any number of columns from adjacent rows.
    For example:
    WITH     got_r_num     AS
         SELECT     insertiondate, identity, balance
         ,     ROW_NUMBER () OVER ( PARTITION BY  identity
                                   ORDER BY          insertiondate
                           ) AS r_num
         FROM     mytable
    SELECT     a.insertiondate, a.identity, a.balance
    FROM     got_r_num      a
    JOIN     got_r_num      b     ON     a.identity     = b.identity
                         AND     a.r_num          IN ( b.r_num + 1
                                              , b.r_num - 1
    WHERE     a.balance     != b.balance
    AND     TO_DATE ( '11-Feb-2001'     -- Use a bind variable if you don't want to hard-code this parameter
              , 'DD-Mon-YYYY'
              ) = LEAST ( a.insertiondate
                         , b.insertiondate
    ORDER BY  identity
    ,            insertiondate
    ;Here, table a is the one to be displayed, and table b contains either the previous or the next row with the same identity.
    By the way, whenever you post a question, it really helps if you provide the sample data in a form that people can use to re-create the problem and test their solutions. CREATE TABLE and INSERT statements are best, for example:
    CREATE TABLE     mytable
    (      insertiondate     DATE
    ,      identity          NUMBER (4)
    ,      balance                 NUMBER
    INSERT INTO mytable (insertiondate, identity, balance) VALUES (TO_DATE ('10-Feb-2001', 'DD-Mon-YYYY'), 1001, -100);
    INSERT INTO mytable (insertiondate, identity, balance) VALUES (TO_DATE ('11-Feb-2001', 'DD-Mon-YYYY'), 1001, 1);
    INSERT INTO mytable (insertiondate, identity, balance) VALUES (TO_DATE ('12-Feb-2001', 'DD-Mon-YYYY'), 1001, 50);
    INSERT INTO mytable (insertiondate, identity, balance) VALUES (TO_DATE ('10-Feb-2001', 'DD-Mon-YYYY'), 1002, 10);
    INSERT INTO mytable (insertiondate, identity, balance) VALUES (TO_DATE ('11-Feb-2001', 'DD-Mon-YYYY'), 1002, 10);
    INSERT INTO mytable (insertiondate, identity, balance) VALUES (TO_DATE ('12-Feb-2001', 'DD-Mon-YYYY'), 1002, 76);
    COMMIT;I'm not sure what you mean by "There may be many columns in addition to Balance which also need to be checked for changes."
    Why not post an example that has 1 or 2 columns like balance, and the results you want for that.
    At first, this problem sounds like a job for the analytic LAG and/or LEAD functions, but depending on your answer to the last question, that may be very tedious: you'd need a separate function call (maybe even two) for each column, because a function can only return one value, but a join gets all the values at once.
    Edited by: Frank Kulash on Jun 11, 2010 10:43 AM

  • How to find the difference between 2 time values in Java

    hi all,
    i have 2 time values
    String time1="6:20";
    String time2="21:30"
    How to find the difference between 2 times in Java?
    pls help
    thanx in advance....

    Calculating Java dates: Take the time to learn how to create and use dates
    Working in Java time: Learn the basics of calculating elapsed time in Java
    Formatting a Date Using a Custom Format
    Parsing a Date Using a Custom Format

  • How can I find the maximum of two enum values?

    I have a set of enum values (let's call then ONE, TWO, THREE.....). I want to find the larger of two of them. But max(ONE,THREE) gives a compile error as MAX isn't defined for type-safe enums. Fair enough.
    I also agree that one shouldn't be able to use arithmetic functions on enums.
    But as Enum implements Comparable, one can write a function which implements max and min, rather inefficiently I assume.
    Is there a better way of getting the max/min of an enum? And if not, can the Java team be persuaded to implement it?

    I have a set of enum values (let's call then ONE, TWO, THREE.....). I want to find the larger of two of them. But max(ONE,THREE) gives a compile error as MAX isn't defined for type-safe enums. Fair enough.
    I also agree that one shouldn't be able to use arithmetic functions on enums.
    But as Enum implements Comparable, one can write a function which implements max and min, rather inefficiently I assume.
    Is there a better way of getting the max/min of an enum? And if not, can the Java team be persuaded to implement it?
    The first place you should look for ANY basic question about Java classes is the documentation.
    http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html#compareTo(E)
    Why do you need a MAX method? You said you are only comparing TWO objects and you also say you know that 'Enum implements Comparable.
    So just compare the two enums. The Enum class supports the 'compareTo(E o)' method as the doc API shows.

  • How to find the list of org .field values in sap

    Hi,
    I need a list of org files values .
    example : I want to know ...
    Plant= WERKS,Cost Center=KOSTL.
    similarly I need the list of all org. values.
    what is the table name?
    Thanks in advance
    SR
    Message was edited by:
            sunny raj

    My apologies.....
    I need the list of non org filed values with the description
    example..
    BEGRU     Authorization group
    BSART     Order type
    BWART     Movement type (inventory management)
    I have already down loaded org filed values from USVAR table as Ben said.
    Thanks,
    sr
    null

  • How to write multi row sub query with the row containing range of values?

    Hi all,
    I have to include a column which contains weight ranges and it should come fom table called "report_range_parameters"
    The following query will reutrn those weight ranges.
    select report_parameter_min_value || ' -> ' || report_parameter_max_value
              from report_range_parameters
             WHERE report_range_parameters.report_parameter_id = 2359
               and report_range_parameters.report_parameter_group = 'GVW_GROUP'
               and report_range_parameters.report_parameter_name  = 'GVW_NAME'
                        The below query should return the values group by those weight ranges.
    How could I write that sub query?
    select   SUM(NVL("Class 0", 0)) "Class 0"  ,
                SUM(NVL("Class 1", 0)) "Class 1"  ,
                SUM(NVL("Class 2", 0)) "Class 2"  ,
                SUM(NVL(" ", 0)) "Total"
         FROM (
                 SELECT report_data.bin_start_date_time start_date_time,
                        SUM(DECODE(report_data.gvw, 0, report_data.gvw_count, 0)) "Class 0" ,
                        SUM(DECODE(report_data.gvw, 1, report_data.gvw_count, 0)) "Class 1" ,
                        SUM(DECODE(report_data.gvw, 2, report_data.gvw_count, 0)) "Class 2" ,
                        SUM(NVL(report_data.gvw_count, 0)) " "
                  FROM report_data
                 GROUP BY report_data.bin_start_date_time
              ) results
       RIGHT OUTER JOIN tmp_bin_periods
                     ON results.start_date_time >= tmp_bin_periods.bin_start_date_time
                    AND results.start_date_time <  tmp_bin_periods.bin_end_date_time
               GROUP BY tmp_bin_periods.bin_start_date_time,
                        tmp_bin_periods.bin_end_date_time Thanks.
    Edited by: user10641405 on Jun 15, 2009 3:14 PM
    Edited by: user10641405 on Jun 15, 2009 3:17 PM

    Hi,
    Assuming the following 4 things:
    (1) report_range_parameters contains data like this, from your [previous thread|http://forums.oracle.com/forums/message.jspa?messageID=3541079#3541079]
    id  group      name         min_value      max_value
    1   gvw_group  gvw_name      0              5
    2   gvw_group  gvw_name      5              10
    3   gvw_group  gvw_name     10              15(2) max_value is actually outside the range (that is, a value of exactly 5.000 is counted in the '5->10' range, not the '0->5' range)
    (3) the range has to match some column x that is in one of the tables in your main query
    (4) You want to add that column x to the GROUP BY clause
    then you shopuld do somehting like this:
    select   SUM(NVL("Class 0", 0)) "Class 0"  ,
                SUM(NVL("Class 1", 0)) "Class 1"  ,
                SUM(NVL("Class 2", 0)) "Class 2"  ,
                SUM(NVL(" ", 0)) "Total"
    ,         report_parameter_min_value || ' -> ' || report_parameter_max_value     AS weight_range          -- New
         FROM (
                 SELECT report_data.bin_start_date_time start_date_time,
                        SUM(DECODE(report_data.gvw, 0, report_data.gvw_count, 0)) "Class 0" ,
                        SUM(DECODE(report_data.gvw, 1, report_data.gvw_count, 0)) "Class 1" ,
                        SUM(DECODE(report_data.gvw, 2, report_data.gvw_count, 0)) "Class 2" ,
                        SUM(NVL(report_data.gvw_count, 0)) " "
                  FROM report_data
                 GROUP BY report_data.bin_start_date_time
              ) results
       RIGHT OUTER JOIN tmp_bin_periods
                     ON results.start_date_time >= tmp_bin_periods.bin_start_date_time
                    AND results.start_date_time <  tmp_bin_periods.bin_end_date_time
       LEFT OUTER JOIN  report_range_parameters                                        -- New
                    ON  x >= report_parameter_min_value                                    -- New
              AND x <  report_parameter_max_value                                   -- New
                    AND report_range_parameters.report_parameter_id = 2359                         -- New
                    and report_range_parameters.report_parameter_group = 'GVW_GROUP'               -- New
                    and report_range_parameters.report_parameter_name  = 'GVW_NAME'                    -- New
               GROUP BY tmp_bin_periods.bin_start_date_time,
                        tmp_bin_periods.bin_end_date_time
                  , x                                                       -- New

  • How to find the row conunt in 11g

    In 9i we are getting this output for this qurey but the same is not displaying the row count in 11g, pls help...
    in 9i
    ====
    SQL> select
    2 table_name,
    3 num_rows counter
    4 from
    5 dba_tables
    6 where
    7 owner='YM_MH'
    8 order by
    9 table_name;
    TABLE_NAME COUNTER
    A 53962
    AD 2140692
    ADF 2229347
    ADF_DPTR 4561305
    ADR 139654647
    ADVDC 0
    in 11g
    ====
    SQL> select
    2 table_name,
    num_rows counter 3
    4 from
    5 dba_tables
    6 where
    7 owner='YM_MH'
    8 order by
    9 table_name;
    TABLE_NAME COUNTER
    A
    AD
    ADF
    ADF_DPTR
    ADR

    num_rows is the statistics count. have the tables been analyzed?
    analyze the schema and rerun
    exec DBMS_STATS.GATHER_SCHEMA_STATS (ownname =>'YM_MH')

  • Finding the multiple indexes of a same value

    Hi
    I have one query,i have 2 main arraylists one arraylist consists of all the indexvalues with the duplicate values and another arraylist consists all the index values without duplicate values.now if i want to find an index of a specified indexvalue from the duplicate arraylist how can i perform,,, here is the example
    MAIN chkList size IS HERE::::::::100
    MAIN chkList IS HERE::::::::[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1
    5, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 1, 2, 3, 4, 14, 15, 16, 17, 18, 19, 2
    0, 5, 6, 21, 22, 23, 24, 25, 1, 2, 7, 8, 9, 10, 11, 3, 4, 5, 6, 7, 8, 9, 10, 11,
    12, 13, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 1, 2, 3, 4, 5,
    6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
    uniqueIndexList size IS HERE::::::::100
    uniqueIndexList IS HERE::::::::[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1
    4, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 3
    4, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 5
    4, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 7
    4, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 9
    4, 95, 96, 97, 98, 99]
    for example in the above if you see the value 24 in MAIN chkList it is repeating 4 times... but i wanted to keep this into a new arraylist like it should be arraylist of arraylist like if i request 24 from the new arraylist then i should get the all the indexvalues list for that search criteria.
    how can i do this,plz help me,i am new to this
    regards
    rao

    Tell us more. What ideas have you had yourself? What do you think is right or wrong about the ideas? Have you tried anything? If so, tell us, provide the code if it's not too voluminous, even if it's far from working. Noone can guide you if all we know about where you stand is "i am new to this".

  • Column is summing up all the rows and displaying same value in all rows.

    Hi,
    Kindly see the below query. I have a problem in this query to fetch the abs_qty when the parameter P:item ie)msib.segment1 is not given as the input parameter. Its just summing up the entire quantity for all the items.When I pass P:item ie)msib.segment1 as input parameter, It fetches the exact value for abs_qty. Kindly help me to resolve this.
    Note only : Manufacturing plant ,Start date and End Date are Mandatory(required) parameters. Others like Item,Base Model and Planner code are optional.
    SELECT mmt.transaction_date date_produced, msib.segment1 item,
    cic.cost_type_id, msib.description item_description,
    mc.segment6 base_model, mc.segment7 trade_brand,
    mmt.subinventory_code subinventory,
    mil.segment1 || '.' || mil.segment2 || '.' || mil.segment3 LOCATOR,
    ood.organization_code
    || '-'
    || ood.organization_name manufacturing_plant,
    mmt.transaction_quantity quantity_produced,
    mtt.transaction_type_name transaction_type, msib.inventory_item_id,
    msib.organization_id, cic.material_cost COST,
    cic.material_overhead_cost freight, csc.standard_cost,
    *(select (NVL((SELECT SUM (mmt.transaction_quantity) total_NET_qty*
    FROM mtl_material_transactions mmt,
    mtl_system_items_b msib,
    mtl_transaction_types mtt,
    org_organization_definitions ood,
    mtl_txn_source_types mts
    WHERE mmt.organization_id = msib.organization_id
    AND msib.inventory_item_id = mmt.inventory_item_id
    AND mmt.transaction_type_id = mtt.transaction_type_id
    AND mmt.organization_id = ood.organization_id
    AND mtt.transaction_type_name = 'WIP Completion'
    AND mts.transaction_source_type_name = 'Job or Schedule'
    AND msib.segment1 = NVL (:p_item, msib.segment1)
    AND ood.organization_code = :p_manufacturing_plant
    AND TRUNC (mmt.transaction_date) BETWEEN :p_start_date
    AND :p_end_date ),0)
    *(NVL((SELECT SUM (mmt.transaction_quantity) total_NET_qty*
    FROM mtl_material_transactions mmt,
    mtl_system_items_b msib,
    mtl_transaction_types mtt,
    org_organization_definitions ood,
    mtl_txn_source_types mts
    WHERE mmt.organization_id = msib.organization_id
    AND msib.inventory_item_id = mmt.inventory_item_id
    AND mmt.transaction_type_id = mtt.transaction_type_id
    AND mmt.organization_id = ood.organization_id
    AND mtt.transaction_type_name = 'WIP Issue'
    AND mts.transaction_source_type_name = 'Job or Schedule'
    AND msib.segment1 = NVL (:p_item, msib.segment1)
    AND ood.organization_code = :p_manufacturing_plant
    AND TRUNC (mmt.transaction_date) BETWEEN :p_start_date
    AND :p_end_date
    *),0))) abs_qty from dual) AS ABS_qtyy,*(select (NVL((SELECT SUM (mmt.transaction_quantity) total_NET_qty
    FROM mtl_material_transactions mmt,
    mtl_system_items_b msib,
    mtl_transaction_types mtt,
    org_organization_definitions ood,
    mtl_txn_source_types mts
    WHERE mmt.organization_id = msib.organization_id
    AND msib.inventory_item_id = mmt.inventory_item_id
    AND mmt.transaction_type_id = mtt.transaction_type_id
    AND mmt.organization_id = ood.organization_id
    AND mtt.transaction_type_name = 'WIP Completion'
    AND mts.transaction_source_type_name = 'Job or Schedule'
    AND msib.segment1 = NVL (:p_item, msib.segment1)
    AND ood.organization_code = :p_manufacturing_plant
    AND TRUNC (mmt.transaction_date) BETWEEN :p_start_date
    AND :p_end_date ),0)
    (NVL((SELECT SUM (mmt.transaction_quantity) total_NET_qty
    FROM mtl_material_transactions mmt,
    mtl_system_items_b msib,
    mtl_transaction_types mtt,
    org_organization_definitions ood,
    mtl_txn_source_types mts
    WHERE mmt.organization_id = msib.organization_id
    AND msib.inventory_item_id = mmt.inventory_item_id
    AND mmt.transaction_type_id = mtt.transaction_type_id
    AND mmt.organization_id = ood.organization_id
    AND mtt.transaction_type_name = 'WIP Issue'
    AND mts.transaction_source_type_name = 'Job or Schedule'
    AND msib.segment1 = NVL (:p_item, msib.segment1)
    AND ood.organization_code = :p_manufacturing_plant
    AND TRUNC (mmt.transaction_date) BETWEEN :p_start_date
    AND :p_end_date
    ),0))) abs_qty from dual)*csc.standard_cost AS abs_val
    FROM mtl_material_transactions mmt,
    mtl_system_items_b msib,
    mtl_item_locations mil,
    mtl_transaction_types mtt,
    org_organization_definitions ood,
    mtl_txn_source_types mts,
    mtl_categories mc,
    mtl_item_categories mic,
    mtl_category_sets mcs,
    cst_item_costs cic,
    cst_standard_costs csc,
    cst_cost_types ct,
    mfg_lookups mlo
    WHERE mmt.organization_id = msib.organization_id
    AND msib.inventory_item_id = mmt.inventory_item_id
    AND mmt.locator_id = mil.inventory_location_id
    AND mil.organization_id = msib.organization_id
    AND mil.subinventory_code = mmt.subinventory_code
    AND mmt.transaction_type_id = mtt.transaction_type_id
    AND msib.organization_id = ood.organization_id
    AND mic.category_set_id = mcs.category_set_id
    AND mc.category_id = mic.category_id
    AND mc.structure_id = mcs.structure_id
    AND mic.inventory_item_id = msib.inventory_item_id
    AND mic.organization_id = msib.organization_id
    AND mcs.category_set_id = 52487965
    AND msib.inventory_item_id = cic.inventory_item_id
    AND msib.organization_id = cic.organization_id
    AND ct.cost_type_id = cic.cost_type_id
    AND cic.organization_id = ood.organization_id
    AND mil.inventory_location_id = mmt.locator_id
    AND mmt.transaction_source_type_id = mtt.transaction_source_type_id
    AND mmt.transaction_action_id = mtt.transaction_action_id
    AND mmt.transaction_source_type_id = mts.transaction_source_type_id
    AND mmt.transaction_action_id = mlo.lookup_code
    AND mmt.inventory_item_id = csc.inventory_item_id
    AND mmt.organization_id = csc.organization_id
    AND csc.last_update_date >=
    (SELECT MAX (csc1.last_update_date)
    FROM cst_standard_costs csc1
    WHERE csc1.inventory_item_id = mmt.inventory_item_id
    AND csc1.organization_id = mmt.organization_id)
    AND msib.segment1 = NVL (:p_item, msib.segment1)
    AND NVL (mc.segment6, 'X') = NVL (:p_base_model, NVL (mc.segment6, 'X'))
    AND NVL (msib.planner_code, 'Y') =
    NVL (:p_planner_code, NVL (msib.planner_code, 'Y'))
    AND UPPER (mlo.meaning) = 'ASSEMBLY COMPLETION'
    AND mtt.transaction_type_name = 'WIP Completion'
    AND ct.cost_type = 'Frozen'
    AND mts.transaction_source_type_name = 'Job or Schedule'
    AND ood.organization_code = :p_manufacturing_plant
    AND TRUNC (mmt.transaction_date) BETWEEN :p_start_date AND :p_end_date

    If <tt>abs_qty</tt> and consequently <tt>abs_val</tt> should not be the same for all rows returned, you'll have to rewrite your query so that the <tt>abs_qty</tt> won't be computed in isolation (separately) with no interaction with data from the main from table list.
    Your query is treated the same as the one below (note the changed table aliases by appending numbers to the originals of yours)
    SELECT mmt.transaction_date date_produced,
           msib.segment1 item,
           cic.cost_type_id,
           msib.description item_description,
           mc.segment6 base_model,
           mc.segment7 trade_brand,
           mmt.subinventory_code subinventory,
           mil.segment1 || '.' || mil.segment2 || '.' || mil.segment3 LOCATOR,
           ood.organization_code || '-' || ood.organization_name manufacturing_plant,
           mmt.transaction_quantity quantity_produced,
           mtt.transaction_type_name transaction_type,
           msib.inventory_item_id,
           msib.organization_id,
           cic.material_cost COST,
           cic.material_overhead_cost freight,
           csc.standard_cost,
           (select (NVL(
                        (SELECT SUM (mmt1.transaction_quantity) total_NET_qty
                           FROM mtl_material_transactions mmt1,
                                mtl_system_items_b msib1,
                                mtl_transaction_types mtt1,
                                org_organization_definitions ood1,
                                mtl_txn_source_types mts1
                          WHERE mmt1.organization_id = msib1.organization_id
                            AND msib1.inventory_item_id = mmt1.inventory_item_id
                            AND mmt1.transaction_type_id = mtt1.transaction_type_id
                            AND mmt1.organization_id = ood1.organization_id
                            AND mtt1.transaction_type_name = 'WIP Completion'
                            AND mts1.transaction_source_type_name = 'Job or Schedule'
                            AND msib1.segment1 = NVL (:p_item, msib1.segment1)
                            AND ood1.organization_code = :p_manufacturing_plant
                            AND TRUNC (mmt1.transaction_date) BETWEEN :p_start_date AND :p_end_date
                        ),0
                       ) - NVL(
                               (SELECT SUM (mmt2.transaction_quantity) total_NET_qty
                                  FROM mtl_material_transactions mmt2,
                                       mtl_system_items_b msib2,
                                       mtl_transaction_types mtt2,
                                       org_organization_definitions ood2,
                                       mtl_txn_source_types mts2
                                 WHERE mmt2.organization_id = msib2.organization_id
                                   AND msib2.inventory_item_id = mmt2.inventory_item_id
                                   AND mmt2.transaction_type_id = mtt2.transaction_type_id
                                   AND mmt2.organization_id = ood.2organization_id
                                   AND mtt2.transaction_type_name = 'WIP Issue'
                                   AND mts2.transaction_source_type_name = 'Job or Schedule'
                                   AND msib2.segment1 = NVL (:p_item, msib2.segment1)
                                   AND ood2.organization_code = :p_manufacturing_plant
                                   AND TRUNC (mmt.2transaction_date) BETWEEN :p_start_date AND :p_end_date
                               ),0
                   ) abs_qty
              from dual
           ) AS ABS_qtyy,
           (select (NVL(
                        (SELECT SUM (mmt3.transaction_quantity) total_NET_qty
                           FROM mtl_material_transactions mmt3,
                                mtl_system_items_b msib3,
                                mtl_transaction_types mtt3,
                                org_organization_definitions ood3,
                                mtl_txn_source_types mts3
                          WHERE mmt3.organization_id = msib3.organization_id
                            AND msib3.inventory_item_id = mmt3.inventory_item_id
                            AND mmt3.transaction_type_id = mtt3.transaction_type_id
                            AND mmt3.organization_id = ood3.organization_id
                            AND mtt3.transaction_type_name = 'WIP Completion'
                            AND mts3.transaction_source_type_name = 'Job or Schedule'
                            AND msib3.segment1 = NVL (:p_item, msib3.segment1)
                            AND ood3.organization_code = :p_manufacturing_plant
                            AND TRUNC (mmt3.transaction_date) BETWEEN :p_start_date AND :p_end_date
                        ),0
                       ) - NVL(
                               (SELECT SUM (mmt4.transaction_quantity) total_NET_qty
                                  FROM mtl_material_transactions mmt4,
                                       mtl_system_items_b msib4,
                                       mtl_transaction_types mtt4,
                                       org_organization_definitions ood4,
                                       mtl_txn_source_types mts4
                                 WHERE mmt4.organization_id = msib4.organization_id
                                   AND msib4.inventory_item_id = mmt4.inventory_item_id
                                   AND mmt4.transaction_type_id = mtt4.transaction_type_id
                                   AND mmt4.organization_id = ood4.organization_id
                                   AND mtt4.transaction_type_name = 'WIP Issue'
                                   AND mts4.transaction_source_type_name = 'Job or Schedule'
                                   AND msib4.segment1 = NVL (:p_item, msib4.segment1)
                                   AND ood4.organization_code = :p_manufacturing_plant
                                   AND TRUNC (mmt4.transaction_date) BETWEEN :p_start_date AND :p_end_date
                               ),0
                   ) abs_qty
              from dual
           ) * csc.standard_cost AS abs_val
      FROM mtl_material_transactions mmt,
           mtl_system_items_b msib,
           mtl_item_locations mil,
           mtl_transaction_types mtt,
           org_organization_definitions ood,
           mtl_txn_source_types mts,
           mtl_categories mc,
           mtl_item_categories mic,
           mtl_category_sets mcs,
           cst_item_costs cic,
           cst_standard_costs csc,
           cst_cost_types ct,
           mfg_lookups mlo
    WHERE mmt.organization_id = msib.organization_id
       AND msib.inventory_item_id = mmt.inventory_item_id
       AND mmt.locator_id = mil.inventory_location_id
       AND mil.organization_id = msib.organization_id
       AND mil.subinventory_code = mmt.subinventory_code
       AND mmt.transaction_type_id = mtt.transaction_type_id
       AND msib.organization_id = ood.organization_id
       AND mic.category_set_id = mcs.category_set_id
       AND mc.category_id = mic.category_id
       AND mc.structure_id = mcs.structure_id
       AND mic.inventory_item_id = msib.inventory_item_id
       AND mic.organization_id = msib.organization_id
       AND mcs.category_set_id = 52487965
       AND msib.inventory_item_id = cic.inventory_item_id
       AND msib.organization_id = cic.organization_id
       AND ct.cost_type_id = cic.cost_type_id
       AND cic.organization_id = ood.organization_id
       AND mil.inventory_location_id = mmt.locator_id
       AND mmt.transaction_source_type_id = mtt.transaction_source_type_id
       AND mmt.transaction_action_id = mtt.transaction_action_id
       AND mmt.transaction_source_type_id = mts.transaction_source_type_id
       AND mmt.transaction_action_id = mlo.lookup_code
       AND mmt.inventory_item_id = csc.inventory_item_id
       AND mmt.organization_id = csc.organization_id
       AND csc.last_update_date >= (SELECT MAX (csc1.last_update_date)
                                      FROM cst_standard_costs csc1
                                     WHERE csc1.inventory_item_id = mmt.inventory_item_id
                                       AND csc1.organization_id = mmt.organization_id
       AND msib.segment1 = NVL (:p_item, msib.segment1)
       AND NVL (mc.segment6, 'X') = NVL (:p_base_model, NVL (mc.segment6, 'X'))
       AND NVL (msib.planner_code, 'Y') = NVL (:p_planner_code, NVL (msib.planner_code, 'Y'))
       AND UPPER (mlo.meaning) = 'ASSEMBLY COMPLETION'
       AND mtt.transaction_type_name = 'WIP Completion'
       AND ct.cost_type = 'Frozen'
       AND mts.transaction_source_type_name = 'Job or Schedule'
       AND ood.organization_code = :p_manufacturing_plant
       AND TRUNC (mmt.transaction_date) BETWEEN :p_start_date AND :p_end_dateRegards
    Etbin

  • Where do I find the TRUE or FALSE boolean value?

    I'm doing a program that displays the operation of global variable. I'm suppose to put a TRUE or FALSE boolean value and I can't find it. Please help.

    You can't find an indicator for the front panel or you can't find a Boolean constant to put on your diagram? You've got Boolean palettes for both front panel and diagram. Everything you need should be on one of the palettes. If that's not it, could you explain your problem in greater detail?

  • Get the row index by clicking on a link in a table

    Hi,
    I am using a table to display a product catalog in Web Dynpro ABAP.
    The user should be able to click on any material number (link) in the table to get a detail view of this material.
    How do I get back the table line, the user has clicked to show him a detail-view?
    Thanks a lot for your help.
    Reagards.

    Hi,
    To get the details of complete row,
    Data lo_nd_products type ref to if_wd_context_node.
    Data lo_el_products type ref to if_wd_context_element.
    Data ls_products type wd_this->Element_products.
    data ld_material type string.
    lo_nd_products = wd_context->get_child_node( name = wd_this->wdctx_node ).
    lo_el_products = lo_nd_products->get_element( ).
    lo_el_products = wd_event->get_context_element( name = 'CONTEXT_ELEMENT' ).
    lo_nd_products->set_lead_selection( Exproting element = lo_el_products ).
    lo_el_products->get_static_attributes( importing static_attributes = ls_products ). "ls_products contain selected row content.
    ld_material = ls_products-material. "To get selected material number
    Regards
    Vasundhara

Maybe you are looking for

  • Why do all my JPEGs turn into PDFs? I can't do anything!

    The craziest thing keeps happening in Elements 10. Every JPG file I open seems to turn into a PDF file so I can's resize or print! I'm used to Photoshop 5.0 and Elements is new to me. Any help appreciated. Thanks.

  • How to integrate OPS 12c with EM cloud control 12c

    As title. We checked the documents of OPS 12c and didn't find a way to integrate OPS 12c enterprise controller with EM cloud control 12c. Is it ready now? Where can we download a separate opar for OMS? Any official documents we can reference? Regards

  • How to set date +120 daye to one date field

    Hi, I have 2 fields one is Close date(Item style is Message Layout) and Quote Valid Until(Item Style is Date Field).After opening the page Close date will come automatically. Now My requirement is need to put Close date+120 days to Quote Valid unti f

  • Error:ejb package does not exist

    I seem to be having a problem with recognizing my EJB packages. I tried putting some quick & dirty java code directly into a jsp to see if I can use the EJB correctly. I keep getting compile errors that the package is not there: testEJB_jsp.java:8: p

  • Problem on "This entry already exists in the following table (OCFT)"?

    I add  an Journal Entry with DI API in an addon solution, and insert the cash flow table OCFT with the sql automatically if the Journal Entry need the cash flow information. But when I add a new Journal Entry manually, the system show an error mesage