Updating an oracle table with data from an xml string

Hi - I need help with the following problem:
We have a table in the database with a field of xml type. We are going to take each string that gets inserted into the xml type field in the 'xml table' and parse the data into another oracle table with corresponding fields for every element.
once the record gets inserted into the 'real table' the user might want to update this record they will then insert another record into the 'xml table' indicating an update(with a flag) and then we need to update the 'real table' with the updated values that have been sent in.
The problem that I am having is that I do not know how to create this update statement that will tell me which fields of the table need to be updated.(only the fields that need to be updated will be in the xml string in the 'xml table').
Please help me with this - ASAP!

Are you wanting to upload the file through an Oracle Form or just upload a file? If it isn't via forms, then you should probably post your question here: {forum:id=732}
You also should post the version of Forms, Database, etc...
As far as uploading files via a text file, I personally like to use Oracle External Tables even in Forms. You can Google that and there is plenty of information. If you search this forum, then you will see lots of people use UTL_FILE in forms, but you can Google that also for more information.

Similar Messages

  • Updating Oracle table with info from Sybase query

    I hope this is the correct forum for this question.
    I am fairly new to Java and JDBC. I am trying to figure out what the best method for updating information in Oracle tables with data from a Sybase table. I would prefer to use Oracle’s transparent gateway but this is not an option my company will pay for so I am creating a java stored procedure and using JDBC to connect to the Sybase database.
    The process I think I need to go thru is
    1.     Query an Oracle table to get the records that need to be updated and the “key” information to query the Sybase table with.
    2.     Use that result to query the Sybase database to get the fields that need to be updated in the Oracle table for those records.
    3.     Update the records on the Oracle table with the data from the Sybase query.
    I know I can just do this procedurally, row-by-row, but I was wondering if anyone knows of a way to accomplish this with SQL and no loops. Is there a way to make a result set available as a “SQL table” for another JDBC query?
    Basically what I would like to do is:
    OraQuery = “ select sybinfo from sometable where updated_date = null”;
    Statement orastmt1 = OraConn.createStatement();
    ResultSet Orars1 = orastmt1.executeQuery (OraQuery);
    SybQuery = “select update_date, sybinfo from sybtable where sybinfo = Orars1.sybinfo”;
    Statement sybstmt = SybConn.createStatement();
    ResultSet Sybrs = sybstmt1.executeQuery (SybQuery);
    OraUpdate = “update (select update_date from sometable, Sybrs where sometable.sybinfo = Sybrs.sybinfo) set update_date = Sybrs.update_date”;
    Statement orastmt2 = OraConn.createStatement();
    ResultSet Orars2 = orastmt2.executeQuery (OraUpdate);
    This may not be possible but if anyone has done something similar and wouldn’t mind sharing I would appreciate it. If there is a “better” way of accomplishing this I am open to suggestions.
    Thanks

    you can try using cachedRowSet() for the Oracle side query.
    The rows in this could be populated using the sybase side query's resultset and then all of this could updated into Oracle in one shot.

  • Populate SQL table with data from Oracle DB in ODI

    Hi,
    I am trying to populate a source SQL table with fields from an Oracle db in ODI. I am trying to perform this using a procedure and I am am getting the following error:
    ODI-1226: Step PROC_1_Contract_Sls_Person_Lookup fails after 1 attempt(s).
    ODI-1232: Procedure PROC_1_Contract_Sls_Person_Lookup execution fails.
    ODI-1228: Task PROC_1_Contract_Sls_Person_Lookup (Procedure) fails on the target MICROSOFT_SQL_SERVER connection Phys_HypCMSDatamart.
    Caused By: weblogic.jdbc.sqlserverbase.ddc: [FMWGEN][SQLServer JDBC Driver][SQLServer]Invalid object name 'C2C_APP.CON_V'.
    My question is what is the best method to populate SQL db with data from an Oracle db? Using a procedure? A specific LKM?
    I found threads referring to using an LKM to populate Oracle tables with data from a SQL table....but nothing for the opposite.
    Any information would help.
    thanks,
    Eric

    Hi Eric,
    If using an Interface, I would recommend the LKM SQL to MSSQL (BULK) knowledge module. This will unload the data from Oracle into a file, then bulk load the staging db on the target using a BULK INSERT.
    Regards,
    Michael Rainey

  • Transfer a table with data from 1 client to another client

    Hi experts please focus on this issue.  what is table maintainance generator? what is the main advantages of it.
    how can we transfer a table with data from 1 client to another client.
    Thanks  in advance
    vamsi.

    Table maintenance generator can be generated via se11 on your table.
    The advantage is that the table can manaully be updated via SM30.
    If you want to transport to another client the table content, I think you can :
    - Generate a transport request in SM30 ( Transport button)
    - use SCC1 to transport from a client to another.
    Regards,
    Erwan

  • Trying to populate a table with data from WebRowset

    Hi,
    I want to be able to populate my tables with data from WebRowsets that have been saved to files. Everything goes good until I get to acceptChanges(). At which point I get a NullPointerException.
    Here's the code...
    WebRowSet wrs = new WebRowSetImpl();
    FileReader reader = new FileReader(inputFile);
    wrs.readXml(reader);
    wrs.beforeFirst();
    CachedRowSet crs = new CachedRowSetImpl();
    crs.setSyncProvider("com.sun.rowset.providers.RIXMLProvider");
    crs.populate(wrs);
    crs.beforeFirst();
    crs.acceptChanges(con);
    Results in...
    java.lang.NullPointerException
    at com.sun.rowset.CachedRowSetImpl.acceptChanges(CachedRowSetImpl.java:867)
    at com.sun.rowset.CachedRowSetImpl.acceptChanges(CachedRowSetImpl.java:919)
    I'm using Java 1.5_02. I looked at the source code for CachedRowSetImpl, and the only thing I could think of is that maybe "provider.getRowSetWriter()" in the following snippet is returning null....
    public void setSyncProvider(String s)
    throws SQLException
    provider = SyncFactory.getInstance(s);
    rowSetReader = provider.getRowSetReader();
    rowSetWriter = (TransactionalWriter)provider.getRowSetWriter();
    Any ideas?? Thanks!

    I have the same problem after setting com.sun.rowset.providers.RIXMLProvider.
    Looks like a bug to me.
    By the way, why are you creating a new CachedRowSet and populate it with a WebRowset (which extends CachedRowSet)?

  • What is the best wayt to copy tables with data from development to Prod?

    Dear all,
    We have Oracle tables with data in a development server, I would like to know if there is any ‘easy’ and ‘direct’ way to copy them to the production server.
    As I think import and export would be the best way. Any other althernatives?
    Thanks.

    There are a number of methods you could use.
    <ul><li>
    Export and import would work or their 10g+ equivalents data pump. </li>
    <li>You could create a database link between the 2 databases and use SQL*Plus copy to transfer data on a table by table basis (probably quite laborious unless there's only a few tables). </li>
    <li>You could use transportable tablespaces (there are some restirctions - check the documentation http://download.oracle.com/docs/cd/E11882_01/server.112/e10595/tspaces013.htm#sthref1632) </li>
    <li>You could use RMAN to clone the development database (assuming the prod database hasn't been used yet and that there's nothing in it you need to keep).</li>
    <li>You could create the prod database as a standby copy of the dev database </li>
    </ul>
    Using transportable tablespaces would be much faster than using data pump or import/export depending on how much data there is.

  • How to Copy complete structure of a table with data from one database table to another databse table

    I need a sql query to copy structure of table with data from production table of ONLINEBTREKDB database to production table of Archive database.
    I tried this query
    select * into Archive.dbo.Production from ONLINEBTREKDB.dbo.Production p
    but problem is I am able to copy the table schema and data but not able to copy constraints(PK)
    Any Help?
    seema

    You've multiple options
    1. Use generate scripts wizard available in SQL management studio. This is particularly helpful when you want to script out lot of objects. You can also choose to script data as well inside this. This can be launched by right clicking the db, choosing tasks
    -> generate scripts and then selecting required options inside the wizard
    2. Use object explorer and right click and script out table. You can also use search functionality to find object you want inside object explorer
    http://visakhm.blogspot.in/2013/02/object-filtering-using-ssms-object.html
    3. Use query based on INFORMATION_SCHEMA views like TABLES,COLUMNS,CONSTRAINT_COLUMN_USAGE etc to generate the script
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to transport/move a table with data from development to Test to Production

    Hi,
    How to transport/move a table with data from development to Test to Production..? Export-Import a Delivery Unit does only the structure and not the data
    Reg
    Sri

    Hi Sri,
    You cannot transport Data via Transport route in HANA, you can only transport code changes/Structure via DU. For Data movement, you either have a do a export/import from a flat file or replication from a Source System to HANA.
    Thanks Much,
    Abhishek

  • Transport Table with Data from Development to Quality

    Hi
    Requirement:
    Transporting Table with Values from Development to Quality System.
    I have a Z* - table, appended one field at the end.
    I need to transport data along with the table structure from Development System to Quality System.
    In Development System, I have assigned the Transport request in Client 100(We can't add data to the table in this client).
    What needs to be done to migrate the new table structure with Values.
    Thanks in Advance
    Regards,
    Baburaj
    NOTE: the requirement is to transport table and table entries through a transport request.
    There should not be any manual update for the table in the target System (Quality System).

    Check the delivery class assigned to the table. Please see the documentation
    Delivery class
        The delivery class controls the transport of table data when installing
        or upgrading, in a client copy and when transporting between customer
        systems. The delivery class is also used in the extended table
        maintenance.
        There are the following delivery classes:
        o   A: Application table (master and transaction data).
        o   C: Customer table, data is maintained by the customer only.
        o   L: Table for storing temporary data.
        o   G: Customer table, SAP may insert new data records, but may not
            overwrite or delete existing data records. The customer namespace
            must be defined in table TRESC. (Use Report RDDKOR54 here).
        o   E: System table with its own namespaces for customer entries. The
    customer namespace must be defined in table TRESC. (Use Report
    RDDKOR54 here.)
    S: System table, data changes have the same status as program
    changes.
    W: System table (e.g. table of the development environment) whose
    data is transported with its own transport objects (e.g. R3TR PROG,
    R3TR TABL, etc.).
    or during client copy
    the data of client-specific tables is copied.
    Classes C, G, E, S: The data records of the table are copied to the
    target client.
    Classes W, L: The data records of the table are not copied to the
    target client.
    Class A: Data records are only copied to the target client if
    explicitly requested (parameter option). Normally it does not make
    sense to transport such data, but is supported to permit you to copy
    an entire client environment.
    or during installation, upgrade and language import
    behavior differs here for client-specific and cross-client tables.
    nt-specific tables
    Classes A and C: Data is only imported into client 000. Existing
    data records are overwritten.
    Classes E, S and W: Data is imported into all clients. Existing data
    records are overwritten.
    Class G: Existing data records are overwritten in client 000. In all
    other clients, new data records are inserted, but existing data
    records are not overwritten.
    Class L: No data is imported.
    Cross-client tables
    o   Classes A, L and C: No data is imported.
    o   Classes E, S, and W: Data is imported. Exisitng data records with
         the same key are overwritten.
    o   Classe G: Data records that do not exist are inserted, but existing
         data records are not overwritten.
    ehavior during transport between customer systems
    Data records of tables of delivery class L are not imported into the
    target system. Data records of tables of delivery classes A, C, E, G, S
    and W are imported into the target system (this is done for the target
    client specified in the transport for client-specific tables).
    se of the delivery class in the extended table maintenance
    The delivery class is also analyzed in the extended table maintenance
    (SM30). The maintenance interface generated for a table makes the
    following checks:
    o   You cannot transport the entered data with the transport link of the
        generated maintenance interface for tables of delivery classes W and
        L.
    o   When you enter data, there is a check if this data violates the
        namespace defined for the table in table TRESC. If the data violates
        the namespace, the input is rejected.
    Thanks,

  • Table - populate one table with data from the list of another table

    Hello All,
    I am a newbie in Swing and am a book and few tutorials old.
    I am trying to achieve the following:
    (1) I populate Table1 (a JTable) with a list of data - each row consists of several columns. And I have a Table2 (also JTable) that is in the beginning empty.
    Both the tables (Table1 and Table2) are showed in the window.
    (2) Lets say, there's a button (JButton) in between the two tables.
    Now if I Select a row from Table1 and press the button, this row will be sent/copied to Table2.
    And this way I can choose different rows and pass the data to Table2.
    I have manages to make Table1 and put data in it ... but for the rest, I don't know where and how to begin.
    Would appreciate some ideas and tips.
    Thank you.

    Since you are using a button to start the copy process you don't need to worry about a ListSelectionListener or a MouseListener. You need to create a button with an ActionListener that does the following:
    a) Create an Array based on the size of the number of columns in the table
    b) get the index of the selected row
    c) populate the Array with data from the TableModel by using the table.getModel().getValueAt(...) method for each
    d) Now you can add the row of data to the other JTable by updating its model.
    DefaultTableModel model2 = (DefaultTableModel)table2.getMode();
    model.addRow( theArray );

  • How to move tables with data from one client to another

    Hello friends
    I have 2 clients 001 and 002.
    I have created a table with lots of data on client 001.
    I have to get the same table on 002 also with the same data.
    Is there an easier way of transfering this data from one table to another?
    I would appreciate any feedback on this.
    I know that mappings etc., can be done using the export and import of tpz file. So I want to know if there is any similar thing to transfer a table with data.
    THanks
    Ram

    hi
    thanks for the response
    We are working on a sandbox system for demo purpose.
    Actually we have two different group of people using two different clients created on the same server.
    Our group is using client 001 and another group is using client 002.
    We don't want the changes that one group does to the table to affect the other.
    Our group has created a z-table and have entered considerable amount of data.
    However, the other group also need to create the same table with the same data.
    So to avoid double work, we were trying to see if there is a way to copy the table with data created on 001 to 002.
    Any suggestions / feedback will be greatly appreciated.
    Thanks
    Ram

  • Moving tables with data from one client to another

    Hello friends
    I have 2 clients 001 and 002.
    I have created a table with lots of data on client 001.
    I have to get the same table on 002 also with the same data.
    Is there an easier way of transfering this data from one table to another?
    I would appreciate any feedback on this.
    I know that mappings etc., can be done using the export and import of tpz file. So I want to know if there is any similar thing to transfer a table with data.
    THanks
    Ram

    If you do not have the client field in your table, then the table is cross-client.
    IF you have the client field filled with 001, then you need to create the same entries with client 002, I dont think that you can do this with a transport.
    You have to write an ABAP that reads and writes the data.

  • Filling dynamic internal table with data from other internal table

    Hi Friends,
    My problem is that i have already built a dynamic internal table
    (class int_table->create) but now i want to fill it with data from other internal table.
    The dynamic table column name and the field value of the data filled internal table are same, but how to access that column name, since i cant hard code it anyway.
    Like if my werks field value is '8001'. I want to place it under the column 8001 of dynamic table, Can anybody help me in this regard?
    Awarding points is not a problem for even giving a slight hint.
    Best Regards

    Hi
    See this
    Dynamic internal table is internal table that we create on the fly with flexible column numbers.
    For sample code, please look at this code tutorial. Hopefully it can help you
    Check this link:
    http://www.****************/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm
    Sample code:
    DATA: l_cnt(2) TYPE n,
    l_cnt1(3) TYPE n,
    l_nam(12),
    l_con(18) TYPE c,
    l_con1(18) TYPE c,
    lf_mat TYPE matnr.
    SORT it_bom_expl BY bom_comp bom_mat level.
    CLEAR: l_cnt1, <fs_dyn_wa>.
    Looping the component internal table
    LOOP AT it_bom_expl INTO gf_it_bom_expl.
    CLEAR: l_cnt1.
    AT NEW bom_comp.
    CLEAR: l_cnt, <fs_dyn_wa>, lf_mat.
    For every new bom component the material data is moved to
    temp material table which will be used for assigning the levels
    checking the count
    it_mat_temp[] = it_mat[].
    Component data is been assigned to the field symbol which is checked
    against the field of dynamic internal table and the value of the
    component number is been passed to the dynamic internal table field
    value.
    ASSIGN COMPONENT c_comp_list OF STRUCTURE <fs_dyn_wa> TO
    <fs_check>.
    <fs_check> = gf_it_bom_expl-bom_comp.
    ENDAT.
    AT NEW bom_mat.
    CLEAR l_con.
    ENDAT.
    lf_mat = gf_it_bom_expl-bom_mat.
    Looping the temp internal table and looping the dynamic internal table
    *by reading line by line into workarea, the materialxxn is been assigned
    to field symbol which will be checked and used.
    LOOP AT it_mat_temp.
    l_nam = c_mat.
    l_cnt1 = l_cnt1 + 1.
    CONCATENATE l_nam l_cnt1 INTO l_nam.
    LOOP AT <fs_dyn_table2> ASSIGNING <fs_dyn_wa2>.
    ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa2> TO <fs_xy>.
    ENDLOOP.
    IF <fs_xy> = lf_mat.
    CLEAR lf_mat.
    l_con1 = l_con.
    ENDIF.
    Checking whether the material exists for a component and if so it is
    been assigned to the field symbol which is checked against the field
    of dynamic internal table and the level of the component number
    against material is been passed to the dynamic internal table field
    value.
    IF <fs_xy> = gf_it_bom_expl-bom_mat.
    ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
    CLEAR l_con.
    MOVE gf_it_bom_expl-level TO l_con.
    CONCATENATE c_val_l l_con INTO l_con.
    CONDENSE l_con NO-GAPS.
    IF l_con1 NE space.
    CONCATENATE l_con1 l_con INTO l_con SEPARATED BY c_comma.
    CLEAR l_con1.
    l_cnt = l_cnt - 1.
    ENDIF.
    <fs_check> = l_con.
    l_cnt = l_cnt + 1.
    ENDIF.
    ENDLOOP.
    AT END OF bom_comp.
    At end of every new bom component the count is moved to the field
    symbol which is checked against the field of dynamic internal table
    and the count is been passed to the dynamic internal table field
    value.
    ASSIGN COMPONENT c_count OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
    <fs_check> = l_cnt.
    INSERT <fs_dyn_wa> INTO TABLE <fs_dyn_table>.
    ENDAT.
    ENDLOOP.
    Reward if useful
    Anji

  • To populate dynamically created int table with data from other table

    Hi everybody,
    I have already created an internal table dynamically, but now want to populate it with data from another IT depending on the plant name.
    My dynamic int table contains fields with plant name like '8001' ,'8002' and so on.
    no I want to read data from the other table and depending on bwkey which contains similar data like plant name , want to append to this new dynamic int table through read key statement.
    I cannot reference the field name hard coded as it does not allow field symbol reference to be hard coded.
    Pls help.

    Hi,
    Check the code below:
    REPORT  ztestdyn.
    TYPE-POOLS : slis.
    TABLES: yyle0003.
    DATA:
      g_exit    TYPE c,
      g_save    VALUE 'A',               "For parameter I_SAVE
      g_repid   LIKE sy-repid,           "For program name
      g_variant TYPE disvariant.         "For parameter IS_VARIANT
    *Tables
      DATA: d_ref TYPE REF TO data,
            d_ref1 TYPE REF TO data,
            i_alv_cat1 TYPE TABLE OF lvc_s_fcat,
            ls_alv_cat1 LIKE LINE OF i_alv_cat1.
      DATA: BEGIN OF total_tab OCCURS 0 ,
            tknum TYPE yyle0003-tknum,
            quantity TYPE p,  "yyle0003-QUANTITY,
            END OF total_tab.
      DATA: BEGIN OF g_scandata_tab OCCURS 0.
              INCLUDE STRUCTURE yyle0003.
      DATA: END OF g_scandata_tab.
      DATA: g_yyle0003_tab LIKE yyle0003 OCCURS 0 WITH HEADER LINE.
      DATA: g_itab1 TYPE TABLE OF yyle0003.
      DATA: wa_itab1 LIKE g_scandata_tab.
      TYPES: BEGIN OF itab2,
             tknum TYPE yyle0003-tknum,
             vhilm TYPE yyle0003-vhilm,
             quantity TYPE p,
             END OF itab2.
      DATA: g_itab3 TYPE TABLE OF itab2.
      DATA: wa_itab3 TYPE itab2.
      DATA: g_itab5 TYPE TABLE OF itab2.
      DATA: wa_itab5 TYPE itab2.
      DATA: g_itab4 TYPE TABLE OF itab2.
      DATA: wa_itab4 TYPE itab2.
      DATA: gv_wa TYPE REF TO data.
      DATA : wa_tab TYPE itab2.
      DATA: BEGIN OF itab6 OCCURS 0,
             vhilm TYPE yyle0003-vhilm,
             quantity TYPE p,
             END OF itab6.
    ******************Start of Internal Table Definition *******************
      DATA:
            g_custom_container_0100 TYPE REF TO cl_gui_custom_container,
            g_alv_grid_0100    TYPE REF TO cl_gui_alv_grid,
            g_container_0100   TYPE scrfname VALUE 'LIST',
            g_mylayout         TYPE lvc_s_layo,
            ok_code            LIKE sy-ucomm.
      FIELD-SYMBOLS :<f_fs> TYPE table,
                     <f_fs11> TYPE table,
                     <f_fs1> TYPE table,
                     <f_fs3> TYPE ANY,
                     <f_fs4> TYPE ANY,
                     <f_field> TYPE ANY,
                     <f_fs5> TYPE ANY.
      FIELD-SYMBOLS: <fs_wa> TYPE ANY.
      DATA: l_var TYPE i,
            l_i   TYPE i.
      DATA: l_var1 TYPE char20,
            l_var2 TYPE char20.
    DATA: l_TOTAL TYPE I,
          L_FILL TYPE i,
          L_TOT  TYPE I.
    DATA: l_int TYPE i,
           l_sum TYPE i.
    FIELD-SYMBOLS: <f_fs2> TYPE  itab2, "
                     <f_fs6> TYPE ANY,
                     <f_fs7> TYPE ANY.
      DATA: l_var3 TYPE char15.
      DATA: l_quant TYPE p.
    FIELD-SYMBOLS: <f_fs8> LIKE itab6, "
                     <f_fs9> TYPE ANY,
                     <f_fs10> TYPE ANY.
    FIELD-SYMBOLS : <f_fs12> TYPE ANY,
                      <f_fs13> TYPE ANY.
      SORT g_scandata_tab BY tknum vhilm.
      LOOP AT g_scandata_tab INTO wa_itab1.
        MOVE-CORRESPONDING wa_itab1 TO wa_itab3.
        APPEND wa_itab3 TO g_itab3.
      ENDLOOP.
      LOOP AT g_itab3 INTO wa_itab3.
        COLLECT wa_itab3 INTO g_itab4.
      ENDLOOP.
      LOOP AT g_itab4 INTO wa_itab4.
        MOVE-CORRESPONDING wa_itab4 TO wa_itab5.
        MOVE-CORRESPONDING wa_itab4 TO itab6.
        APPEND wa_itab5 TO g_itab5.
        COLLECT itab6.
      ENDLOOP.
      CLEAR wa_itab3.
      SORT g_itab4 BY tknum vhilm.
      DELETE ADJACENT DUPLICATES FROM g_itab4 COMPARING vhilm.
      DESCRIBE TABLE g_itab4 LINES l_var.
      l_i = '2'.
      ls_alv_cat1-fieldname = 'TKNUM'.
      ls_alv_cat1-col_pos = 1.
      ls_alv_cat1-coltext ='ShipmentNo.'.
      APPEND ls_alv_cat1 TO i_alv_cat1.
      DATA: l_var4(10) TYPE c,
            l_var5(10) TYPE c,
            l_fieldname(20) TYPE c..
      LOOP AT g_itab4 INTO wa_itab4.
        IF l_var >= 1.
          CONDENSE wa_itab4-vhilm NO-GAPS.
          ls_alv_cat1-fieldname = wa_itab4-vhilm. "l_fieldname.
          ls_alv_cat1-col_pos = l_i.
          ls_alv_cat1-coltext = wa_itab4-vhilm.
          ls_alv_cat1-do_sum  ='X'.
          APPEND ls_alv_cat1 TO i_alv_cat1.
          CLEAR : ls_alv_cat1, l_fieldname.
          l_i = l_i + 1.
        ENDIF.
        AT LAST.
          ls_alv_cat1-fieldname = 'TOTAL'. "l_fieldname.
          ls_alv_cat1-col_pos = l_i.
          ls_alv_cat1-coltext = 'TOTAL'.
          ls_alv_cat1-do_sum  ='X'.
          APPEND ls_alv_cat1 TO i_alv_cat1.
          CLEAR : ls_alv_cat1, l_fieldname.
        ENDAT.
        SORT i_alv_cat1 BY fieldname.
        DELETE ADJACENT DUPLICATES FROM i_alv_cat1.
      ENDLOOP.
      SORT i_alv_cat1 BY col_pos.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = i_alv_cat1
        IMPORTING
          ep_table = d_ref.
      ASSIGN d_ref->* TO <f_fs>.
      CREATE DATA gv_wa LIKE LINE OF <f_fs>.
      ASSIGN gv_wa->* TO <fs_wa>.
      DELETE ADJACENT DUPLICATES FROM <f_fs> COMPARING ALL FIELDS.
        LOOP AT itab6.
        CLEAR wa_itab5.
        wa_itab5-tknum = 'Total'.
        MOVE-CORRESPONDING itab6 TO wa_itab5.
        APPEND wa_itab5 TO g_itab5.
        CLEAR wa_itab5.
      ENDLOOP.
         DESCRIBE TABLE g_itab5 LINES L_TOT.
           LOOP AT TOTAL_TAB.
          L_TOTAL = L_TOTAL + total_tab-quantity.
         ENDLOOP.
      LOOP AT g_final ASSIGNING <f_fs2>.
        ASSIGN COMPONENT 'TKNUM' OF STRUCTURE <f_fs2> TO <f_fs6>.
        ASSIGN COMPONENT 'TKNUM' OF STRUCTURE <fs_wa> TO <f_fs7>.
        <f_fs7> = <f_fs6>.
        CONDENSE <f_fs2>-vhilm NO-GAPS.
        ASSIGN COMPONENT 'VHILM' OF STRUCTURE <f_fs2> TO <f_fs3>.
        ASSIGN COMPONENT 3 OF STRUCTURE <f_fs2> TO <f_fs4>.
        MOVE <f_fs3> TO l_var1.
        ASSIGN COMPONENT l_var1 OF STRUCTURE <fs_wa> TO <f_fs5>.
        <f_fs5> =  <f_fs4>.
        CLEAR total_tab-quantity.
        READ TABLE total_tab WITH KEY tknum = <f_fs6>.
        IF sy-subrc = 0.
          ASSIGN total_tab-quantity TO <f_fs12>.
          ASSIGN COMPONENT 'TOTAL' OF STRUCTURE <fs_wa> TO <f_fs13>.
          <f_fs13> = <f_fs12>.
        ENDIF.
        L_FILL = L_FILL + 1.
        IF L_FILL = L_TOT.
         ASSIGN L_TOTAL TO <f_fs12>.
          ASSIGN COMPONENT 'TOTAL' OF STRUCTURE <fs_wa> TO <f_fs13>.
          <f_fs13> = <f_fs12>.
        ENDIF.
        AT END OF <f_fs2>-tknum.
          APPEND <fs_wa> TO <f_fs>.
          CLEAR  <fs_wa>.
        ENDAT.
      ENDLOOP.
      CLEAR: <f_fs6>,
              <f_fs7>.
      CLEAR <fs_wa>.
    CALL SCREEN 0100.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'ZVKS'.
      SET TITLEBAR 'ZVKS'.
      CHECK sy-ucomm IS INITIAL.
      SORT g_scandata_tab BY tknum vhilm.
      CREATE OBJECT g_custom_container_0100
             EXPORTING container_name = g_container_0100
             EXCEPTIONS
               cntl_error = 1
               cntl_system_error = 2
               create_error = 3
               lifetime_error = 4
               lifetime_dynpro_dynpro_link = 5.
      CREATE OBJECT g_alv_grid_0100
             EXPORTING i_parent = g_custom_container_0100.
      g_mylayout-grid_title = 'Display Scanning data'.
      CALL METHOD g_alv_grid_0100->set_table_for_first_display
        CHANGING
          it_outtab                     = <f_fs>
          it_fieldcatalog               = i_alv_cat1
                    EXCEPTIONS
                      invalid_parameter_combination = 1
                      program_error                 = 2
                      too_many_lines                = 3
                      OTHERS                        = 4.
      IF sy-subrc <> 0.
                  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    Regards
    Kannaiah

  • Update table with data from dialog

    Hello,
    I need the problem.
    I'm not update table with inputtext field where data change from dialog.
    This metod is update table.
    public void returnHandlerGoods(ReturnEvent returnEvent) {
    // Add event code here...
    ArrayList<PricatGoods> data = (ArrayList<PricatGoods>) returnEvent.getReturnValue();
    BindingContainer bc = getBindings();
    DCIteratorBinding dcIterBinding;
    // сохранить изменения detail
    dcIterBinding = (DCIteratorBinding) bindings.get("findVMIOrderDetailsIter");
    RowSetIterator s = dcIterBinding.getRowSetIterator();
    System.out.println("Получено товаров " + data.size());
    for (int i =0; i < data.size(); i++){
    Row detailRow = (RowImpl)s.createRow();
    detailRow.setNewRowState(Row.STATUS_INITIALIZED);
    s.insertRow(detailRow);
    s.setCurrentRow(detailRow);
    // detailRow.setAttribute("lineNum",createLineNum(i));
    detailRow.setAttribute("gtin",((PricatGoods)data.get(i)).getGtin());
    detailRow.setAttribute("goodId",((PricatGoods)data.get(i)).getGoodId());
    detailRow.setAttribute("goodName",((PricatGoods)data.get(i)).getGoodName());
    detailRow.setAttribute("sellerarticle",((PricatGoods)data.get(i)).getGoodCode());
    detailRow.setAttribute("buyerarticle",((PricatGoods)data.get(i)).getBuyerArticle());
    detailRow.setAttribute("unit",((PricatGoods)data.get(i)).getUnit());
    detailRow.setAttribute("totalQuantity",0);
    detailRow.setAttribute("acceptedQuantity",0);
    detailRow.setAttribute("taxRate",((PricatGoods)data.get(i)).getVatPercent());
    detailRow.setAttribute("price",((PricatGoods)data.get(i)).getCost());
    detailRow.setAttribute("priceWithoutTax",((PricatGoods)data.get(i)).getCostWithoutVat());
    detailRow.setAttribute("sumWithoutTax",0.0);
    detailRow.setAttribute("totalSum",0.0);
    detailRow.setAttribute("currency",((PricatGoods)data.get(i)).getCurrency());
    System.out.println("Добавление товара \" "+((PricatGoods)data.get(i)).getGoodName()+ "\" с goodCode " +((PricatGoods)data.get(i)).getGoodCode());
    s.closeRowSetIterator();
    AdfFacesContext.getCurrentInstance().addPartialTarget(table2);
    Fields are update good where inputText.readOnly = true.
    Fields are not update good where inputText.readOnly = false. Old data duplicate in new row.
    I have found some posts, but in them is not told accurately as I can solve the given problem.
    How to update a adf table??
    Re: ADF Dialog FrameWork-Table Update Problem
    Whether it is possible to solve the given problem?
    Thx,
    Dema

    If I use outputText that all job's a good. But I don't change these fields. I should have field with change for users.
    Code jspx page for table ===>
    <af:table value="#{bindings.findVMIOrderDetails1.collectionModel}"
    var="row"
    rows="#{bindings.findVMIOrderDetails1.rangeSize}"
    first="#{bindings.findVMIOrderDetails1.rangeStart}"
    emptyText="#{bindings.findVMIOrderDetails1.viewable ? 'Товаров пока нет.' : 'Access Denied.'}"
    selectionState="#{bindings.findVMIOrderDetails1.collectionModel.selectedRow}"
    selectionListener="#{bindings.findVMIOrderDetails1.collectionModel.makeCurrent}"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.table2}"
    id="table2" styleClass="baseTable">
    <af:column sortProperty="lineNum" sortable="false"
    headerText="№"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column19}"
    id="column19">
    <af:inputText value="#{row.lineNum}" simple="false"
    required="true"
    columns="4"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText4}"
    id="inputText4" readOnly="false"
    requiredMessageDetail='Поле "№" обязательно для заполнения'/>
    </af:column>
    <af:column sortProperty="gtin" sortable="false"
    headerText="GTIN"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column20}"
    id="column20">
    <af:inputText value="#{row.gtin}" simple="true"
    required="#{bindings.findVMIOrderDetails1.attrDefs.gtin.mandatory}"
    columns="#{bindings.findVMIOrderDetails1.attrHints.gtin.displayWidth}"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText26}"
    id="inputText26" readOnly="true"/>
    </af:column>
    <af:column sortProperty="sellerarticle" sortable="false"
    headerText="Код товара у поставщика"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column21}"
    id="column21">
    <af:inputText value="#{row.sellerarticle}" simple="true"
    required="#{bindings.findVMIOrderDetails1.attrDefs.sellerarticle.mandatory}"
    columns="#{bindings.findVMIOrderDetails1.attrHints.sellerarticle.displayWidth}"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText27}"
    id="inputText27" readOnly="true"/>
    </af:column>
    <af:column sortProperty="buyerarticle" sortable="false"
    headerText="Код товара у покупателя"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column22}"
    id="column22">
    <af:inputText value="#{row.buyerarticle}" simple="true"
    required="#{bindings.findVMIOrderDetails1.attrDefs.buyerarticle.mandatory}"
    columns="10"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText28}"
    id="inputText28" readOnly="true"
    disabled="false"/>
    </af:column>
    <af:column sortProperty="goodName" sortable="false"
    headerText="Наименование"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column23}"
    id="column23">
    <af:inputText value="#{row.goodName}" simple="true"
    required="true"
    columns="11"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText29}"
    id="inputText29"
    requiredMessageDetail="Поле обязательно для заполнения"
    readOnly="true"/>
    </af:column>
    <af:column sortProperty="itemDesc" sortable="false"
    headerText="Описание"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column24}"
    id="column24" rendered="false">
    <af:inputText value="#{row.itemDesc}" simple="true"
    required="#{bindings.findVMIOrderDetails1.attrDefs.itemDesc.mandatory}"
    columns="#{bindings.findVMIOrderDetails1.attrHints.itemDesc.displayWidth}"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText30}"
    id="inputText30"/>
    </af:column>
    <af:column sortProperty="unit" sortable="false"
    headerText="Ед. изм."
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column25}"
    id="column25">
    <af:inputText value="#{row.unit}" simple="true"
    required="#{bindings.findVMIOrderDetails1.attrDefs.unit.mandatory}"
    columns="#{bindings.findVMIOrderDetails1.attrHints.unit.displayWidth}"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText31}"
    id="inputText31" readOnly="true"/>
    </af:column>
    <af:column sortProperty="currency" sortable="false"
    headerText="Валюта"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column26}"
    id="column26" rendered="false">
    <af:inputText value="#{row.currency}" simple="true"
    required="#{bindings.findVMIOrderDetails1.attrDefs.currency.mandatory}"
    columns="#{bindings.findVMIOrderDetails1.attrHints.currency.displayWidth}"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText32}"
    id="inputText32"/>
    </af:column>
    <af:column sortProperty="totalQuantity" sortable="false"
    headerText="Общее кол-во"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column27}"
    id="column27">
    <af:inputText value="#{row.totalQuantity}"
    required="#{bindings.findVMIOrderDetails1.attrDefs.totalQuantity.mandatory}"
    columns="#{bindings.findVMIOrderDetails1.attrHints.totalQuantity.displayWidth}"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText36}"
    id="inputText36" readOnly="true">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.findVMIOrderDetails1.formats.totalQuantity}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="acceptedQuantity" sortable="false"
    headerText="Кол-во поставки"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column28}"
    id="column28">
    <af:inputText value="#{row.acceptedQuantity}"
    required="true"
    columns="7"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText37}"
    id="inputText37"
    requiredMessageDetail='Поле "Подтвержденное количество "обязательно для заполнения'
    validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.validatorQuantity}"
    readOnly="false">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.findVMIOrderDetails1.formats.acceptedQuantity}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="taxRate" sortable="false"
    headerText="НДС, %"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column29}"
    id="column29">
    <af:inputText value="#{row.taxRate}"
    required="true"
    columns="4"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText38}"
    id="inputText38"
    requiredMessageDetail='Поле "НДС" обязательно для заполнения'
    validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorNDS}"
    readOnly="false">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.findVMIOrderDetails1.formats.taxRate}"/>
    </af:inputText>
    </af:column>
    <af:column sortable="false" headerText="Цена"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column34}"
    id="column34">
    <af:column sortProperty="priceWithoutTax" sortable="false"
    headerText="Без НДС"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column31}"
    id="column31">
    <af:inputText value="#{row.priceWithoutTax}"
    required="true"
    columns="6"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText40}"
    id="inputText40"
    requiredMessageDetail='Поле "Цена без НДС" обязательно для заполнения'
    validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorPriceWithoutTax}"
    readOnly="false">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.findVMIOrderDetails1.formats.priceWithoutTax}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="price" sortable="false"
    headerText="С НДС"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column30}"
    id="column30">
    <af:inputText value="#{row.price}"
    required="true"
    columns="6"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText39}"
    id="inputText39"
    requiredMessageDetail='Поле "Цена с НДС" обязательно для заполнения'
    validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorPrice}"
    readOnly="false">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.findVMIOrderDetails1.formats.price}"/>
    </af:inputText>
    </af:column>
    </af:column>
    <af:column sortable="false" headerText="Сумма"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column35}"
    id="column35">
    <af:column sortProperty="sumWithoutTax" sortable="false"
    headerText="Без НДС"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column32}"
    id="column32">
    <af:inputText value="#{row.sumWithoutTax}"
    required="true" columns="6"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText41}"
    id="inputText41"
    requiredMessageDetail='Поле "Сумма без НДС" обязательно для заполнения'
    autoSubmit="true"
    valueChangeListener="#{backing_documents_outcoming_unprocessing_type_15_edit_01.changeSum}"
    readOnly="false">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.findVMIOrderDetails1.formats.sumWithoutTax}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="totalSum" sortable="false"
    headerText="С НДС"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column33}"
    id="column33">
    <af:inputText value="#{row.totalSum}" required="true"
    columns="6"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText42}"
    id="inputText42"
    requiredMessageDetail='Поле "Сумма с НДС" обязательно для заполнения'
    autoSubmit="true"
    valueChangeListener="#{backing_documents_outcoming_unprocessing_type_15_edit_01.changeSum}"
    validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorTotalSum}"
    readOnly="false">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.findVMIOrderDetails1.formats.totalSum}"/>
    </af:inputText>
    </af:column>
    </af:column>
    <f:facet name="selection">
    <af:tableSelectOne text="Select and"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.tableSelectOne2}"
    id="tableSelectOne2">
    <af:commandLink text="Удалить"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.commandLink5}"
    id="commandLink5"
    action="#{backing_documents_outcoming_unprocessing_type_15_edit_01.deleteRow}"
    styleClass="tableControlButton"
    immediate="false"/>
    </af:tableSelectOne>
    </f:facet>
    <f:facet name="actions">
    <h:panelGroup binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.panelGroup2}"
    id="panelGroup2">
    <af:commandLink text="Добавить"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.commandLink6}"
    id="commandLink6"
    styleClass="tableControlButton"
    immediate="false"
    action="#{backing_documents_outcoming_unprocessing_type_15_edit_01.addRows}"
    useWindow="true" windowHeight="500"
    windowWidth="600"
    returnListener="#{backing_documents_outcoming_unprocessing_type_15_edit_01.returnHandlerGoods}"
    rendered="#{bindings.JdDoctype02rspType.inputValue == 9&amp;&amp;bindings.JdDoctype02orderrspId.inputValue==null}"/>
    <af:commandLink text="Пересчитать" id="commandLink31"
    styleClass="tableControlButton"
    binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.commandLink31}"
    action="#{backing_documents_outcoming_unprocessing_type_15_edit_01.calc}"
    useWindow="true" immediate="false">
    <af:setActionListener from="#{row.rowKeyStr}"
    to="#{processScope.mainRowKeyStr}"/>
    </af:commandLink>
    </h:panelGroup>
    </f:facet>
    </af:table>

Maybe you are looking for

  • Error in creating a PDF

    When I create a very big PDF-Document with several hundreds of pages I receive the followung error message: Q: Do I have to configure the PresentationServer in a better way? Regards, Stefan +++ ThreadID: 1964 : 2008-04-22 10:25:53.000 [nQSError: 7700

  • Problem with broadcasting with 123-2.JA2

    Since I did an upgrade from 122-13.JA4 to 123-2.JA2 we have problems with locally generated udp broadcast in the wl-environment. The clients associate without any problems with leap and has absolutely no problems with unicast traffic. But locally bro

  • Function Module question

    Hello, When i execute this code, I am getting a run-time short dump. The error says: 'Overwritten protection field'. The error says that we cannot modify the field-symbols. The error points to the highlighted portion of the code. How to overcome the

  • Final Cut Pro keeps crashing after working for a few minutes

    I would work for a few seconds and then it will crash. Here is the crash log please help!! Process:         Final Cut Pro [20192] Path:            /Applications/Final Cut Pro.app/Contents/MacOS/Final Cut Pro Identifier:      com.apple.FinalCut Versio

  • Connecting ipod quits itunes.

    I just switched from pc to mac and was just switching my ipod doing a full restore. after the ipod restored and itunes reopened it automatically quit itunes. Itunes works fine when my ipod is disconnected. but itunes doesn't even stay open long enoug