Add to new values to an existing 1D array in a while loop

Hello,
I have a while loop that collects data from a DAQ Assistant and stores it into a 1D array. The number of loops is set by the user. I am trying to average the data from each iteration of the loop. So far I am only able to get the array to overwrite the previous array values with the new ones.
if Number of loops = 3
First Iteration                      Second Iteration                         Third Iteration                           New 1D Array        [Divide by Loop #
4.97                                      4.99                                               4.98                                            14.94                       for the average]
4.97                                      4.99                                               4.98                                            14.94
4.96                                      4.98                                               4.97                                            14.91
4.98                                      5.00                                               4.99                                            14.97
4.97                                      4.99                                               4.98                                            14.94
I would like to make this as general as possible as the loop number will vary depending on the user input. 
Solved!
Go to Solution.

sgtpppr685 wrote:
I like the creative solution you have provided however, I am trying to keep the average at each element so that I can graph the average at each point. Therefore, I need the average to be a 1D array of the same initial length, not a scalar. 
I am trying to avoid using shift registers.
1. Do you mean you want the average after each iteration as well?  This can be done pretty easily by moving the division inside my loop.  Perhaps I am misunderstanding you though.
2. Why avoid shift registers?  They are amazing and effective.  They are an essential LabVIEW tool imo   Plus they work wonderfully for your current problem.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!

Similar Messages

  • How to add a new data element for existing table filed(Primary key field)

    Hi Experts,
    How to add a new data element for existing table field(Primary key field)
    For this filed ther is no foreign key relation ships and even check table.
    while activating table it is giving message like below.
    can you help any one to solve this and wil steps to add new dataelement for existing primary key filed of a table.
    Check table (NAMING SPACE/TABLE NAME(EX:/TC/VENDOR)) (username/19.02.10/03:29)           
    Primary key change not permitted for value table /TC/VENDOR
    Check on table  /TC/VENDOR resulted in errors              
    Thanks
    Ravi

    Hi,
    Easiest way is to download the table eg into an Excel table (if possible) or text table. Drop the table from the database. Build your table with the new key field. Build the database table again and fill it.
    You can do it also over the database into a new table. Drop the old one. Build the enhanced one and fill it. Afterwards drop your (temporary) table.
    Maybe there are other ways, but this works.
    Success,
    Rob

  • Can we add a new attachment to an existing SC from any other custom page in SoCo PO View

    Hi Experts,
    Need your expert advice on the below requirement.
    We have created a custom view in SoCo PO page. There we have a New custom view called Notes&attachement.which contains same value from Notes & attachment of Shopping Cart.
    We are updating existing Notes of SC by FM 'bbp_pd_sc_update' and same is reflected in SC of same item guid & same header guid.
    Similarly trying to add a new Attachment to already existing attachment. New attachment is reflected in custom page and the describe link is working perfectly. but if come out of SoCo page , lets say in SC the new added attachment is shown but display_url,phio_size etc are not stored properly in DB.
    in bbp_pd transaction every thing looks same for new and existing attachment. we are using same FM 'BBP_PD_SC_UPDATE' by passing new internal table of attachment in import statement. Even 'BBP_PROC_DOC_UPADTE' has same result that is attachment is partially updated.
    Suppose, SC has one attachment at the time of creation. then adding a new attachment in custom view of SoCo PO page then every thing works fine in SoCo PO page but out of that SoCo PO or in SC the newly added attachment is not properly updated.
    I have added mime_type,phio_size,disp_url,file_name,file_ext,ev_content of new attachment in existing attachment internal table and calling above FM for update.
    Can we  add new attachment outside SC to existing SC ? if yes , then how?
    Thanks,
    Partha

    Hi Partha,
    Please post this query in the category: SAP SRM. Your post currently shows up on the forum - SRM User Interface Add-on. As your query is not related to the new ad-on, you might not get as many responses in this forum as you would have if you had posted the query in the general SRM forum (http://scn.sap.com/community/srm).
    Hope this helps
    Cheers,
    Yateesh

  • How to add a new field to an existing Generic Search result list?

    Good day,
    I'm new to the concepts of the Generic Search Framework.  I'm attempting to add a new field to an existing result list, and have that new field restricted to a value of "C".  This new field will not be displayed, it is only used to ensure that Invoice Documents with a DocStatus of "C" are returned to the B2B Application.
    From the *modification\generic-searchbackend-config.xml file, the existing
    <h4><property-group name="billing_resultlist_B2B_R3">
      <property name="BILLINGDOC" columnTitle="sbt.sbs.genericsearch.billing.invoice.title" parameterType="rowkey" hyperlink="b2b/documentstatusdetailprepare.do" linkParamClass="com.sap.isa.ui.uiclass.genericsearch.GenericSearchUIDynamicContent" linkParamMethod="buildAttributesForBillingDocumentDetails" linkTargetFrameName="form_input" />
      <property name="BILL_DATE" type="date" columnTitle="status.sales.date" writeUnderProperty="BILLINGDOC" defaultSortSequence="DESCENDING" />
      <property name="NET_VALUE" type="number" columnTitle="status.billing.detail.netvalue" fieldOutputHandlerClass="com.sap.isa.ui.uiclass.genericsearch.GenericSearchUIDynamicContent" fieldOutputHandlerMethod="buildBillingNetValue" cssClassName="amount" />
      <property name="CURRENCY" type="hidden" />
      <property name="PAYER" columnTitle="gs.hd.gl.partner" linkParamClass="com.sap.isa.ui.uiclass.genericsearch.GenericSearchUIDynamicContent" linkParamMethod="buildShowPartnerLinkSales" />
      <property name="PAYERS_GUID" type="hidden" />
      <property name="SD_DOC_CAT" type="hidden" />
      <property name="OBJECTS_ORIGIN" type="hidden" />
    </property-group>
    </h4>
    I'm trying to better understand how the R/3 tables and columns are specified in the Generic Search Framework.  I know that the R/3 table and field is: VBRK.RFBSK, but in the configuration XML files, I never see this exact information specified.   How it is specified to be a part of the result set?
    After reading the section in the Development and Extension Guide, I also learned about the "allowedValue" definition, and I believe that I will use that to specify the "C" value for the Invoice Document Status field.
    I would greatly appreciate any help.
    Thanks,
    _kevin

    Hi Kevin,
    this means you are working in this section of the generic-searchbackend-config.xml
                 <property-group name="SearchCriteria_B2B_Billing"
                                 useSearchRequestMemory="true">
    Below this property
                    <property name="IRT_BDH_BILL_TYPE"                    
                              type="box"
                              entityType="BEART_BILL_TYPE"
                              tokenType="EXP"
                              requestParameterName="rc_documenttypes"
                              label="gs.att.lbl.doc.type"
                              UIJScriptOnChange="GSloadNewPageR3(this);">
                        <allowedValue value="ORDER"           description="b2b.status.shuffler.key1val2"/>                   
                        <allowedValue value="QUOTATION"       description="b2b.status.shuffler.key1val1" />
                        <allowedValue value="INQUIRY"         description="b2b.status.shuffler.key1val11" />
                        <allowedValue value="ORDERTMP"         description="b2b.status.shuffler.key1val3" />
                        <allowedValue value="CONTRACT"        description="b2b.status.shuffler.key1val4" />
                        <allowedValue value="INVOICE"         description="b2b.status.shuffler.key1val5"  default="true"/>
                        <allowedValue value="CREDITMEMO"      description="b2b.status.shuffler.key1val6" /> 
                        <allowedValue value="DOWNPAYMENT"     description="b2b.status.shuffler.key1val7" />
                        <allowedValue value="AUCTION"         description="b2b.status.shuffler.key1val9" />
                    </property>
    please try adding this new property
                    <property name="DOCUMENT_STATUS(1)"
                              entityType="CL_CRM_REPORT_SET_STATUS"
                              tokenType="RAN"
                              type="hidden"
                              requestParameterName="rc_status_head1" value="C" />
    This should do the trick. Unfortunately, I don't have a E-Commerce scenario with an ERP backend for testing purposes available to you have to test it yourself. Keep me updated with the test results !      
    Philipp Koock
    SAP CRM Web Channel Consultant
    http://www.koock.net

  • Add a new field to an existing Condition table

    How can I add a new field to an existing condition table?
    I have table 971 and I want to add INCOTERMS (INCO1) to this existing table but do not see how to add it.
    Thanks

    Hi Vicky,
        I dont think you can add new fields to the condition table once you have activated the condition table.
    SAP says you can only make limited changes to the condition table, like changing the description, fast entry screen, header and footer fields, but not able to add new fields to the table, and I think that is the correct approch or else for the same table you will have two sets of condition records.
    Please refer to the below link:
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/de/7a8534c960a134e10000009b38f83b/frameset.htm
    What you can do is create a new condition table with additional field and assign this table before the currently used table in the access sequence.
    Hope this helps.
    Regards
    Raj

  • Add a new table to an existing Print Layout Designer report

    Is it possible to add a new table to an existing Print Layout Designer report? For example, in the Production Order there is a Sales Order field (which is displayed on the report), I would like to display some information from UDFs found on the Sales Order, but when I add a Database Field to the report the Sales Order tables does not appear in the list (OWOR).

    Hi
    It is possible provided there is a relationship which exists between two tables.
    You can add a Database field. Goto the Properties and selct Content Tab.
    Now in the Table dropdown, hold the Alt Key and click. This displays all the tables in B1. After selecting the Table, you can select the related Column.
    Remember there should be a relationship which exists between this column and existing columns.
    Because PLD works completely on Joins to my understanding

  • Need to add 2 new columns to the existing table control of C223 transaction

    Hi ABAP Gurus,
    I have to do a screen enhancement for transaction C223.
    Below is the requirement:
    need to add 2 new columns to the existing table control of C223 transaction.
    there is no customer exits, screen exit or user exit present for this transaction C223, i have found one enhancement spot for this transaction.
    i dont have any idea how to do this in standard transaction C223, the table control in C223 saves the data to MKAL table and the table control uses the structure MKAL_EXPAND in the screen program.
    i have created an append structure for  the 2 fields to the standard table MKAL.
    Can anyone please suggest me how this can be done in standard screen C223, will the enhancement spot can be used to do this....
    please sugest...
    Thanks & Regards

    Hi Santosh,
    Thanks for the reply. I have looked into this Enhancement Spot CPFX_SCREEN_SET , inside this there is only one method INPUT_DISABLED having below parameters
    IM_MKAL     Importing     Type     MKAL                                                                                Production Version
    EX_MSGID     Exporting     Type     SY-MSGID                                                                                Messages, Message
    EX_MSGTY     Exporting     Type     SY-MSGTY                                                                                Messages, Message
    EX_MSGNO     Exporting     Type     SY-MSGNO                                                                                Messages, Message
    EX_MSGV1     Exporting     Type     SY-MSGV1                                                                                Messages, Message
    EX_MSGV2     Exporting     Type     SY-MSGV2                                                                                Messages, Message
    EX_MSGV3     Exporting     Type     SY-MSGV3                                                                                Messages, Message
    EX_MSGV4     Exporting     Type     SY-MSGV4                                                                                Messages, Message
    EX_INPUT_DISABLE     Exporting     Type     CHAR1                                                                                Display Only if X Was Set
    the BADI definition present here is a SAP internal so we cant implement the BADI , but we can created a enhancement spot implementation for this. as per my understanding on this the enhancement spot is only for making the table control fields display / change .  i dont think this can be used to add two new coloumns to C223 table control.
    I am not sure thats why seeking your help/valuable sugestion on this.
    Please provide your sugestion on this , so that i can come to conclusion on this issue.
    Thanks & Regards
    Siddhartha Mishra

  • How to add a new pin to an existing subvi

    Hi,
    I've been using Labview for sometime now but I still haven't found a convenient way to add a new pin to an existing subvi other than opening up the subvi and adding a control or whatever and then highlighting the code and using create subvi. Then naming this new subvi with the name of the old one. There must be a better way than doing this ??
    Thanks.
    John

    Hi John,
    I think you want to have a new connector where you can wire to.
    Open the VI, create the control or indicator on the front panel and then make a right click on the icon. Choose show connector pane. Your mouse cursor changes to the wire cursor. Click in the pane on a free connector and then click on the new control/indicator. This way the control/indicator is assoicated with the connector on the connector pane. Keep the rule controls left indicators right side. If there is no more connector left you can choose a new pane.
    Normally we use only a limited set of panes for all subVIs to avoid benches in the wires. Most we use the pane with 4 connectors left and 4 connectors right.
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • How to add the new dep area in existing cod

    Dear all,
    how to add the new dep area in existing cod we are planing to implement the IFRS by using leading ledger and non leading ledger present we are using OL leading ledger
    present we are using dep area 01 ,15
    how to achive the parallel accounting in asset accounting how to add new dep area 30 in existing COD
    if any document plz refer me  

    Hi Bhayyapu,
    Please refer to the links given below.
    New Depreciation area
    Adding a New Depreciation Area to Existing Assets - Financial Accounting (FI) - SAP Library
    Hope this will help you.
    Regards
    Eugene

  • Poplist - add a new value

    Hi all,
    Is there any way to add a new value to the poplist at runtime apart from the values that are actually being displayed?
    Thanks in advance.

    Instead of providing the Picklist View definition in the messageChoice item, you would need to provide the instance name. Also this instance needs to be associated to the AM.
    Now you can do the processings on the Picklist VO as any VO. Hope that helps.
    Thanks
    Sumit

  • Add a new folder item in existing folder

    Hi
       All when i add a new folder item in an existing form
       and when i add some new controls with in this folder(tab) all controls are see the existing folder i want
      these control is see only this new folder
      plz help me
    Thanks & Regards
      Mohd Shahid

    Hi Sha
    I don't understand fully, but what i think you are saying is that you want to add a item, but to a specific tab.
    To do that, when you add your item, you must also do the following in addition to it's height,width,ect
    oitem.FromPane = 2
    oitem.ToPane = 2
    this say which pane/folder it will show on. If both are zero it will show on all tabs. If like above it will show on 1 tab.
    Hope this helps

  • How to add a new value into message choice ?

    Dear all,
    I have a messageChoice component in my OAF page and I binding it with my VO (the VO is based on my query SQL in controller, NOT based on EO).
    For example, the query result of VO is as following:
    columnName, columnValue
    a, 1
    b, 2
    c, 3
    And I binding them into my messageChoice component as following:
    myChoice.setPickListViewUsageName("myVO1");
    myChoice.setListDisplayAttribute("columnName");
    myChoice.setListValueAttribute("columnValue");
    myChoice.setPickListCacheEnabled(false);
    Now I want to add a new combination into te messageChoice component, such as 'd, 4'.
    So I write it like this:
    myChoice.addOption("d", "4");
    But it doesn't work. The result of choice is still the same as before.
    So I think maybe I can use myVO1.createRow() method, but when I run my page, it raise an error message: "myVO1 is read only" :(
    Should I have to add a "UNION" in my query SQL of VO for this requirement?
    Any other ideas, please?
    Thanks.
    Kenny

    If you know the values to be added in advance, then its a better option to put them in VO itself with union clause and it has a better performance compared to runtime modification to VO.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                       

  • Add 2 new fields to an existing ABAP query in a particular position

    Hello,
    I have added 2 new fields to an existing ABAP query. These have been successfully added and the query is also executing.
    But these 2 new fields are displaying at last. I need to add these fields in a particular column position.
    Also I need to change the heading of these 2 new fields.
    I tried to do so from the basic list, layout design from SQ01.
    But I could not.... whatever I do.. the 2 new fields are displayed at the end of the list...
    Please help me

    Hi Andreas,
    Do you mean that I should create a complete new abap query?
    Is there no way to add some new fields at a particular position to an existing abap query?

  • How to add another new report painter in existing T-code?

    HI,
    Can someone guide me, how to add a report painter report ZAL into a existing T-code?
    My T-code contain 2 report, now i wish to add a new one. So when user execute this T-code, we can see these 3 report.
    Thanks

    Hi,
    add the new report to the report group (T-code GR52) where the 2 already existing reports belong to.
    In report painter you don't execute a report but always a report group including one or more reports.
    Best regards, Christian

  • How to add a new column to a existing table and add data to this column?

    I have a table with about 10 millions row and I want to add a new column to this table, then fill this new column with prepared data.
    How to do it ?
    Thank you

    Can I use insert statement to add the data to new-added column?No.
    07:19:37 oracle >create table test (x number);
    Table created.
    Elapsed: 00:00:03.05
    07:19:53 oracle >
    07:19:53 oracle >
    07:19:53 oracle >insert into test values (1);
    1 row created.
    Elapsed: 00:00:00.00
    07:20:01 oracle >insert into test values (2);
    1 row created.
    Elapsed: 00:00:00.00
    07:20:10 oracle >insert into test values (3);
    1 row created.
    Elapsed: 00:00:00.00
    07:20:12 oracle >
    07:20:13 oracle >commit;
    Commit complete.
    Elapsed: 00:00:00.00
    07:20:14 oracle >
    07:20:19 oracle >select * from test;
             X
             1
             2
             3
    Elapsed: 00:00:00.00
    07:20:22 oracle >
    07:20:36 oracle >alter table test add (y number);
    Table altered.
    Elapsed: 00:00:00.05
    07:20:41 oracle >
    07:20:41 oracle >
    07:20:41 oracle >
    07:20:41 oracle >select * from test;
             X          Y
             1
             2
             3
    Elapsed: 00:00:00.00
    07:20:43 oracle >
    07:20:44 oracle >
    07:20:44 oracle >update test set y=1;
    3 rows updated.
    Elapsed: 00:00:00.02
    07:20:52 oracle >commit;
    Commit complete.
    Elapsed: 00:00:00.00
    07:20:56 oracle >select * from test;
             X          Y
             1          1
             2          1
             3          1
    Elapsed: 00:00:00.00
    07:20:58 oracle >Anand

Maybe you are looking for