How to refresh DataBase Tables

Hello,
The below ABAP code is fetching WorkItem Id from the table SDOE00D00000.
But the problem is , when i execute the script for the first time, it gets me the old data and when i execute for the second time, it fetches the latest data from the table.
Can anyone kindly help me to resolve my issue ?
ABAP.
tables : SDOE00D00000.
data : It_t1 type table of SDOE00D00000,
       WA_T1 like SDOE00D00000.
    REFRESH It_t1 FROM TABLE SDOE00D00000 .
      SELECT SINGLE * FROM SDOE00D00000 INTO WA_T1 where C1 = V_WORK_ITEM_ID_MAIN.
      WA_T2 = WA_T1.
ENDABAP.
regards
harsha

Hi Harsha,
                    I dont think your thread is related to eCATTs, hence this thread is moved to ABAP general forum.
Kindly post your threads in an appropriate forum to get fast response.
Thanks and Kind Regards
Mohan

Similar Messages

  • How-To "Refresh a table of data after inserting or deleting"

    I'd like to say a word on the how-to article "How to refresh a table of data after inserting or deleting a row using ADF".
    (http://www.oracle.com/technology/products/jdev/howtos/1013/updtable/index.html?_template=/ocom/technology/content/print)
    I spent a lot of time on it because I needed help in implementing simple CRUD functionality on a table, using JSF-ADF-TopLink technologies.
    While the the article does provide correct steps, it is in one important place not specific enough, so the reader may easily get stuck. In section "Refresh the data table", point 1: when you double click on the removeEntity() button, in Structure window, then you do not get the required dialog. You get CommandButton Properties dialog.
    You must click on the removeEntity() button in Editor's Design view. But even there you may get the CommandButton Properties dialog, not managed beans dialog.
    You may resolve that by going to JSF configuration file, faces-config.xml, and switch to Overview view. This will show you the managed beans that you have.
    Then, you may already have a backing bean for the page. You can use that and avoid creating a new managed bean.
    I could understand what the operations mean only after very careful reading of "Creating More Complex Pages", section "Overriding Declarative Methods" in JDeveloper Help (or in ADF Developer's Guide PDF document).
    In general: I believe that "ADF bindings" need more conceptual explanation, maybe in form of an article. Grammatical form "bindings" may create a false understanding that "bindings" are just references. But they are not -- ADF bindings are active objects that handle traffic between UI components and Data Controls. It seems that "bindings" even communicate among themselves. Maybe it would be more understandable to differentiate strictly between "binding objects" (or "binders"?), binding object definitions and binding object references.
    It would be very helpful to have a diagram showing grahically what specific binder objects are created in a small apllication (2-3 pages using 1-2 tables), with whom they communicate and what type of data is passed on.
    Priit

    Hi
    Thanks for your infos.
    Yes exactly I use almost the same code you have post here.
    Could You answer to my next questions?
    First - >what do you mean by saying that "it's not good idea using refreshing in IE?" Of course I use refreshing in backing_bean for my button "remove" that removes row, commit changes to database and refresh table, almost the same as You said in your post:
    Code in backing_bean is and comments on difference to Your code is below:
    public commandButton2_action1(){
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("removeEntity");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    //above remove entity, but I dont now if it do commit to database? So i do it below
    OperationBinding commit1 = bindings.getOperationBinding("Commit");
    commit1.execute();
    //and at the end I refresh my table, "findAllRezerwacja1 - it is an id of the methodAction, not the iterator -> is it ok? or should I change to Iterator id?
    OperationBinding requery = bindings.getOperationBinding("findAllRezerwacja1");
    requery.execute();
    return null;
    Page Definition code for this:
    <methodAction id="findAllRezerwacja1"
    InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" MethodName="findAllRezerwacja"
    RequiresUpdateModel="true" Action="999"
    ReturnName="SessionEJBLocal.methodResults.SessionEJBLocal_dataProvider_findAllRezerwacja_result"/>
    <table id="findAllRezerwacja2" IterBinding="findAllRezerwacja1Iter">
    <AttrNames>
    <Item Value="dataDo"/>
    <Item Value="dataOd"/>
    <Item Value="idRezerwacja"/>
    <Item Value="liczbaUczestnikow"/>
    <Item Value="prowadzacy"/>
    <Item Value="uwagi"/>
    </AttrNames>
    </table>
    <methodAction id="removeEntity" InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" MethodName="removeEntity"
    RequiresUpdateModel="true" Action="999">
    <NamedData NDName="entity"
    NDValue="${bindings.findAllRezerwacja2.currentRow.dataProvider}"
    NDType="java.lang.Object"/>
    </methodAction>
    <action id="Commit" IterBinding="findAllRezerwacja1Iter"
    InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" RequiresUpdateModel="true"
    Action="2"/>
    </bindings>
    //and rest of code for Iterator etc
    My second question is, why when you use refresh button in IE (I know is not recommended as You said, but sometimes user do it, so I want prevent situations that I will describe here) so when I press refresh button in IE exactly after removing one row by clicking my button, refreshing by pressing IE button is doing the same --> is deleting next row. How to stop deleting row, when for example user would press IE refresh button after pressing remove button for table. If I change selection in table after deleting row, and press refresh button in IE, instead of deleting row, I got error message: JBO-29000: JBO-35007: and
    JBO-35007. So where Im doing wrong. Maybe I should do sth with postback ? Could You help me? Thanks in advance
    Last one question: what is the difference between using delete and removeEntity from operations node? Im now reading carefully ADF Dev Guide, so I hope I can find infos there? But if You know, please answer to this question.
    Thanks

  • How to view database table in OAF run page.

    Hi,
    how to view database table in OAF run page,any manual setting .please help me.
    thanks
    saran.

    Hi;
    1. This site side related EBS for your issue there is sqldeveloer dedicated forum side
    Forum Home » Application Development in PL/SQL » SQL Developer (Not for general SQL/PLSQL questions)
    2. Please see:
    http://docs.oracle.com/cd/B10501_01/java.920/a96655.pdf
    Regard
    Helios

  • How to view database table in oracle9i Jdeveloper

    Hi,
    how to view database table in oracle9i jdeveloper,any manual setting .please help me.
    thanks
    saran.

    In Jdeveloper go to View-->Connection Nevigator. there you will see all kind of connctions. Expand Database and check if your DB connection is present there. If not, you need to create using right clicking on Database and choose New Database Connecton. Here few screens will be there where you need to put the TNS entries of your database.
    Once DB connection is created, you can expand the connection by clicking on + icon and you can see different available schema objects. Again you need to expand Tables and you can look for specific table in there.
    Hope this clears your doubts.
    Thanks,
    Mukesh Uchaniya

  • How to view database table in oracle9i developer

    Hi,
    how to view database table in oracle9i developer,any manual setting .please help me.
    thanks
    saran.

    Hi;
    1. This site side related EBS for your issue there is sqldeveloer dedicated forum side
    Forum Home » Application Development in PL/SQL » SQL Developer (Not for general SQL/PLSQL questions)
    2. Please see:
    http://docs.oracle.com/cd/B10501_01/java.920/a96655.pdf
    Regard
    Helios

  • How to refresh the table control on some action

    Hi All,
         In a web Dynpro application, I am filling data to the Table control through Supply function. When  I do some action (like save new record )  i want to refresh the table control means add the newly added record.
       How to refresh the Table control.
    Thanks
    Hemalatha

    hi hema........
        if you are using a select query inside the supply function...
        then...
        you can just use node->invalidate(). method..
        it just invalidates the node that is bound to the table.
       so the supply function will be called again, which again uses the select query to fetch the values.. so that your table gets refreshed.
    ---regards,
       alex b justin

  • How to update database table !!!

    hi all,
    Please advice how to update database table with certain cndition needs to be checked.
    Please consider below scenario.
    have used enqueu and dequeue function to lock entries  and also i have used BAPI so considering that return parameter . i want to update table
    /tdk/st0027.
    1. I want to update database table
    2. there are certain condition needs to be checked like ,
       loop at it_final into wa_final.
    th_return-type = 'S'.
               if th_final-vbeln = /tdk/st0027-vbeln and
                  th_final-posnr = /tdk/st0027-posnr and
                  th_final-etenr = /tdk/st0027-sdslno.
    above condition which i need to check .and need to append below system fields need to be appended in table.
              th_final-prstsind = '20'.
              th_final-chgdate  = g_date.
              th_final-chgtime  = g_uzeit.
              th_final-chgprog  = g_cprog.
              th_final-chguser  = g_uname.
              append th_final to td_final.
              update /tdk/st0027 FROM th_final.
              endif.
    endloop.
    but i am getting error saying that  "The type od database table and work area (TH_FINAL)  are not unicode convertible"?
    I am not able to understandwhat would be the solution for this ?
    Thanks and regards,
    Prasad K. NAralkar

    The error occurs in the UPDATE statement included in the code. In this statement it is seen that there is a mismatch of structure defined for the DDIC table /tdk/st0027 and that of your work area th_final.
    try to create a structure w.r.t the DDIC table.
    Eg: DATA: wa_temp TYPE /tdk/st0027.
    MOVE-CORRESPONDING th_final TO wa_temp.
    Then try to UPDATE using the temporary work area i.e wa_temp which has structure similar to that of the database table.

  • How to convert database table into xml file

    Hi.
    How to convert database table into XML file in Oracle HTML DB.
    Please let me know.
    Thanks.

    This not really a specific APEX question... but I search the database forum and found this thread which I think will help
    Exporting Oracle table to XML
    If it does not I suggest looking at the database forum or have a look at this document on using the XML toolkit
    http://download-east.oracle.com/docs/html/B12146_01/c_xml.htm
    Hope this helps
    Chris

  • How to send database table

    how to send database table one sever to another server in the form of  tms request.
    i want send a particular database table one server to another as a request.
    give solution plz
    Message was edited by:
            mahesh

    Hi Mahesh,
    Technically it is possible to transport entries of every table in SAP even if changes dont prompt for a transport request. Do the following. Create a customising/workbench request. It depends of the table whose entires you wish to transport. .If you wish you can just  use workbench transport for all tables.
    After you have created the transport click on the request and in menu bar choose Request/Task and then Display object list. Goto change mode.
    Click on Inset line icon in application tool bar. A new line for input will come up.
    In PGMID give the value R3TR
    In Obj give value TABU
    In Object Name give the name of the table.
    After that double click on table name entry. You will come to the screen: Transport organizer:Change Key List.
    Here again choose insert line. A new line with table  name and key as the column headers will come up.
    Double click on the empty input field for the key. In the next screen you will get options to fill in the key.
    You can insert key as per your choice. However one thing needs to be remembered. If you put * in any field SAP wont allow you fill in value in later fields as only a final asterisk can be used as a generic entry.
    Please try out this option. I use this option to transport RFC destinations as well profile parameters across systems.
    Please award points if the answer was of help to you.
    Regards.
    Ruchit.

  • How to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method.

    how to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method.  thanks

    INSERT targetdb.dbo.tbl (col1, col2, col3, ...)
       SELECT col1, col2, col3, ...
       FROM   sourcedb.dbo.tbl
    Or what is your question really about? Since you talke about foreign keys etc, I suspect that you want to transfer the entire table definition, but you cannot do that with an INSERT statement.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to refresh 'Z' Table in BADI ?

    Hi Experts,
    How to refresh a 'Z' table in BADI. Through BADI we are updating the components items to 'Z' table.
    Thanks,
    vinay.

    Hi Abapers,
    How to refresh 'Z' Table in BADI ?
    Actually in BADI I am updating BOM components items to Z Table.
    Useful answer rewarded points.
    Thanks,
    vinay.

  • How to print database table records in graphical format?

    In ABAP Editor,I put select query on one database table and fetch few records .Now I want to show these records in BAR Graph / pie chart.Kindly let me know is it possible and how?
    Thanks in advance.
    Edited by: rushah on May 21, 2009 5:30 AM

    Hi Hadiman,
    Can you please elaborate more on it.
    Like my code is......
    SELECT * FROM trfcqout
      INTO CORRESPONDING FIELDS OF itab
      WHERE ( qstate = 'SYSFAIL' OR qstate = 'CPICERR' OR errmess <> '' )
    and ( QRFCDATUM >= date-low and QRFCDATUM <= date-high ).
        count = 0.
        if itab is not initial.
          SELECT * FROM trfcqout
          INTO CORRESPONDING FIELDS OF itab1
          WHERE qname = itab-qname AND errmess = ''.
            count = count + 1.
          ENDSELECT.
          itab-retrydate = sysdate.
          itab-retrytime = systime.
          itab-qtype = 'OUTBOUND'.
          itab-nentries = count - 1.
          append itab.
          MODIFY zqueue FROM itab.
        endif.
      ENDSELECT.
    Print details on Report
      write: / sy-vline no-gap,(7) 'QTYPE' COLOR 1, sy-vline no-gap,(23)
    'QNAME' COLOR 1,sy-vline no-gap,(14) 'QSTATE' COLOR 1, sy-vline no-gap,
    (54) 'Error' COLOR 1,sy-vline no-gap,(10) 'Number' COLOR 1.
      uline.
      LOOP AT itab.
        write: /   sy-vline no-gap,  (8)  itab-qtype no-gap,
                   sy-vline no-gap,  (24) itab-qname no-gap,
                   sy-vline no-gap,  (15) itab-qstate no-gap,
                   sy-vline no-gap,  (55) itab-errmess no-gap,
                   sy-vline no-gap,  (10) itab-nentries no-gap.
      ENDLOOP.
      uline.
      refresh itab.
    endform.                    "queuedata
    Now I want to print data in graphical form. how to do that?

  • How to refresh a table with multiple joins

    Hi,
    First at all, I'm newby in ADF, and my english is no so good, sorry for that...
    I'm using JDeveloper 11g Release 2 (11.1.2.3.0). I have a table created from a view object that have multiple joins with other entities. When I insert a new row programmatically in one of the entities of the joins (not in the entitiy of the view object itself), the new row is created in the database correctly but the table don't show it. What can I do to refresh the table to see the new row created?
    Thanks in advance!

    You have to update the iterator the table is based on for the ui last. You do that by executing the query on the iterator again.
    Timo

  • How to find database table for field in CRMD_ORDER?

    Hello,
    in CRMD_ORDER there is a field CRMT_7850_SERVICE_UI-DURATION.
    The structure is CRMT_7850_SERVICE_UI
    The fieldname is DURATION
    How can i find out in which database table content of this field is stored?
    Thanks a lot
    Best regards
    Manfred

    Hi,
    When you execute report CRM_ORDER_READ (trx. se38), entering your order nr, you will get
    an overview of all the underlying tables and their entries of the order.
    E.g. you will find structure ET_SERVICE_H, corresponding to table CRMD_SERVICE_H;
    structure ET_SERVICE_I, corresponding to table CRMD_SERVICE_I.
    I expect your field (duration) to be in CRMD_SERVICE_I.
    regards,
    Wim

  • How to refresh Adf  table from Adf popup

    Hi all,
    i have and adf query panel with table. On this table for each record, there is a button to perform some operations. When i click this button i am launching an adf popup. Inside this popup i have used a adf dialog of type yes/no. i am using this as a confirmation. (ex- Are you sure you want to change (ex- deactivate) this record?) If yes is clicked i change only one field. Suppose the record belongs to a client. On click of yes, i change the status to some value. ex- deactivate. so with the dialog's button click, i change the table data. but it is not reflected unless i made a query. i want to automatically refresh this table on click of dialog button's yes. I hope i made my self clear. Can this be done with Jdev. Im using Jdev 11.1.1.0.1. Pls help me with this.
    Thanks in advance,
    Nad

    Hi Maxi, Timo, i tried the solutions by both of you. Thanks alot for replying. But i get an error. This is what i did. for Deactivate btn in the table, i have added the below return listerner code.
    public void onReturnFromDialog(ReturnEvent returnEvent) {
    if (returnEvent.getReturnValue() != null) {
    refreshCurrentPage();
    protected void refreshCurrentPage() {
    FacesContext context = FacesContext.getCurrentInstance();
    String currentView = context.getViewRoot().getViewId();
    ViewHandler vh = context.getApplication().getViewHandler();
    UIViewRoot x = vh.createView(context, currentView);
    x.setViewId(currentView);
    context.setViewRoot(x);
    but i noticed that both these methods are not invoked. So i added the below dialoglistener code to the af:dialog that is inside my popup. This popup is shown when the deactivate btn is clicked.
    public void DialogListenAction(DialogEvent dialogEvent) {
    if(dialogEvent.getOutcome().toString().equals("yes"))
    DCIteratorBinding iter = ADFUtils.getIterator("MembersVO3");
    String des = (String) iter.getCurrentRow().getAttribute("MemberCode");
    service.deactivateMember(des); //This is where i update the record and set the attribute value to des
    System.out.println("suspect1");
    RequestContext.getCurrentInstance().returnFromDialog(des,null);
    //AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
    //afContext.getCurrentInstance().returnFromDialog(des, null);
    System.out.println("suspect2");
    //ifCancel Do nothing
    when i add 'RequestContext.getCurrentInstance().returnFromDialog(des,null);'
    OR
    'AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
    afContext.getCurrentInstance().returnFromDialog(des, null);'
    i get the error - java.lang.IllegalStateException: popView(): No view has been pushed.
    i cant figure out what is the wrong here. Can some one pls suggest how to resolve this?
    Thanks alot.

Maybe you are looking for