Table View Update

Hi,
     How to insert and modify the value in tableview . Anyone please give me some sample code.
Thanks in advance.
Anitha.

Thanks Azziz Ali.
I have followed your logic.My table is not upadate the modify field value.
my code..
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content design="classicdesign2002design2003" >
  <htmlb:page title="BSP Extension: HTMLB / Element: tableView" >
    <htmlb:form>
      <htmlb:tableView id              = "tvX"
                       headerText      = "Connections"
                       headerVisible   = "true"
                       visibleRowCount = "8"
                       fillUpEmptyRows = "true"
                       onHeaderClick   = "MyEventHeaderClick"
                       onRowSelection  = "<%= ind%>    "
                       selectionMode   = "LINEEDIT"
                       table           = "<%= flight %>"
                       iterator        = "<%= tv_iterator %>" />
<htmlb:button text    = "update"
                        id      = "go"
                        onClick = "myeventhandler" />
    </htmlb:form>
  </htmlb:page>
</htmlb:content>
on inputprocessing
DATA: event TYPE REF TO CL_HTMLB_EVENT.
event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
IF event->name = 'button' AND event->event_type = 'click'.
DATA: button_event TYPE REF TO CL_HTMLB_EVENT_BUTTON.
button_event ?= event.
DATA: tv TYPE REF TO CL_HTMLB_TABLEVIEW,
ind type i,
wa type sflight.
tv ?= CL_HTMLB_MANAGER=>GET_DATA(
request = runtime->server->request
name = 'tableView'
id = 'tvx' ).
IF tv IS NOT INITIAL.
DATA: tv_data TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
tv_data = tv->data.
ind = tv_data->selectedrowindex.
IF ind IS not INITIAL.
loop at flight into wa .
READ TABLE flight INDEX ind into wa.
modify sflight from wa.
endloop.
endif.
ENDIF.
ENDIF.

Similar Messages

  • Form Submit = Table View Update

    OK,
    I have been trying to get this to work and am probably
    missing something easy here. My goal is to have a user submit info
    using Ajax and have the table on the bottom update on submission.
    My observer works when clicked but I can't seem to link the refresh
    to the table to update.
    Tried -
    onClick="ADDUSER( ['email','dept','div'], ['resultdiv'] );
    dspsmUserTable.loadData();"> No refresh
    Added a refresh button to manually do
    "dspsmUserTable.loadData();" Works fine.
    Is there any ideas/examples out there yet.
    Thanks, Matt

    Hi widgeter,
    1. First of all, I think you have a call to
    Spry.Utils.loadURL in your ADDUSER function in order to
    submit your user-data to server, but you should also register a
    callback in order to refresh the users table only after a response
    comes from the server (after the user has been inserted into
    database).
    Please check Kin's post:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=602&threadid=1214689&fo rumid=72
    2. Also, you need to make sure that {useCache:false} is set
    to your dspsmUserTable DataSet, like this:
    var dspsmUserTable = new
    Spry.Data.XMLDataSet("path/to/users/page", "/xpath/to/nodes",
    {useCache:false});
    Regards,
    Dragos

  • Query and update a table/view

    What is the best & fastest way to do this?
    1) Put up a query input region for users to enter parameters.
    2) Run a query on a table/view using those parameters.
    3) Allow the output in (2) to be modified by user (multiple rows at a time) and then Submit the updates back to update th table/view
    I can do (1) and (2) easily. How can I do (3)?
    Thanks

    Make a report on the table. Go to the definition of
    the report column and change the "Display As" type to
    text field or select list or whcih ever is
    applicable. Write a process on submit to insert these
    values back to the table. You will have control over
    which columns the user can modify.Thats a good idea and I was able to start on it. But how can my after submit process tell which rows to modify? i.e. what will my after submit process look like?
    for rec in (....)
    loop
    update my_table set
    end loop;
    Help? Thanks

  • How To Update A Table View From Client Side !!!!

    Hi I would like to update a table view from the Client Side. So that the user can keep updating the relevent data on the client and when they have finally finished they can press Save so the entire page is then sent to the Server.
    Does anyone know how to do this, I guess u have to use the EPCM, I have just started on it and would really appreciate some Help.
    Thanks,
    Emmanuel.

    This is what I found :-
    There are a couple of ways to approach this.
    1) load the excel spreadsheet into the database "as is". You can use interMedia
    text to convert the .xls file into a .htm file (HTML) or use iFS (see
    http://technet.oracle.com/
    for
    more info on that) to parse it as well. InterMedia text will convert your XLS
    spreadsheet into a big HTML table (easy to parse out what you need at that
    point)
    2) Using OLE automation, a program you write can interact with Excel, request
    data from a spreadsheet, and insert it. Oracle Forms is capable of doing this
    for example as is other languages environments. In this fashion, you can remove
    the "manual" and "sqlldr" parts -- your program can automatically insert the
    data.
    3) You can write a VB script that uses ODBC or Oracle Objects for OLE (OO4O) in
    Excel. This VB script would be able to put selected data from the spreadsheet
    into the database. We would recommend OO4O. It provides an In-Process COM
    Automation Server that provides a set of COM Automation interfaces/objects for
    connecting to Oracle database servers, executing queries and managing the
    results. OO4O is available from
    http://technet.oracle.com

  • Update a table view field calling a service

    Hi all,
    is there a way in a table view to calculate the value of a field calling a data service, using as calling arguments other fields from the same row?
    For example I have line items of a sales order in a table view. In one field the user enters the quantity in the desired unit of measure. I would like to have the quantity transformed in KGs in the same row.
    Is this possible?
    Points will be awarded for usefull suggestions.
    Regards,
    Panos

    Make a report on the table. Go to the definition of
    the report column and change the "Display As" type to
    text field or select list or whcih ever is
    applicable. Write a process on submit to insert these
    values back to the table. You will have control over
    which columns the user can modify.Thats a good idea and I was able to start on it. But how can my after submit process tell which rows to modify? i.e. what will my after submit process look like?
    for rec in (....)
    loop
    update my_table set
    end loop;
    Help? Thanks

  • How to create updatable summary for columns in table view

    Dear All,
    ADF BC and Faces, i have got a table view where user can register hours for each day of the week, for which i'd like to create summary(sum-up)fields that display the number of total for each day, and it is updatable at run time(i.e. when numbers are put in, summary fields get updated automatically).
    how do i do? some links/examples available? thank you.
    regards
    Jerry

    http://www.freewebalbum.com/blogs/faces/bjanko/blogs.jsp?blog=bjanko20070725180020

  • FM to update table view V_BBP_DET_ACCT

    Hi all,
    We are running on SRM 5.0(Sp11),Standalone scenario.We have a  requirement to update the table view V_BBP_DET_ACCT through a custom program for the local product categories we have created in the SRM system.
    We dont want to maintain the SPRO setting  'Define G/L Account for Product Category and Account Assignment Category' but instead through our custom program.
    Is there any std FM which can be used for this?Has anybody tried this before?All suggestions will be highly rewarded.
    regards,
    SRM tech.

    There wont be any FM to insert/delete/update in to these customising table.
    You can write you own ABAP code to directly maintain these tables.
    I see no harm in it, as there wont be any business logic in the SPRO also.
    Regards,
    Ramesh-

  • Updating and Editing Table View

    I have been facing a very specific problem.
    I have a Table View populated with certain data. My objective is to edit the data in the table. For that I select a particular row of data and click on a button 'Edit'. This takes me to a new Scene, where the data is populated in textfields and I can alter them and then click 'Save', so that the data is updated.
    But the problem that I am facing is that the Updated row of data occupies the last row and not at its orignal place where it was previously placed.
    Hence I wanted any kind of help as to how to insert a row of data at a particular row index.
    Thanks in advance.

    It sounds like you are removing the old version of the item from the table's data list and adding the new version back in. That's not always actually necessary (but is sometimes, depending on your data model). By default add(...) adds to the end of the list.
    If that's the case, you can do something along the lines of
    List<MyItemType> items = tableView.getItems();
    int index = items.indexOf(oldItem);
    items.set(index, newItem);Lists also have an add method that takes an index if you really need to use add:
    tableView.getItems().add(index, newValue);

  • Issue while updating field SCHZU (shift Premium) in table view  V_T508A

    Hi All,
    I am facing an issue while updating the field SCHZU(Shift premium) in Table view V_T508A.For some WSR entries when i am trying to update the shift premium say with a value 19400,the value is accepted.However for some other WSR entries,the value for shift premium gets modified to 19.400.Can someone please let me know why this error is occuring and how to rectify the same.
    Regards,
    Punam Jha

    usually its a percentage value. please check what value you enter

  • What are the tables will update while loading Master data ?

    Hello Experts,
    What are the tables will update while loading Master data ? And requesting you to provide more information about Master data loading and its related settings in the beginning of creation infoobjects. 

    It depends upon the type of Master data u r loading....
    In all the master data loadings, for every new value of master data an SID will be created in the SID table /BI*/S<INFOOBJECT NAME> irrespective of the type of master data.
    But the exceptional tables that get updated depending on the type of master data are.....
    If it is a time Independent master data then the /BI*/P<INFOOBJECT NAME> table gets updated with the loaded data.
    If it is a time dependent master data then the /BI*/Q<INFOOBJECT NAME> table gets updated with the loaded data.
    If the master data is of time Independent Navigational attributes then for every data load the SID table will get updated first and then the /BI*/X<INFOOBJECT NAME> table gets updated with the SID's created in the SID table (NOT WITH THE MASTER DATA).
    If the master data is of time dependent navigational attributes then for every data load the SID table will get updated first and then the /BI*/Y<INFOOBJECT NAME> table gets updated with the SID's created in the SID table (NOT WITH THE MASTER DATA).
    NOTE: As said above, For all the data in P, Q, T, X, Y tables the SID's will be created in the S table /BI*/S<INFOOBJECT NAME>
    NOTE: Irrespective of the time dependency or Independency the VIEW /BI*/M<INFOOBJECT NAME> defined on the top of /BI*/P<INFOOBJECT NAME> & /BI*/Q<INFOOBJECT NAME> tables gives the view of entire master data.
    NOTE: it is just a View and it is not a Table. So it will not have any physical storage of data.
    All the above tables are for ATTRIBUTES
    But when it comes to TEXTS, irrespective of the Time dependency or Independency, the /BI*/T<INFOOBJECT NAME> table gets updated (and of course the S table also).
    Naming Convention: /BIC/*<InfoObject Name> or /BI0/*<InfoObject Name>
    C = Customer Defined Characteristic
    0 = Standard or SAP defined Characteristic
    * = P, Q, T, X,Y, S (depending on the above said conditions)
    Thanks & regards
    Sasidhar

  • ADF View - Updated key values not updating referenced data in view (JSP)

    I have a many-to-many relationship that links 2 tables (2 mandatory and 1 optional).
    Relationship 1 is created via a view link.
    Relationship 2 is selected from a view.
    The optional relationship (3) is required based on a flag in the corresponding row for relationship 2.
    To achieve this I have a page with 2 steps, step 1 selects relationship 2 and then the page decides whether relationship 3 is required or not.
    The many-to-many relationship is created via a VO that contains the many-to-many table and references and includes some attributes from the other tables.
    When I first select the relationship 2, the attributes from the referenced table are then set within the VO and by looking at these I can make my decision.
    Now here's the problem....
    If I go back and select and different relationship 2, the Id attribute (for the many-to-many table) is updated but the attributes are unchanged, this means that the flag I need to check is invalid.
    Also, when I then select the appropriate value for relationship 3 (if required), the associated Id attribute is set but the referenced attributes from this table are not set (these are needed for other purposes).
    Is there some setting I'm missing?
    Is there some call I need to make to update the referenced data?
    I know I could make all of my decisions based on the VOs that I am selecting from but it's much simpler (and less code) to just use the 1 view (less chance of bugs) - plus i'd like to understand why this is not working.
    Thanks
    Al

    I don't need to check it for data integrity reasons, I need to check the contents of certain values to determine what to do next, before i commit the data.
    For example, if flag a is set then ask for extra information 'X' otherwise ask for extra information 'Y'.

  • Display of missing values in a table view.

    Hi everyone,
    I have a table view with 7 columns and 10 rows which displays only those values which are missing in the DataBase Table.
    Is it possible to show only the missing values as '-' in a table view, the table view is having 7 different fields.
    Also when the value is inserted at run time the corresponding field should be updated accordingly and the value will no longer be displayed in the table view as '-'
    please advice.
    Regards
    Neo.

    Welcome to SDN.
    do you mean to say that in some rows some column values will be blank and you want to replace the blanks with '-'.
    loop thru the itab which you are passing to tableview and for the blank cells pass '-'.
    <i>Also when the value is inserted at run time</i>
    so you are having editable tableview. to update the value back to the dbtable, you have to read it in oninputprocessing and update it to dbtable .
    search the forum on how to read the user entered value from the table view so that you can update the dbtable.
    Regards
    Raja

  • Addition and deletion in a table View in Visual composer 7.0

    Hi All
    I have a requirement of updating a table view from the entries that a user enters in an input form.
    When the user makes entries in the input form and clicks on save he should see those entries in the table and these entries should also get updated in the backend.
    Can anyone give me any ideas around it?
    Please also let me know if VC 7.0 supports multiple actions on a click of a button?
    Suppose if i create a button save on the form and implement two actions "Insert Row" and a custom action"Submit"(which eventually will hit the BAPI) in the backend to update so will it work ??
    I read on SDN that in order to add or delete i would need 3 buttons atleast :ADD,(to add row),SAve(to call bapi) and Refresh(to make entry visibile) in the table.
    Can anyone suggests better solution around it.
    Thanks for all the pointers in advance.
    Regards
    Shweta

    Hi Shweta,
    Since tables only represent data retrieved from a backend service, I guess the correct functionality would be that the data in the form would be submitted to the proper service (that can recieve input and add it to the database), and then the table that will be connected to the output port of the service will be updated with the new data.
    And sequence actions was added as a feature, so it depends on your SP level. If you can'e see it when you assign actions to a button, your SP doesn;t have it
    Best regards,
    Udi

  • Add data to table view from input fields in a page

    Hi
            I am developing a BSP page which will be called from SRM shop transaction. After user enters the line item data, data will be passed back to shop transaction using OCI interface and the page attributes (URL).
       (1) How can I add data from input fields to table view on a page on a button click? I am able to add first line but I could not retain first line data when I try to add the second line.
          I am able to add multiple lines to table view if I use view and controller by adding to the line data to static attribute of the controller. I can’t use the controller and view because I can not set the attribute to Controller automatically.
       (2) Is there a way to pass an attribute (URL) to controller from SPRO? Like we pass an attribute to page automatically (Automatic page attribute).
       (3) How can I call a controller and view and pass the page attribute to the controller on a button click from a page with out controller?
    Thanks
    Sreenivas

    I'm trying to test the merge with the following data in a test.txt file:
    ZZZZZ114923000004
    1234Z400660000001
    ZZZZZ114923000010
    Getting an error:
    SQL> @C:\dataformats\sql\pc12seriesMerge.sql
    Directory created.
    SP2-0552: Bind variable "17" not declared.
    SQL>
    here it the pc12seriesMerge.sql file
    set serveroutput on
    create or replace directory user_dir as 'c:\dataformats\incoming\';
    DECLARE
    v_filename VARCHAR2(100); -- Data filename
    v_file_exists boolean;
    v_file_length number;
    v_block_size number;
    f utl_file.file_type;
    s varchar2(200);
    lineString varchar(200);
    v_account varchar(5);
    v_IDN varchar(6);
    v_quantity varchar(6);
    BEGIN
    v_filename := 'TEST.TXT';
    DBMS_OUTPUT.PUT_LINE(v_filename); --shows filename
    utl_file.fgetattr('USER_DIR', v_filename, v_file_exists, v_file_length ,v_block_size );
    IF v_file_exists THEN
    dbms_output.put_line('File Exists');
    create table ext_table (
    account varchar2(5),
    idn number(6),
    quantity varchar2(6)
    organization external (
    type oracle_loader
    default directory user_dir
    access parameters (
    records delimited by newline
    fields (
    account position(1:5) char(5),
    idn position(6:11) char(6),
    quantity position(12:17) char(6)
    location ('test.txt')
    reject limit unlimited;
    MERGE INTO id_req_stg t
    USING (
    SELECT account,
    idn,
    decode(quantity, '-', 0, to_number(quantity)) as quantity
    FROM ext_table
    ) v
    ON ( t.account = v.account AND t.idn = v.idn )
    WHEN MATCHED THEN
    UPDATE SET t.quantity = v.quantity
    DELETE WHERE t.quantity = 0
    WHEN NOT MATCHED THEN
    INSERT (account, idn, quantity)
    VALUES (v.account, v.idn, v.quantity);
    ELSE
    dbms_output.put_line('File Does Not Exist');
    END IF; -- file exists
    EXCEPTION
    WHEN UTL_FILE.ACCESS_DENIED THEN
    DBMS_OUTPUT.PUT_LINE('No Access!!!');
    WHEN UTL_FILE.INVALID_PATH THEN
    DBMS_OUTPUT.PUT_LINE('PATH DOES NOT EXIST');
    WHEN others THEN
    DBMS_OUTPUT.PUT_LINE('SQLERRM: ' || SQLERRM);
    END;
    /

  • ERROR (ORA-01002)  when Ioading a table by UPDATE/INSERT

    I get the error message ORA-01002 ( Fetch out of sequence ) when I am loading a table by UPDATE/INSERT.
    At de Runtime Audit Viewer the process of loading update a number of register, in that case 44.050 and to the left register I get the error message that I show above.

    Can you please give us some details about your source and targets. I have used UPDATE/INSERT but I did not get this kind of error.
    rgds
    -AP

Maybe you are looking for