Updating data from multiple rows in a table view

Hello,
so far in my OAF programming, I have always selected one particular row from a table and saved from it. Now I have a requirement where in my table, fields from more than one row shall have to be updated.
Can anyone please let me know how to accomplish this.
Regards
Hawker

Hi Prince,
currently I am selecting one row from the table and rendering a region at the top of the table and capturing the user entered data with the following code:
ViewObjectVOImpl vo = getViewObjectVO1();
Row CurrentRow = vo.getCurrentRow();
//After this I perform the checks like user entered value is not null or check input as per business logic.
if(CurrentRow.getAttribute("attributeName") ==null){
//Add what message you want to display
//Add other business logic.
After making all the checks, i commit it.
getOADBTransaction().commit();
Now in my new page I am capturing the user input in the table itself like an excel sheet. Suppose there are ten rows in my advanced table on my page, and each row has one editable field. I have one save button at the bottom of the table.
Now on clicking the save button I have to capture the user input, check whether there is any null value and if all the entered data is correct then only I should commit it.
Can you please let me know how we can accomplish that.
Regards
Hawker

Similar Messages

  • Display Data from multiple models in one table

    Hi Experts,
    Is it possible to display data from multiple models in one table smltnsly.
    I have created a table dynamically.Now I would like to display data from multiple models... If this possible,can anyone give me a lead as to how to do it..
    Regards
    SU

    Hi
    Your Model Nodes be
    Model1
    ---Output_Model1
    Attrib1
    Attrib2
    Model2
    ---Output_model2
    Attrib1
    Attrib2
    and the value node is
    ValueNode
    ---Attrib1
    ---Attrib2
    Now the coding.
    int size;
    IPrivate<ViewName>.IOutput_mode1Node  node1 = wdContext.nodeOuptut_Model1();
    IPrivate<ViewName>.IValueNodeElement elem;
    size = node1.size();
    for(int i=0; i<size; i++)
       elem = wdContext.createValueNodeElement();
       elem.setAttrib1( node1.getOutput_Model1ElementAt(i).getAttrib1() );
       elem.setAttrib2( node1.getOutput_Model1ElementAt(i).getAttrib2();
       wdContext.nodeValueNode().addElement( elem );
    similar code for Model Node 2
    Regards
    Abhimanyu L

  • How to get the data from multiple nodes to one table

    Hi All,
    How to get the data from multiple nodes to one table.examples nodes are like  A B C D E relation also maintained
    Regards,
    Indra

    HI Indra,
    From Node A, get the values of the attributes as
    lo_NodeA->GET_STATIC_ATTRIBUTES(  IMPORTING STATIC_ATTRIBUTES = ls_attributesA  ).
    Similarily get all the node values from B, C, D and E.
    Finally append all your ls records to the table.
    Hope you are clear.
    BR,
    RAM.

  • Display data from multiple document Libraries in List View Webpart

    Hi All,
    I want to display data from multiple document libraries into one list view webpart(custom i have created)
    I went through the following link http://blogs.msdn.com/b/ramg/archive/2009/04/22/implementing-a-simple-cross-site-collection-list-view-webpart.aspx
    but it tells to display only from one document library.
    My motive behind displaying data in the list view webpart is to achieve the functionality of Check In ,Check Out and other OOB features.
    With Regards,
    Jaskaran Singh

    Hi,
    As there is no such OOTB feature, a workaround is to create a visual web part to gather items from libraries and implement functionalities like Check in, Check out files
    in different libraries.
    The links below will provide more details:
    Create Visual Web Parts in SharePoint
    2010
    A demo about displaying list items in visual web part:
    http://www.dotnetcodesg.com/Article/UploadFile/2/217/Web%20Part%20in%20SharePoint%20To%20Show%20All%20List%20and%20List%20Items.aspx
    About the Check In and Check Out:
    How to Check In a document programmatically
    SPFile.CheckIn method
    and SPFile.CheckOut method
    Best regards
    Patrick Liang
    TechNet Community Support

  • Collecting data from multiple rows into one column

    I'd like to run a query and put a collection of items into one output column instead of multiple rows. See the example below:
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod
    PL/SQL Release 10.2.0.5.0 - Production
    "CORE     10.2.0.5.0     Production"
    TNS for 32-bit Windows: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
         CREATE TABLE "SKIP"."INGREDIENTS"
       (     "INGRED_ID" NUMBER,
         "INGRED_NAME" VARCHAR2(20 BYTE),
         "STORES" VARCHAR2(20 BYTE)
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS" ;
    REM INSERTING into SKIP.INGREDIENTS
    Insert into SKIP.INGREDIENTS (INGRED_ID,INGRED_NAME,STORES) values (1,'SEA SALT','Food lion');
    Insert into SKIP.INGREDIENTS (INGRED_ID,INGRED_NAME,STORES) values (2,'TABLE SALT','Food lion');
    Insert into SKIP.INGREDIENTS (INGRED_ID,INGRED_NAME,STORES) values (3,'FLOUR','Piggly Wiggly');
    Insert into SKIP.INGREDIENTS (INGRED_ID,INGRED_NAME,STORES) values (4,'YEAST',null);
    Insert into SKIP.INGREDIENTS (INGRED_ID,INGRED_NAME,STORES) values (5,'BEER','ABC Store');
      CREATE TABLE "SKIP"."PRETZELS"
       (     "PRETZEL_ID" NUMBER,
         "PRETZEL_NAME" VARCHAR2(20 BYTE),
         "PRETZEL_DESC" VARCHAR2(100 BYTE)
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS" ;
    REM INSERTING into SKIP.PRETZELS
    Insert into SKIP.PRETZELS (PRETZEL_ID,PRETZEL_NAME,PRETZEL_DESC) values (1,'CLASSIC','Classic knot pretzel');
    Insert into SKIP.PRETZELS (PRETZEL_ID,PRETZEL_NAME,PRETZEL_DESC) values (2,'THICK STICK','Straight pretzel, abt 1/2" in dia');
      CREATE TABLE "SKIP"."INGRED_XREF"
       (     "PRETZEL_ID" NUMBER,
         "INGRED_ID" NUMBER
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS" ;
    REM INSERTING into SKIP.INGRED_XREF
    Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (1,1);
    Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (1,2);
    Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (1,4);
    Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (2,2);
    Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (2,3);
    Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (2,5);
    --  Constraints for Table INGRED_XREF
      ALTER TABLE "SKIP"."INGRED_XREF" MODIFY ("PRETZEL_ID" NOT NULL ENABLE);
      ALTER TABLE "SKIP"."INGRED_XREF" MODIFY ("INGRED_ID" NOT NULL ENABLE);
    {code}
    Desired output (note how the ingredients are all listed in one column, separated by commas):
    {code}
    PRETZEL_ID PRETZEL_NAME     PRETZEL_DESC                        INGREDIENTS
    1          CLASSIC          Classic knot pretzel                SEA SALT, TABLE SALT, YEAST
    2          THICK STICK      Straight pretzel, abt 1/2" in dia   TABLE_SALT, FLOUR, BEER

    See the FAQ : {message:id=9360005}
    Especially links concerning string aggregation.

  • How to create XML from multiple rows in a table?

    Hi All,
    I have a table where it has multiple rows as below which I need to send as a XML.. can any one let me know how to create?
    Table:
    PRDID,NAME,DESCRIPTION,SUPPLIER,PRICE
    2012,AAA,ADESC,SUPPLIER1,1.8
    2012,AAA,ADESC,SUPPLIER2,2.5
    XML should be :
    <ROOT>
    <PRDID>2012</PRDID>
    <NAME>AAA</NAME>
    <DESCRIPTION>ADESC</DESCRIPTION>
    <PRICE>
    <REGION>SUPPLIER1</REGION>
    <PRICE>1.8</PRICE>
    <REGION>SUPPLIER2</REGION>
    <PRICE>2.5</PRICE>
    </PRICE>
    </ROOT>
    Thanks
    Rajeev

    Hi
    This white paper shows how to do it - http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/101c974c-11f9-2b10-4da5-cd350b7eeda0
    Michael

  • Sending data from flat file or oracle table view to a IBM MQ

    Hi,
    We need a help in developing solution.
    We have a scenario, where data(multiple records) in source (table/file) needs to populated into a queue(JMS IBM MQ) as a single message. To achieve this we are trying a two step process.
    1)     We created a temp table to store multiple records from file, this temp table is having one column of *‘clob’* data-type which will store data from file into a single row. We are facing issue while loading data from file to staging area using LKM FILE TO ORACLE (SQLLDR)
    When we are executing interface, while creating C$ table it is going error out . Instead of taking clob (target write data type) it is taking varchar with +5000+ size whereas varchar supports only *4000*.
    create table SNPM.C$_0SINGLERECORD
    C1_C1 VARCHAR2(5000) NULL
    NOLOGGING
    Error message:
    910 : 42000 : java.sql.SQLException: ORA-00910: specified length too long for its datatype
    java.sql.SQLException: ORA-00910: specified length too long for its datatype
    Need help in sending data into destination table.
    2) After populating this data into destination(temp table) as a single record we need to send each row as a single message to JMS MQ. currently we are using LKM FILE to SQL to load into Staging area and IKM SQL TO JMS APPEND to put message in JMS MQ. We are succeeding in putting message of length < 4000 as these KMs are converting the data using varchar2, but we have data of large size+(>4K)+.
    Pointer/ solution will be of great help.
    Please let me know in case you need more description.

    The error message that is showing while using clob as datatype(which we created as user data type in data types section of respective technology)
    java.lang.NumberFormatException: For input string: "4294967295"
         at java.lang.NumberFormatException.forInputString(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
    while using varchar2 in creating C$ table following is the error:
    910 : 42000 : java.sql.SQLException: ORA-00910: specified length too long for its datatype
    java.sql.SQLException: ORA-00910: specified length too long for its datatype
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)

  • Create a view to shows data from multiple rows in a single column

    Hi all - this is probably posted in the wrong forum but I couldn't find which was the correct one.
    I am almost a complete novice at sql but I have a need to create a view which can be developed at 10g (which runs efficiently as the volumes are likely to be high) which will do the following.
    Original table with columns Parent_code, Child_code
    Parent_Code Child_Code
    1000 2000
    1000 3000
    1000 4000
    2000 3000
    2000 5000
    (note Parents can have multiple children and a child can have multiple parents!)
    What I need to end up with in my view is the following
    Child_Code Parent_List
    2000 '1000 (3)'
    3000 '1000 (3), 2000 (2)'
    4000 '1000 (3)'
    5000 '2000 (2)'
    Note the number in parantheses is the number of children that the parent has - ie in the original table parent 1000 has 3 rows (one for each child)
    This view is then to be used as a look up (on child code) for a business objects report.
    Is there anyone who could PLEASE, PLEASE help me fairly quickly on this as I have very little time to find a solution?

    Hi,
    You can test these ones :
    select child_code
         , ltrim(sys_connect_by_path(parent_info,', '), ', ') as parent_list
    from (
      select child_code
           , to_char(parent_code) ||
             ' (' ||
             count(*) over(partition by parent_code) ||
             ')' as parent_info
           , row_number() over(partition by child_code order by parent_code) rn
      from your_table
    where connect_by_isleaf = 1
    connect by prior rn = rn-1
           and prior child_code = child_code
    start with rn = 1
    select child_code,
           rtrim(
             extract(
               xmlagg(xmlelement("e",parent_info||', ') order by parent_info)
             , '//text()'
           ) as parent_list
    from (
      select child_code,
             to_char(parent_code) ||
             ' (' ||
             count(*) over(partition by parent_code) ||
             ')' as parent_info
      from your_table
    group by child_code
    ;What you need is called "string aggregation".
    See here for various techniques, including the two above : http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php

  • How to data from selected row of a TABLE

    Hi ,
    I have a table displaying some PO order details. In the last column , I have a field with element Link to Action . My requirement is , that when I click on the link to action column of specific row , I want to get the data present( specifically the the data present on the first column which is PO number) i that specific row.
    How can i get this data?
    Regards
    PG

    Hi PG,
    If you want to get Selected row data,  you can use get_selected_elements
    Try this example code.. this gives you selected records into one table..
      DATA lo_nd_et_postab_1 TYPE REF TO if_wd_context_node.
      DATA lo_el_et_postab_1 TYPE REF TO if_wd_context_element.
      DATA ls_et_postab_1 TYPE wd_this->Element_et_postab_1.
      DATA lt_et_postab_1 TYPE wd_this->Elements_et_postab_1.
    DATA: wa_temp TYPE REF TO if_wd_context_element,
            lt_temp TYPE wdr_context_element_set.
    navigate from <CONTEXT> to <ET_POSTAB_1> via lead selection
      lo_nd_et_postab_1 = wd_context->path_get_node( path = `ZSHP_EXTENDED_DUE_LI.CHANGING_3.ET_POSTAB_1` ).
      CALL METHOD lo_nd_et_postab_1->get_selected_elements
        RECEIVING
          set = lt_temp.
      LOOP AT lt_temp INTO wa_temp.
        CALL METHOD wa_temp->get_static_attributes
          IMPORTING
            static_attributes = ls_et_postab_1.
        append ls_et_postab_1 to lt_et_postab_1.
        CLEAR ls_et_postab_1.
      ENDLOOP.
    lo_nd_et_postab_1->bind_table( new_items = lt_et_postab_1 ).
    NOW LT_ET_POSTAB_1 Contains selected records in table.
    Hope it helps...
    Cheers,
    Kris.

  • SELECTing from multiple rows and different tables

    Basically, I have a table with a primary key and some other columns of data. The second table has a foreign key that points to the first table then has a columns with related data. I want to write construct a SQL query where one of the columns is the primary key from the first table and the second column is a concatenation of all the rows in the second table that have the same foreign key.
    I need this in the form of one SQL statement so that I can use it to create a report in Application Express

    Just in case my first post was a bit unclear.
    My first table has a primary key, INTERACTION_ID, and several other columns of data.
    My second table has a foreign key, INTERACTION_ID, and one extra column, USER_NAME.
    There are several rows in the second table that share the same INTERACTION_ID as each interaction can have many user names. I want to construct a SQL query where I pull the interaction id in one column and concatenate all the relevant rows of USER_NAME as the second column.

  • BEX Workbook - consolidating common data from multiple queries into a table

    Hello BW Gurus,
    We have couple of queries. One getting data for Material and its components and the other query getting sales volume for  material along with many other data.
    In the other tab, I would like to display only the Material and its sales volume as another table.
    Is there a setting in the BEX to group only these fields and populate values in a different tab?
    regards
    S R

    Can you pls elaborate?
    Do you want multiple reports on single excel sheet? also do you want to have any relation between them like only those materials that appeared in first report?

  • How to get the data from multiple tabes into single table

    hi all,
    here i am having 10 data base tables,how to get the data into a single table.
    regards,
    subba reddy

    hi,
    non XI/PI related
    Regards,
    Michal Krawczyk

  • Update On data from multiple Tables

    How can i update data from multiple tables(Using a Join)
    using a single update statement.

    Hii
    Suppose i have following tables
    create table emp_mas(empno number primary key,name varchar2(30));
    create table emp_grad(empno number primary key,grade varchar2(1));
    SQL> select * from emp_grad;
    EMPNO G
    100 A
    101 A
    102 B
    SQL> select * from emp_mas;
    EMPNO NAME
    100 GREG
    101 THOMAS
    102 SAM
    I would like to update information of employee 'GREG' Using a single update statement as
    UPDATE (SELECT E.EMPNO,E.NAME,G.GRADE FROM EMP_MAS E,EMP_GRAD G WHERE E.EMPNO=G.EMPNO) J
    SET J.NAME='GREG THOMAS',J.GRADE='B' WHERE EMPNO=100
    Then i am getting Error message like this.
    ERROR at line 2:
    ORA-01776: cannot modify more than one base table through a join view
    How can i achieve the result

  • Can a block in Oracle contain rows/data from multiple tables?

    Hi during my discussion with one of the DBAs, a point came up i.e. A block shouldn't have rows from multiple tables...
    Is that true? I read in one of the OTN thread (i don't exactly remember the thread name) that a block can have data from multiple tables. If it doesn't have, what's the table directory in block signifies?
    Please share your views.
    Thanks,
    CSM

    CSM.DBA wrote:
    Hi,
    As per the above link,
    Table directory
    For a heap-organized table, this directory contains metadata about tables whose rows are stored in this block. Multiple tables can store rows in the same block. (Logical Storage Structures)
    And by default Oracle creates heap organized tables only.(heap-organized table: A table in which the data rows are stored in no particular order on disk. By default, CREATE TABLE creates a heap-organized table.) (Glossary)
    So I can say a block can contain rows from multiple tables. Isn't it?
    CSM
    See Logical Storage Structures
    Given:  A segment is a set of extents allocated for a specific database object, such as a table.
    Given:  An extent is a set of logically contiguous data blocks

  • Update row in a table based on join on multiple rows in another table

    I am using SQL Server 2005. I have the following update query which is not working as desired.
    UPDATE DocPlant
    SET DocHistory = DocHistory + CONVERT(VARCHAR(20), PA.ActionDate, 100) + ' - ' + PA.ActionLog + '. '
    FROM PlantDoc PD INNER JOIN PlantAction PA on PD.DocID = PA.DocID AND PD.PlantID = PA.PlantID 
    For each DocID and PlantID in PlantDoc table there are multiple rows in PlantAction table. I would like to concatenate ActionDate and ActionLog information into DocHistory column of DocPlant table. But the above update query is considering only one row from
    PlantAction table even though there are multiple rows that match with DocID and PlantID.
    DocHistory column is of type NVARCHAR(MAX).
    How do I fix my query to achieve what I want ? Thanks for the help.

    UPDATE DocPlant
    SET DocHistory = DocHistory + CONVERT(VARCHAR(20), PA.ActionDate, 100) + ' - ' + PA.ActionLog + '. '
    FROM PlantDoc PD INNER JOIN PlantAction PA on PD.DocID = PA.DocID AND PD.PlantID = PA.PlantID 
    We do not use the old Sybase UPDATE..FROM.. syntax. Google it and learn how it does not work. We do not use the old Sybase CONVERT() string function. You are still writing 1950's COBOL with string dates instead of temeproal data types. 
    You also did not post DDL, so we have to guess about everything. Does your boss make you work without DDL? How do you do it? 
    >> For each DocID and PlantID in PlantDoc table there are multiple rows in PlantAction [singular name?] table. I would like to concatenate ActionDate and ActionLog information into DocHistory column of DocPlant table. <<
    Why? What does this new data element mean? This is like dividing Thursday by Red and expecting a reasonable answer. Now, non-SQL programmers who are still writing COBOL will violate the tiered architecture rule about doing display formatting in the database.
    If you will follow forum rules, we can help you. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

Maybe you are looking for

  • Reg: Customer Master Creation in BAPI

    Hi All, How can i find the fields, which are all used in BAPI_CUSTOMER_CREATEFROMDATA1 and in BAPI_CUSTOMER_CREATEFROMDATA... And how can i find the sap given sequential/flat file for customer master. Thanks & Regards arun

  • Sync multiple iPads

    Hi We have mutiple iPads with unique names. We can sync from iTunes to all the iPads, but if an application (apps) on a iPod purchase something direct eg. some expansion to the app, the other iPads do not get this expansion (or item) - even after a s

  • Query On Report: s_alr_87012177-Customer Payment History

    Hi Folks, Does the report: s_alr_87012177 picks the document type: TB(Treas Bank Statement). And also let us know which document types the report picks. Thanks, Vinay

  • Blank cdr and dvdr not being "detected"

    I can insert a DVD or CD with data on it, But when I put in a cd/dvd with nothing on it none of my burning applications detect that its in there. Also, nothing in thunar is shown about it. I have not been able to find anything on the forums about thi

  • How do i connect my ipad to my blu ray dvd player using a usb cord

    How do i connect my ipad mini to my LG blu ray dvd player using a usb cord?