Clear table content before next program run

Hi there,
i've searched a long time and found many promising answers...but none actually helped on my problem:
Please find my example vi attached (LV2012).
After initializing my array with some values und running the program the table is populated accordingly. I stop the vi an the table is cleared. But: if i restart the vi without making any changes, the old content shows again and the array gets appended too. So, is there a way to clear a table definetly after stopping the vi. Including obscure default values?
What i've tried so far without succes:
Setting an empty array at the beginning
Reset to standard values via Invoke Node
Setting an empty array as value via Property Node
So what am i missing?
Thanks in advance, Erik
Solved!
Go to Solution.
Attachments:
Example.vi ‏22 KB

Hi Erik,
you are missing the data in the shift register!
You should initialize shift registers when you don't need data from previous runs of the VI…
Or get rid of the shift register when you don't need it:
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • Any Exit/BADI/Enh point to modify COOI table contents before PR/PO save

    Hi Experts,
    whenever we create/change Purchase requisition/Purchase Order,
    table COOI(Commitment line items) gets updated with the Purchase requisition/purchase order
    item details and table COSP gets updated with the sum values of COOI entries order by primary keys
    of the table.For better explanation i am taking fields from tables
    COOI (taken few fields for example)
    REFBT     REFBN     RFKNT      LIFNR     HRKFT      OBJNR     WTGBTR(Total value in transaction cuu)
    1234     0010     00512     (empty)     (empty)     PR00148     10
    1234     0020     00512     (empty)     (empty)     PR00148     10
    1234     0030     00512     (empty)     (empty)     PR00149     20
    table updated COSP with sum value of COOI order by it's primary keys
    COSP (taken few fields for example)
    OBJNR     KSTAR     HRKFT     WTG010
    PR00148     00512     (empty)     20
    PR00149     00512     (empty)     20
    I want to pass  the value HRKFT(CO key subnumber/Origin grp) to table COOI
    to update each commitment line item,so that sum will update table COSP order by it's primary keys
    The same example revised with origin group.
    COOI
    REFBT     REFBN     RFKNT      LIFNR     HRKFT      OBJNR     WTGBTR(Total value in transaction cuu)
    1234     0010     00512     (empty)     3100     PR00148     10
    1234     0020     00512     (empty)     3200     PR00148     10
    1234     0030     00512     (empty)     3300     PR00149     20
    table COSP get update with sum value of COOI order by it's primary keys
    of COSP considering HRKFT values now(taken few fields for example)
    OBJNR     KSTAR     HRKFT     WTG010
    PR00148     00512     3100     10
    PR00148     00512     3200     10
    PR00149     00512     3200     20
    and this table is used in report painter to show the commitment
    COSTS's segregated by Origin Group.
    I need to show the report in report painter HRKFT(origin grp) wise cost's for commitments.
    which is using the COSP table to display.
    Now my requirement is any exit/BADI/Enhancement where i can modify table COOI contents
    with HRKFT value for each line item before sum calucalation for COSP table in detail while creating
    Purhcase requisition/Purchase order.
    We are using SAP GUI version 6.0 
    Helpfull answeres will be rewarded
    << Moderator message - Please do not promise points >>
    Edited by: Rob Burbank on May 15, 2011 4:28 PM

    Moderator message -
    When closing old threads, there is no need to add a comment. Adding a pasted answer like "answered" only brings old threads to the top of the forum list and pushes current ones down. If you do add a comment, please indicate just how the problem was resolved.

  • Get informations whether changes in Table content before store

    Hallo,
    in my Web Dynpro Application I have a table. If the User changes something in this table I must get the Information in what row the changes are before I store.
    Than I have to set a attribute in this row back.
    Is there any possibility to do that. I have try to get the Information with the method "isChangedByClient()".
    But I need the information at what row is the change.
    Is there any Event?
    Kind regards
    Gunter

    Hi Erik,
    you are missing the data in the shift register!
    You should initialize shift registers when you don't need data from previous runs of the VI…
    Or get rid of the shift register when you don't need it:
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to delete the Table Contents before inserting records into SQL table ?

    Hello Experts,
            I have a scenario where in I have to Pick up some records from SAP RFC & insert into SQL table.
            i know how to do this scenario but the proble with this is before inserting we first have to ZAP the SQL table & insert a new records. One more twist is The Triggering is happening from SAP side with Sender RFC. If this would have been from SQL Side i could have written a Stored Procedure/ Trigger & could have called this before the SENDER JDBC communciation channel picks up the Triggering event from SQL side.
    So how to do this scenarioin XI, First deleting all the Records of SQL table & then inserting the new reocrds. without using the BPM.
    Regards,
    Umesh

    hi umesh,
    you can achieve this by writing SQL query in message mapping level..
    refer this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/b0/676b3c255b1475e10000000a114084/frameset.htm
    regards.

  • How to make an ABAP program run for a specified number of times ?

    assalamoalikum all!!!
    Can some 1 plz tell me that How can I make my ABAP program run ONLY for 2 times (after it went in production etc)
    AND when the program runs for 2 times It then gets hanged/Locked foreever.
    Suppose my program is:
    REPORT twice002.
    write ' I will run only twice bye bye'.

    Well, I guess the only full proof way is to create a custom "Z" table which will hold the counter, in your program you would update this table every time the program runs. In this same program before updating the counter, you would retrieve the counter and check if it is = 2, if so, then write a message and RETURN.
    Regards,
    Rich Heilman

  • 0.5 MB program has 832 MB memory usage even before it is run

    I just uninstalled and re-installed LabVIEW 2011. I was hoping this would do something to lower the memory footprint. Alas, it did not make any difference. This is what I see:
    - When I launch LabVIEW, it uses 94 MB even before I have opened a single VI, i.e. only the front end uses this much memory.
    - When I open the VI (the size of the .vi file is 549 KB), memory usage goes up to 836.4 MB. This is before I have even run the program.
    - Finally, when I run the program, memory usage jumps to 1.17 GB.
    I find this memory usage grotesquely high. Can anyone please shed some light on what can be done? I have uploaded the VI. It's a rather simple VI.
    Thanks,
    Neil
    Attachments:
    IP QL to charge - from img.vi ‏446 KB

    nbf wrote:
    1) If I understand correctly, what you are saying is that when I open the VI, the data structures associated with the intensity charts and waveform graphs are initialized to default values (e.g. 0), so there is memory usage even before the program is run and anything displayed, right?
    Yes, a huge array still takes a lot of memory, even though it compresses well for storage inside the VI. Once the VI is ready to run, these arrays need to be allocated in memory.
    nbf wrote:
    2) Is there an alternative to using the value property node that doesn't duplicate the memory content? (e.g. something like pointer or reference in C++?)
    One possiblity are data value references. You can open a DVR and fill it inside the subVI, then extract slices later as needed. If done properly, you can also keep the 2D data in a shift register (yes, please learn about them!).
    nbf wrote:
    4) Regarding the clearing of the indicators, could you please tell me how to do that, without removing the color ramp settings?
    The color ramps can be set programmatically using property nodes based on array min&max and you can assign colors for the ramp values at will.
    nbf wrote:
    5) You are correct that I am displaying 4000x2000 array data in an intensity graph with 400x200 pixels. But then I change the min/max of the charts/graphs to zoom into the region of interest; I can identify the region of interest only after displaying the full 4000x2000 array of data. I don't know if there is a way around this.
    Do you really need to show the 2D data in three different transforms? Maybe one intensity graph is sufficient. You can apply the other transforms on the extracted slices with <<1% of the computing effort. What is the range and resolution of your data? Do you really need DBL or is a smaller representation sufficient (SGL, I16, etc). From looking at the subVI, the raw data is U16. The subVI also involves a coercion to DBL, requireing another data copy in memory. When running, make absolutely sure that the subVI front panel is closed, else additional memory is used for the huge array indicator there. For better performance, you might want to flatten the subVI to the main diagram or at least inline it.
    nbf wrote:
    6) Yes, I use the continuous run mode instead of a toplevel while loop. Is there a disadvantage to doing that?
    As Samuel Goldwyn ("A hospital is no place to be sick") might have said: "Run continuously is no way to run a VI"
    Run continuously is a debugging tool and has no place in typical use. What it basically does is restart the VI automatically whenever it completes, and as fast as the CPU allows. It is mostly useful to quickly test subVIs that don't have a toplevel loop and play with inputs to verify results. Any toplevel VI needs a while loop surrounding the core code. Period!
    So, my suggested plan of action would be:
    Use a while loop around your toplevel code
    Decide on the minimal representation needed to faithfully show the data.
    Keep a single copy of the 2D array in a DVR
    You optionally might want to undersample the data for display according to the pixel resolution and use other means of zooming and panning. For zooming, you could extract a differently sampled small array subset and adjust x0 and dx of the axes accordingly.
    Use a single 2D graph (if you need to see the various transforms, add a ring selector and transform the 2D array in place. Never show more than one intensity graph.
    See how far you get.
    LabVIEW Champion . Do more with less code and in less time .

  • Problem in changing the internal table contents of a standard program

    Dear All,
    I am making changes to internal table LT_PPDIT of standard program SAPLHRPT in the user exit EXIT_SAPLACC4_001 while payroll posting to accounting with tcode PC00_M99_CIPE. But though the changed value of LT_PPDIT is visible within the exit still the value of LT_PPDIT when we come outside exit is the same as what was before entering exit.
    Please suggest is there any way of modifying internal table of a standard program in the user exit.
    Regards,
    Kanupriya

    Hi,
    I think the internal table is getting refreshed or something like that after the user exit.
    Try debugging after the user exit and put breakpoints at clear and modify statements.
    Then you ll find out where its regaining the oringinal value after getting changes.
    After locating that point try finding some enhancmenent point there and including your code so that your value of internal able gets modified.
    Regards,
    Subhashini

  • Next payment run parameter in automatic payment program

    hi gurus
    why next payment run date must be given in parameters tab of automatic payment program
    thanks and regards
    ramesh

    Dear,
    yes but You should create a background job of F110S, where You define a dynamic date variable variant as per Your requirement,  by SE36.
    I hope this helps.
    Mauri

  • How to clear the table contents for the new selection values?

    Hi,
    Im developing some very basic web dynpro applications.I have created one application to demonstrate use of SERVICE CALL.Now in one of the COntext Nodes,I have one attributes as TABLE.I have 2 input fields and when i enter any sel critteria in these 2 fields,the table is populated accordingly.Now when i change the value in the input fields,the new output gets appended in the output TABLE.How do I clear the contents of the OUTPUT table attribute  in the method?
    Can someone tell me the common methods used with context nodes like REFRESHING,CLEARING etc?How do I know which methods to call for what action of the nodes ...like for binding internal table to any context node we use the method BIND_TABLE...
    Any inputs will be highly appreciated.
    Thanks!
    BR,
    SRM tech.

    Hi,
    To clear the contents of the node, use invalidate method.
    data: l_node type ref to if_wd_context_node.
    l_node  = wd_context->get_child_node( 'NODENAME' ).
    l_node->invalidate( ). " all the data in the node will be cleared
    To clear a single attribute you can use set_attribute_null.
    Regards,
    Radhika.

  • Firefox hangs and will not allow me to access other programs running when I resize a pop up window, move a pop up window, accidentally right click flash content.

    Firefox hangs and will not allow me to access other programs running when I resize a pop up window, move a pop up window, accidentally right click flash content.
    == This happened ==
    A few times a week
    == Not sure when it statrted

    Hi.
    When this happens, please press CTRL+SHIFT+ESC and see how much RAM and CPU Firefox is using. If they're sky high, then... Well, that kind of issues are, unfortunately, more common and the we'd like. Thankfully, 99% of the cases are very easy to solve. However, you do need to diagnose what your exact problem is. Do this:
    #run Firefox in safe-mode to disable all extensions and plugins. If this fixes your issues, be them with RAM or CPU usage, then you know it's a problem with plugins or extensions. Proceed to number 2. If safe-mode doesn't fix the issues, then read bellow, after this list;
    #update all extensions and plugins in your Firefox. If this doesn't solve the issues, proceed to the following number;
    #disable all extensions and plugins in your Firefox (not running safe-mode). Being certain that, as in safe-mode, the problems you're having have gone away, enable one plugin at a time. You should be certain that you WANT that plugin to be enabled, so keep your overall number of plugins as low as possible. When you encounter the problems, you know you've found a problematic plugin, so disable it for good. Keep enabling all plugins (except problematic ones) until you've gone through them all.
    #enable one extension at a time. Again, be certain that you WANT that extension to be enabled, so keep your overall number of extensions as low as possible. When you encounter the problems, you know you've found a problematic extension, so disable it for good. Keep enabling all your extensions (except problematic ones) until you've gone through them all;
    #you're done! You've fixed your problems with problematic add-ons.
    Ok, if disabling all extensions and plugins through safe-mode didn't work to bring Firefox's CPU and RAM usage to good levels, then you have different issue. The most likely scenario is that you have a third party software running on your computer that is messing with Firefox. Do as follows:
    #do a virus/malware check on your computer. If this doesn't fix it, proceed;
    #disable all software running in the background that you don't want to have running in the background (in windows, this is done by pressing WINDOWS+R in your keyboard, typing "msconfig" (without the commas) and pressing enter. Now, under the "Startup" tab, you can uncheck the software you don't want, and reboot your system for changes to take effect. If you're unsure of what software you want running, ask someone with more experience). If this doesn't fix you issues with Firefox, proceed;
    #check your firewall/antivirus/security suite for enabled functions/features that you don't want and/or may be conflicting with Firefox. You'll find that these features are most likely tied to Internet Security features, such as link scanners or URL checkers and the like. If you're not sure they are conflicting with Firefox, simply try to disable to see whether or not that's true. As long as you don't browse the web with your antivirus completely off and your firewall completely turned off, there should be no problems. If this doesn't solve the issues, proceed to the following number;
    #check your operating system security options, mainly advanced options that are not configured by default. While it's very unlikely that this may be the cause of the problem (after all, it's the last item on the list), it's remotely possible. If this doesn't do it, I'm out of ideas. Except make sure you've followed my instructions correctly.

  • How to clear the contents of a table

    I was using a 'build table' to collect some datas and pass it to an 'Express  table'.
    what are the possible options to clear the contents of that table?
    How can i clear the contents using a 'button'?

    Build table function has an additional input called 'Reset'
    Attach a boolean to it.
    On front panel, set the boolean's mechanical action as 'latch when released'
    Look at attached vi
    Regards,
    Dev
    Message Edited by devchander on 08-06-2007 08:02 AM
    Attachments:
    reset table.vi ‏57 KB

  • How toStore the Date Variable and pass it when the program runs next time??

    HI All,
    My JDBC program basically needs two command line args. Rabge_Start_Dt and Range_End_Dt. for ex:
    2001-05-31 and 2001-06-01 . And my porgram should run every day. Next day the date range will be 2001-06-01 to some date. It means I have to store some how the range_end_dt and pass it as range_start_dt when my program runs the next day.
    Problem:
    How can I store the Data variable and pass it as an argument to my porgram when It runs next time. Every time my pogram runs It should pick the range start_dt (==range_end_dt of the previuos run) and end_dt I have to go and query some other data base and pass that value to it.
    Thanks in advance!!!!

    save the value in a file, then read it back in each day. Similar to when a process needs a PID.
    -blhqctz

  • Program to upload and download table content

    Hi,
    I need to create a program which should upload and download table content from PC and to PC.
    How can i develop this program..Should i use BDC or any function module?
    Ezhil.

    The 2 program requested.....
    Program to Download
    REPORT ztable_download.
    PARAMETERS: table LIKE dd02d-tabname,
                                file(50) LOWER CASE.
    DATA: code(72) OCCURS 10,
                w_code(72),
                prog(8),
                msg(120),
                lin(3),
                wrd(10),
                off(3).
    DATA: BEGIN OF rectest,
          tprec(1) VALUE '0',
          nometab(16),
          utente(20),
          data(10),
          ora(8),
    END OF rectest.
    DATA: BEGIN OF recdett,
          tprec(1) VALUE '1',
          tab LIKE table,
    END OF recdett.
    DATA: BEGIN OF rectot,
        tprec(1) VALUE '2',
        tot(9),
    END OF rectot.
    OPEN DATASET file FOR OUTPUT IN TEXT MODE.
    rectest-nometab = table.
    rectest-utente = sy-uname.
    rectest-data = sy-datum.
    rectest-ora = sy-uzeit.
    TRANSFER rectest TO file.
    APPEND 'PROGRAM SUBPOOL.'  TO code.
    CONCATENATE 'TABLES ' table '.' INTO w_code SEPARATED BY space.
    APPEND w_code TO code.
    APPEND 'FORM DYN1 USING FILE.' TO code.
    CONCATENATE 'SELECT * FROM ' table '.'
    INTO w_code SEPARATED BY space.
    APPEND w_code TO code.
    CONCATENATE 'TRANSFER ' table ' TO FILE.'
    INTO w_code SEPARATED BY space.
    APPEND w_code TO code.
    APPEND 'ENDSELECT.' TO code.
    APPEND 'ENDFORM.' TO code.
    GENERATE SUBROUTINE POOL code NAME prog
    MESSAGE msg LINE lin WORD wrd OFFSET off.
    IF sy-subrc <> 0.
       WRITE: / 'Error during generation in line', lin,
                    / msg,
                    / 'Word:', wrd, 'at offset', off.
    ELSE.
       PERFORM dyn1 IN PROGRAM (prog) USING file.
       WRITE: / 'Esportati ',sy-dbcnt,' records.'.
    ENDIF.
    Program to upload
    REPORT Ztable_upload.
    PARAMETERS: FILE(50) lower case,
                               TEST AS CHECKBOX.
    DATA: CODE(72) OCCURS 10,
                W_CODE(72),
                PROG(8),
                MSG(120),
                LIN(3),
                WRD(10),
                OFF(3).
    DATA: BEGIN OF RECTEST,
          TPREC(1) VALUE '0',
          NOMETAB(16),
          UTENTE(20),
          DATA TYPE D,
          ORA TYPE T,
    END OF RECTEST.
    DATA: BEGIN OF RECTOT,
          TPREC(1) VALUE '2',
          TOT(9),
    END OF RECTOT.
    OPEN DATASET FILE FOR INPUT IN TEXT MODE.
    READ DATASET FILE INTO RECTEST.
    WRITE:/ 'Tabella..:',RECTEST-NOMETAB.
    WRITE:/ 'Utente...:',RECTEST-UTENTE.
    WRITE:/ 'Data.....:',RECTEST-DATA,RECTEST-ORA.
    IF TEST = 'X'.
        APPEND 'PROGRAM SUBPOOL.'  TO CODE.
       CONCATENATE 'TABLES ' RECTEST-NOMETAB '.'
       INTO W_CODE SEPARATED BY SPACE.
      APPEND W_CODE TO CODE.
      APPEND 'FORM DYN1 USING FILE.' TO CODE.
      APPEND 'DATA W_COUNT TYPE P.' TO CODE.
      CONCATENATE 'SELECT * FROM' RECTEST-NOMETAB '.'
      INTO W_CODE SEPARATED BY SPACE.
      APPEND W_CODE TO CODE.
      CONCATENATE 'DELETE' RECTEST-NOMETAB '.'
      INTO W_CODE SEPARATED BY SPACE.
      APPEND W_CODE TO CODE.
      APPEND 'ENDSELECT.' TO CODE.
      APPEND ' DO.' TO CODE.
      CONCATENATE 'READ DATASET FILE INTO' RECTEST-NOMETAB '.'
      INTO W_CODE SEPARATED BY SPACE.
      APPEND W_CODE TO CODE.
      APPEND ' IF SY-SUBRC NE 0.' TO CODE.
      APPEND ' EXIT.' TO CODE.
      APPEND ' ENDIF.' TO CODE.
      CONCATENATE ' INSERT ' RECTEST-NOMETAB '.'
      INTO W_CODE SEPARATED BY SPACE.
      APPEND W_CODE TO CODE.
      APPEND 'ADD 1 TO W_COUNT.' TO CODE.
      APPEND 'ENDDO.' TO CODE.
      APPEND ' write: / ''Importati'' ,W_COUNT, ''records''.' TO CODE.
      APPEND 'ENDFORM.' TO CODE.
      GENERATE SUBROUTINE POOL CODE NAME PROG
      MESSAGE MSG LINE LIN WORD WRD OFFSET OFF.
      IF SY-SUBRC <> 0.
         WRITE: / 'Error during generation in line', LIN,
         / MSG,
         / 'Word:', WRD, 'at offset', OFF.
      ELSE.
         PERFORM DYN1 IN PROGRAM (PROG) USING FILE.
      ENDIF.
    ENDIF.
    Edited by: robcom69 on Feb 23, 2010 2:35 PM

  • How to clear the contents of table control

    Hi All,
              How to clear the contents that are present in a Table control. If there is any code Please Let me know.
    I will assign full marks to the correct code.
    Pradeep Kumar Kota.

    Hi
    U need to clear the contenents of internal table used to store the record displayed by table control.
    Every time the PBO is triggered the table control is automatically cleared, so you need only not to transfer any data from internal table to table control.
    So you should show how your PBO if you want a right answer.
    Max

  • Program for deletion of table content.

    Hi,
    I have a requirement to delete the contents of table RSBERRORLOG , i cannot do it directly from table content delete option due to lack of authorisation. Is there any program that can be used for deletion of tabel contents ?
    Thanks .

    Hi,
    you can delete the RSBERRORLOG table by using the RSBM_ERRORLOG_DELETE report.
    Additional info:
    You can use the report RSB_ANALYZE_ERRORLOG to analyze which DTPs have created how many single record error messages, and to how many requests these messages are distributed. You can use the report RSBM_ERRORLOG_DELETE for single DTPs to delete the messages for requests up to a specified date.
    If numerous single record errors are frequently created for specific DTPs, you should analyze the relevant requests in more detail and, if required, eliminate the error cause (for example, adjusting the transformation routines).
    Regards
    Andreas

Maybe you are looking for

  • Media Playback With Windows Media Player and Quicktime

    I just bought a mac book. Is there any way to have quicktime not the default player or to have it bring out the video from the safari window. because there are some sites that i go to and it just starts playing quicktime inside the browser video but

  • IDVD and AVI files. (No sound)

    I have a couple clips in .avi and they play well in quicktime with the Perian program but when i add them into an iDVD project I only get the video and I don't get sound. Is there a program like Perian for iDVD or some sort of plug-in to play the .av

  • Crystal Report with Universe instead of Business Views: Any limitations ?

    Hi, We were using Crystal Reports on top of Business Views  until now. Due to considerable post-migration work with Crystal Reports on top of Business Views we are thinking of switching to Crystal Reports  on top of Universe. Can anybody explain me w

  • ITunes message "Startup disk nearly full" however HD drive 224Mb free??..??

    When i double click on the HD i can read from the bottom of the window that I have 222.4 Mb available, i also have my itunes downloads going straight into my external harddrive rather than my internal harddrive. makes me think i've misunderstood what

  • Certified LabVIEW Architect and Professional Instructor willing to relocate

    I have been working for an NI Integrator for about 3.5 years and interested in seeing if I could be of value elsewhere. I like to travel, have no real roots and could move internationally if necessary. LabVIEW (6i to 8.5) including:             FPGA,