Clear & refresh statements

hi all,
could u pls give me a brief example about when do we exactly clear the header and refresh the body of an internal table .
thanks in advance
spoorthimanohar

Hi,
Clear:
Deletes the content of the header area of internal table
Does not delete the content of the internal table
Refresh:
Deletes the content of the internal table
Does not delete the content of the header area
We clear the header while updating or appending data into internal table
let itab be the intenal table with header line.
itab-name = 'XXXX'.
itab-empno = 'XXXX'.
append itab.
clear itab.  -> <b>clears the header line.</b> 
<b>refresh itab can also be used.</b>
Refresh does not refresh the body of internal table . It refreshes only the header line.
clear[]  -  clears the body of the internal table.
Regards,
Priyanka.

Similar Messages

  • Not able to clear bank statement accounting entry with payment document.

    Hello FI guru,
    We are facing  problem to clear bank statement accounting entry with payment document  posted via t.code F110 (Automatic payment program).
    There is only single entry for payment in bank statment . But many entries in F110 for different vendors. Will posting the bank statement entry i.e Bank clear account Dr
                                        To Bank main account
    Its post with an error Error F5 263 the diference is too large.
    We are using muticash format & we have use 4 which clear Dr GL
    Request your help to resolve the problem Whether we missed any configuration or we have develop program for the same

    Hi,
    This error generally is due to tolerance error. Please check the assignment of the user id with the relevant tolerance groups. Let me know if it worked.
    or go through the following link
    F5 263 - The difference is too large for clearing
    BR,
    Satya

  • Clear/refresh(F5) fields in web dynpro application view

    How to clear or refresh(F5) fields in web dynpro application abap while redirecting to another view? I have tried using "context_node->invalidate()" but it's not working for all the fields, some are getting initialised and some not. Is there any other method to refresh all the fields in the view all at once. Please guide.

    Hi,
    For the Context node( to which the drop down is bound) create a supply function as shown below:
    Now populate the drop down in supply function method instead of WDDOINIT method.
    Go to methods tab and write the below code in supply function method:
    DATA lo_nd_drop TYPE REF TO if_wd_context_node.
        DATA lt_drop TYPE wd_this->elements_drop.
        DATA ls_drop TYPE wd_this->element_drop.
    *Fill Drop down
        ls_drop-val = 'ABC'.
        APPEND ls_drop to lt_drop.
        ls_drop-val = 'DEF'.
        APPEND ls_drop to lt_drop.
    * bind all the elements
       node->bind_table(
         new_items            =  lt_drop
         set_initial_elements = abap_true ).
    Now once you call invalidate( ) the drop down will automatically be initialized( since the supply function will be called again) And you don't have to write the code again to populate the drop down.
    hope it's clear now.
    Regards,
    Kiran

  • Clearing write statements

    We are facing a problem with clearing the write statement buffer.
    Our aim is to send mail by compressing the list memory, and the mail is sent in a loop. In each loop we have different set of data to be sent. But problem here is in the mails after the first mail, the data is getting appended in the subsequent mails.
    For example,
    do 10 times.
    *****Have to clear buffer here*****
    write :/ hi.
    perform sendmail.
    enddo.
    The above code should give ten emails...with only "hi". In other words, the list output should be only one "hi" and not 10 times hi. WE have tried all possibilites to clear the write buffer, Any help in this regard is highly appreciated.

    Hi aakash,
    1. use MODIFY LINE concept,
       to modify the line number 1
       (so that line 1 is RE-WRITTEN there itself,
        instead of line 2, 3, 4,..etc)
    2. just copy paste
    3. It will give only 1 HI, in 10 loops.
    4.
    report abc.
    DATA : MSG(100) TYPE C.
    MSG = 'HI'.
    DO 10 TIMES.
      IF SY-INDEX = 1.
        WRITE :/ MSG.
      ELSE.
        MODIFY LINE 1 LINE VALUE  FROM MSG.
      ENDIF.
    ENDDO.
    regards,
    amit m.

  • I had to go back to IE 8 for online banking. Had to Clear SSL State, too in IE to make a new page work. Is there an equivalent in Firefox??

    My online banking website recently made some major programming changes. Since then, I have not been able to use Firefox for the banking website.
    The bank help desk had me install IE 8, then clear the SSL state using a feature in IE's options/content screen. So now the new page works in IE but still does not in Firefox. From what I have learned from the bank help desk, it appears that there is some kind of an ssl hand shake failure within the one page since their changes.
    Is there a similar feature in Firefox where I can clear the SSL state?

    First update back to Firefox 16.0.2, as staying on older versions leaves you extremely vulnerable to security holes.
    Then try using [https://addons.mozilla.org/en-US/firefox/addon/email-this https://addons.mozilla.org/en-US/firefox/addon/email-this]

  • Clear session state for related application/page

    I have an application item I want to clear and I am not sure what is
    the correct session state process type to select
    I am reading about the different state process but I am not sure.
    I thought it was
    Clear Cache for Items (ITEM,ITEM,ITEM) but this item has to be on a page.
    What would be the appropriate one to select to clear an application item
    Clear Cache For Applications (removes all session state for listed applications)
    Clear Cache For Current Application (removes all session state for current application)
    Clear Cache For Current Session (removes all state for current session)
    Clear Cache for Items (ITEM,ITEM,ITEM)
    Clear Cache for all Items on Pages (PageID,PageID,PageID)
    Reset Preferences (remove all preferences for current user)
    Set Preference to value of Item (PreferenceName:ITEM)
    Set Preference to value of Item if item is not null (PreferenceName:ITEM)
    Howard

    How do I name the application item.. I tried the following.
    itemName
    :itemName
    application:itemName
    and neither of these 2 work. Did I miss anything.
    Howard
    Edited by: csphard on Oct 29, 2009 10:11 AM
    Edited by: csphard on Oct 29, 2009 10:13 AM

  • Dynamic query built from items is not refreshing state

    Hi. I'm generating a report table using the Pl/SQL function returns SQL query report region. My region source is:
    declare
    v_tbl varchar2(500);
    v_sql varchar2(32676);
    begin
    v_tbl := v('P7_STUDENT_TBL');
    v_sql := 'select b.grade,
    b.lastname,
    b.firstname,
    b.middlename,
    b.permnum,
    a.student_attended,
    a.parent_attended,
    a.num_assoc_w_student,
    a.ea_id
    from event_attendance a right outer join ' || v_tbl || ' b
    on ( lpad(a.permnum, 12, '' '') = b.permnum
    and a.event_id = ' || v('P7_EVENT_ID') || ' )
    where b.status = '' ''
    order by b.lastname, b.firstname ';
    return v_sql;
    end;
    As you can see, the query relies on a dynamic table name and event id. These 2 items are hidden items, although i've checked them and they are correct, as is the sql query supposed to generate the report.
    It seems i have to go back and forth between the event page and this page in order for the report to "catch up" to the items (event id, table name).
    It's almost like it's cached the old report, and won't discard it and bring up the current report unless the page is repeatedly accessed. There's no place to designate the source to be "Always, replacing any existing value in session state" like other items.
    My dynamic tablename is accessing a remote database using a dblink. It's working, and shouldn't be remarkably slower, but i'm wondering why my report is not current with the items its using to generate the report?
    I hope this is clear... any ideas?

    Thanks for the reply, Scott.
    I am indeed using bind variables in my query. The page before the "event attendance" page is "events" where you can search for an event. A link for attendance is there for each event record, which passes on the event id to the event attendance page, where you are recording the attendance for that event, which is for a particular school.
    The query uses the event id and the school id in the query. The school table is dynamic, so i get the table's name from a function call. This query generates the list of students and some form elements for each student so you can record their attendance at an event.
    Now i've verified that the table name, school id, event id, and even query are correct, by creating items i can see displayed on the page with their values. And the report is correct, but it seems a step behind.
    For example, i may have an event for school 100. If i go back and select an event for school 200 to edit the attendance, my students are still from school 100. If i go back and select an event for school 300 to record attendance on, my students are from school 200. So you see, it's like the bind variables are hanging around. Yet if i look at the items (which are the same pl/sql source, but are items, not regions) they are correct.
    My item query (which shows proper substitutions) is:
    select b.grade,
    b.lastname,
    b.firstname,
    b.middlename,
    b.permnum,
    a.student_attended,
    a.parent_attended,
    a.num_assoc_w_student,
    a.ea_id
    from event_attendance a right outer join schema.school015@dblink b
    on ( lpad(a.permnum, 12, ' ') = b.permnum
    and a.event_id = 91 )
    where b.status = ' '
    order by b.lastname, b.firstname
    This item has EXACTLY the same pl/sql function returning sql source as the region, but it's an item, not a region. So what you see is the parsed query.
    And here's my debug output:
    0.00: S H O W: application="114" page="7" workspace="" request="" session="8149080792357934854"
    0.01: alter session set nls_language="AMERICAN"
    0.01: alter session set nls_territory="AMERICA"
    0.01: ...Setting NLS Decimal separator="."
    0.01: Application 114, Authentication: CUSTOM2, Page Template: 5225413680368493
    0.01: ...Supplied session ID can be used
    0.01: ...Application session: 8149080792357934854, user=ARICHMOND
    0.01: ...Determine if user ARICHMOND with SGID 4503012961108875 can develop application 114 in workspace 4503012961108875
    0.01: Fetch session header information
    0.01: Branch point: BEFORE_HEADER
    0.02: Fetch application meta data
    0.02: ...fetch page attributes: f114, p7
    0.02: Fetch session state from database
    0.02: Computation point: BEFORE_HEADER
    0.02: Processing point: BEFORE_HEADER
    0.03: Show page template header
    0.03: Computation point: AFTER_HEADER
    0.03: Processing point: AFTER_HEADER
    0.03: Computation point: BEFORE_BOX_BODY
    0.03: Processing point: BEFORE_BOX_BODY
    0.03: Region 1:Record Event Attendance for the following event:
    Edit
    0.04: FORMITEM: P7_EVENT_SCHOOL_DESC DISPLAY_ONLY_HTML
    School:      School 015
    0.04: FORMITEM: P7_EVENT_TYPE_AND_DATE DISPLAY_ONLY_HTML
    Event:      Event Desc
    0.04: FORMITEM: P7_LOCATION DISPLAY_ONLY_HTML
    Location:      Auditorium
    0.04: FORMITEM: P7_SCHOOLNUM DISPLAY_AND_SAVE      snum 015
    0.04: FORMITEM: P7_STUDENT_TBL DISPLAY_AND_SAVE
    tbl :      schooltbl015
    0.04: FORMITEM: P7_QUERY TEXTAREA
    (see query above)
    0.05: Region 2:Students
    StudentsEdit
    Edit Edit     
    0.05: show report 15
    0.05: set report template: user defined template
    0.06: determine column headings
    0.06: is numeric ?
    0.06: parse query
    0.06: describe columns
    0.07: define columns
    0.07: execute cursor
    0.07: print template before rows text
    0.07: print column headings
    0.07: rows loop
    0.30: pagination
    0.30: print template after rows text
    0.30: Computation point: AFTER_BOX_BODY
    0.30: Processing point: AFTER_BOX_BODY
    0.30: Computation point: BEFORE_FOOTER
    0.30: Processing point: BEFORE_FOOTER
    0.30: Show page tempate footer
    0.31: Computation point: AFTER_FOOTER
    0.31: Processing point: AFTER_FOOTER
    0.31: Log Activity:
    0.31: End Show:

  • JButton setEnabled method is not refreshing state

    Hi there, I have a problem, I'm putting a few JButtons into a JPanel, so that I can display the options that an user has.
    I validate the user options so I can put the set enabled method with argument true or false.
    The app show a login JFrame and then the screen that has these options, that is like the main form.
    The fact is that is try to login again via a change user option located on the main form,, then the login JFrame is displayed again and eventually the main form.
    When I try enable the user options again, the method setEnabled of the JButton doesn´t seem to be working, it just doesn't change the state, I have the debugged it and it reaches in both cases the setEnabled line (((JButton) jpnlSistemas1.getComponents()).setEnabled(true);)
            Sistema sistema;
            JButton boton;
            for (int i = 0; i < jpnlSistemas1.getComponents().length; i++) {
                if (jpnlSistemas1.getComponents() instanceof JButton) {
    boton = (JButton) jpnlSistemas1.getComponents()[i];
    Iterator iteradorSistemas = global.getUsuario().getSistemas().iterator();
    while (iteradorSistemas.hasNext()) {
    sistema = (Sistema) iteradorSistemas.next();
    if (((JButton) jpnlSistemas1.getComponents()[i]).getName().equals(sistema.getIdSistema())) {
    ((JButton) jpnlSistemas1.getComponents()[i]).setEnabled(true);
    any ideas about what could it be?
    thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I'd do it differently. I'd have whatever class that holds the JButtons have a enableButton() method, and then simply call that method rather than searching for buttons among all the components of a window.

  • How do you clear an SSL State in a Firefox version 20 web browser?

    When browsing PKI-enabled websites, the session will timeout so ofter. To re-enable your session in Internet Explorer your Clear SSL state by going to Tools>Internet Options>Content(tab)>Clear SSL State. When this option is used, I use my Common Access Card to re-access the site.
    It used to be you could do "tools | start private browsing" then stop it and reload the page and Firefox would clear the SSL state.
    In version 21 and above this appears to be missing? Is there any way to do this?

    You are using a''' Very''' old version of Firefox.
    Can you go to '''Mozilla.org''' to update the program?

  • (statement cache size = 0) == clear statement cache ?

    Hi
    I ran this test with WLS 8.1. I set to the cache size to 5, and I call a servlet
    which invokes a stored procedure to get the statement cached. I then recompile
    the proc, set the statement cache size to 0 and re-execute the servlet.
    The result is:
    java.sql.SQLException: ORA-04068: existing state of packages has been discarded
    ORA-04061: existing state of package "CCDB_APPS.MSSG_PROCS" has been invalidated
    ORA-04065: not executed, altered or dropped package "CCDB_APPS.MSSG_PROCS"
    ORA-06508: PL/SQL: could not find program unit being called
    ORA-06512: at line 1
    which seems to suggest even though the cache size has set to 0, previously cached
    statements are not cleared.
    Rgs
    Erik

    Galen Boyer wrote:
    On Fri, 05 Dec 2003, [email protected] wrote:
    Galen Boyer wrote:
    On 14 Nov 2003, [email protected] wrote:
    Hi
    I ran this test with WLS 8.1. I set to the cache size to 5,
    and I call a servlet which invokes a stored procedure to get
    the statement cached. I then recompile the proc, set the
    statement cache size to 0 and re-execute the servlet.
    The result is:
    java.sql.SQLException: ORA-04068: existing state of packages
    has been discarded ORA-04061: existing state of package
    "CCDB_APPS.MSSG_PROCS" has been invalidated
    ORA-04065: not executed, altered or dropped package
    "CCDB_APPS.MSSG_PROCS" ORA-06508: PL/SQL: could not find
    program unit being called ORA-06512: at line 1
    which seems to suggest even though the cache size has set to
    0, previously cached statements are not cleared.This is actually an Oracle message. Do the following test.
    Open two sqlplus sessions. In one, execute the package.
    Then, in the other, drop and recreate that package. Then, go
    to the previous window and execute that same package. You
    will get that error. Now, in that same sqlplus session,
    execute that same line one more time and it goes through. In
    short, in your above test, execute your servlet twice and I
    bet on the second execution you have no issue.Hi. We did some testing offline, and verified that even a
    standalone java program: 1 - making and executing a prepared
    statement (calling the procedure), 2 - waiting while the
    procedure gets recompiled, 3 - re-executing the prepared
    statement gets the exception, BUT ALSO, 4 - closing the
    statement after the failure, and making a new identical
    statement, and executing it will also get the exception! JoeI just had the chance to test this within weblogic and not just
    sqlplus.Note, I wasn't using SQL-PLUS, I wrote a standalone program
    using Oracle's driver...
    MY SCENARIO:
    I had one connection only in my pool. I executed a package.
    Then, went into the database and recompiled that package. Next
    execution from app found this error. I then subsequently
    executed the same package from the app and it was successful.And this was with the cache turned off, correct?
    What the application needs to do is catch that error and within
    the same connection, resubmit the execution request. All
    connections within the pool will get invalidated for that
    package's execution.Have you tried this? Did you try to re-use the statement you had,
    or did you make a new one?
    Maybe Weblogic could understand this and behave this way for
    Oracle connections?It's not likely that we will be intercepting all exceptions
    coming from a DBMS driver to find out whether it's a particular
    failure, and then know that we can/must clear the statement cache.
    Note also that even if we did, as I described, the test program I
    ran did try to make a new statement to replace the one that
    failed, and the new statement also failed.
    In your case, you don't even have a cache. Would you verify
    in your code, what sort of inline retry works for you?
    Joe

  • Clearing state currentState = ''; not working

    I am developing a code where I have developed three components that is three states for me. I have a contol on my home screen (base state) which is able to take me to any of these states whenever required. My issue is once I reach to say in State A and want to go back to home page. My "HOME" button in State A is not working even after I am clearing state using currentState = '' ; Do I have to do anything extra to get it to home page from State A here? Any help would be highly appreciated!!

    Whenever I create a flex app that has several states, I've gotten into
    the habit of simply copying my base state and renaming it something
    to the effect of "start", so rather than trying to clear your state try this method. 
    Slightly superfluous and even a tad bit inane, but it works and gives you an
    extra state buffer between impromptu edits and your base state .
    So copy your base state
    and rather than:
               currentState = "";
    try      currentState = "start";
    on for size.

  • Clearing of selections screen

    Hi!
    I wanted to asked how to clear a first screen of selections screen ( contains Parameters ans select options )  from another scrren ?
    I created an ALV report. The first screen of the report is a selections screen that contains select options and Parameters. The Alv was created by Object oriented method (not by the function 'reuse_alv_*' ) in
    a second screen. I want from the second screen on certain circumstances to leave the alv screen and to set the first screen ( that contains select options and Parameters ), however when i call the first screen i want to clear all select options and parameters, and my question is how to clear all select options and parameters before i leave to the first screen ?
    thanks
    moshe

    Hi Moshe
    Just I said in my answer you can't do a CLEAR statament in that point of your code, because the system manages the return of old data in selection screen.
    The system do what importing old data from ABAP MEMORY in the event INITIALIZATION, so or you clear the ABAP MEMORY or you clear the selection-screen in the event AT SELECTION-SCREEN OUTPUT.
    You can try this:
    IF g_it_d_data[] IS INITIAL.
    CALL FUNCTION 'POPUP_FOR_INTERACTION'
    EXPORTING
    headline = text-011 " 'Information'
    text1 = text-010
    ticon = 'I' " 'No data was found for
    " the selection criteria.'
    button_1 = 'OK'.
    here i need to clear parameters and selects option
    before leaving to screen 0
    FREE MEMORY.
    LEAVE TO SCREEN 0.
    ENDIF.
    or you place FREE MEMORY statament in INITIALIZATION.
    INITIALIZATION.
    FREE MEMORY.
    You can try to use CLEAR and REFRESH statament in AT SELECTION-SCREEN OUTPUT.
    AT SELECTION-SCREEN OUTPUT.
    Only first time
    CHECK FL_FIRST = SPACE.
    FL_FIRST = 'X'.
    REFRESH <SELECT-OPTION>.
    CLEAR <PARAMETERS>.
    Max

  • NEED WHY WE USE REFRESH,FREE

    I NEED CLEAR EXPLANATION
    WHY I NEED TO USE REFRESH,FREE IN INTERNAL-TABLES.

    hi..
    CLEAR <itab>.
    statement. This statement restores an internal table to the state it was in immediately after you declared it. This means that the table contains no lines. However, the memory already occupied by the memory up until you cleared it remains allocated to the table.
    If you are using internal tables with header lines, remember that the header line and the body of the table have the same name. If you want to address the body of the table in a comparison, you must place two brackets ([ ]) after the table name.
    CLEAR <itab>[].
    To ensure that the table itself has been initialized, you can use the
    REFRESH <itab>.
    statement. This always applies to the body of the table. As with the CLEAR statement, the memory used by the table before you initialized it remains allocated. To release the memory space, use the statement
    refresh should use only internal table,clear - you can use variables,internal table ,work areas
    FREE : it is deallocating meomry
    <b>Reward points if useful</b>
    Regards
    Ashu

  • ADF JSF data binding: why state maintained between requests?

    Dear All,
    i want to know when and how the state of jsf can be maintain automatically by
    adf model.
    i have 2 pages, pageA.jspx and pageB.jspx. in pageA.jspx show some data in
    datatable (bound to methodIterator), when it go to pageB.jspx from pageA.jspx
    and then back to pageA.jspx, the state of the pageA.jspx seems can be stored
    by adf somewhere else.
    i.e. (pageA.jspx -> pageB.jspx -> pageA.jspx)
    ****all the backing beans are request scope.
    according to the adf dev guide, only the the page binding data for the current page will maintain automatically, then why when pageA.jspx's state is stored ?
    do adf store the state in session?? when can i rely on this nature to avoid reload
    pageA.jspx's data?? or how can i clear the state of pageA.jspx (blank page) (return from pageB.jspx)??
    the adf developer guide seems with little information about the page/binding data
    management..where can i found more information about this??
    thank you
    lsp

    Hi,
    i am using EJB + JSF + adf model.
    in this case its the iterator that survives the page navigationdo you mean that all iterator(method/variable..etc) can survive between page navigation??
    You can decide to refresh the iterator on each page load or re-execute the query if
    you don't want this.i want to 'clear' the iterator's data, but not to re-execute/refresh it to get data
    (as this will cause the underlying methodAction be executed once more)..i just want, say
    to display a 'blank' page, say blank pageA.jspx.
    IS THERE ANY REFENENCE document that describe the detail behavior..
    1. when state maintain?
    e.g. case 1 pageA->pageB->pageA->pageB (pageB's state maintained?)
    e.g. case 2 pageA->pageB->pageC->pageA (pageA's state maintained?)
    2. how do the state maintained??
    the iterators are stored in the session or store in the request (e.g. serialized in
    hidden input..etc)? will it lead to large memory usage in server side (until session
    end)?
    i can't find information about the state managementin
    the adf developer guide (not adf bc)..
    could you please point out where can i found these info??
    thank you.
    lsp
    Message was edited by:
    lsp
    Message was edited by:
    lsp
    Message was edited by:
    lsp

  • Refreshing a table from a database

    I executed the tutorial "Sun Java Studio Creator 2 - Tutorials - Performing Inserts, Updates, and Deletes".
    I am experiencing an anamoly in that when I select a new person for the selection where clause, the data for the previous person remains in the table. There is one case where the new data is correct and that is when there is no data selected, ie the table clears.
    When the new person has more rows than the previous person the additional rows are appended to the previous persons rows When the next person has fewer rows than the previous person the previous persons data is truncated but the new persons data is not displayed.
    The tutorial has a refresh() statement that doesn't seem to be clearing prior data.
    I looked at the javadoc for 'cachedrowsetdataprovider' and it has a 'close()' method but no coressponding 'open()'.
    How can I assure that prior results are deleted from the rowset?
    thanks
    jim murray

    Hi!
    U can do this via DTW.
    First extract the Datas from your other DB in a Excel with all need fields to import.
    Import that into new DB via DTW.

Maybe you are looking for

  • Credit Limit Check - Exclude Specific Documents / Credits from Exposure

    Hi, I would like to know if it's possible to exclude specific document types (credits) from the credit exposure calculation used during credit limit checks. The ideia is to exclude "DG" credits in customer GL that are related to Trade Deal/Agreements

  • JScrollPane bar alignment

    I posted this to ProjectSwing forum and never got a reply, maybe here someone knows... I tried all the suggested methods, and yet I still get the vertical scroll bar aligned somewhere in the middle when the JFrame opens, when top alignment would be p

  • Hard Case for Macbook

    I have a hard case (made by Speck) is it safe for my Macbook Pro? I'm concerned about it blocking the ventilation

  • My mac only starts on guest user and cant log in to my main account

    I left my mac alone for like 10 minutes and it shut off alone( or dont know what happened) and when it restarted it went to guest account automatically. What can i do to log in to my main account!!

  • Yet Another NoClassDefFoundError

    I hate to post the 505th NoClassDefFoundError but I've read as many of these threads as I can stand and none of the suggestions work for me. I've just installed the JDK 1.4 on my debian box. I can compile and run a basic Hello World app using System.