Facing problem in saving data without overlapping in for loop

Hi,
I am facing problem in writting data withou overlapping if i run outer loop for 2 or more times and in inner for loop i am getting array in a way I want but when i try to build that array with logging temperature i am not able to do it. Please guide me through ths.
Thank You
Hnagpal
Solved!
Go to Solution.
Attachments:
data storage.vi ‏31 KB
what i am getting.xlsx ‏10 KB
what i want.xlsx ‏10 KB

Thanks odessy27, Matthew Kelton, for replying.
Matthew Kelton: Thanks for the solution i am adding outer loop so that i can increase the number of row. I am using it for some application which require me to save data several time and i used random number here but originally instead of random number there will be power meter reading and i want to save it every hour and plot it. I am also attaching a file what i made I don't know is this a good way or not. Actually i will also beneeded to plot a graph. But again how to increase a row and without replacing previous data i can write another row.
Yes i want to make one row for each iteration.
I attached both files in 2009 version.
Thank You
Himanshu Nagpal 
Attachments:
desired result.xlsx ‏10 KB
data storage (1).vi ‏26 KB
data storage.vi ‏37 KB

Similar Messages

  • Facing problem with a date column in select query

    Hi,
    I am facing problem with a date column. Below is my query and its fainling with " invalid number format model" .
    Query: SELECT *
    FROM EMP
    WHERE trunc(LAST_UPDATED) >= to_date(to_char(22-05-2009,'dd-mm-yyyy'),'dd-mm-yyyy')
    LAST_UPDATED column is "DATE" data type.
    Please help me Thanks

    Radhakrishna Sarma wrote:
    SeánMacGC wrote:
    WHERE LAST_UPDATED >= to_date('22-05-2009','dd-mm-yyyy');
    You do not need the TRUNC here in any case.
    I don't think so. What if the user wants only data for 22nd May and the table has records with date later than 22nd also? In that case your query willl not work. In order for the Index to work, I think the query can be written like this I think Sean is right though. Use of TRUNC Function is quiet useless based on the condition given here, since the to_date Function used by OP will always point to midnight of the specified date, in this case 22-05-2009 00:00:00.
    Regards,
    Jo
    Edit: I think Sean proved his point... ;)

  • Problem while saving date field in custom table

    Hi,
    Iam facing the following problem while saving a date field in custome table
    i have a date field zdate in which the value is 02082010.
    now when i try to insert this value in the custom table it is getting updated as 20/10/0208 , but it should be 08/02/2010
    How can i correct it..
    Regards
    Kumar

    just before saving u might have to use a string reverse FM and then save it..
    CALL FUNCTION 'STRING_REVERSE'
      EXPORTING
        STRING          = p_string
        LANG            = sy-langu
    IMPORTING
       RSTRING          = r_string
    EXCEPTIONS
       TOO_SMALL        = 1
       OTHERS           = 2

  • Facing  problem while loading data into XI

    Hi All,
    I am facing a peculiar problem while loading data into XI when we load small amount of data say 5-10 records these records gets processed, but when we try to load a bit higher volume say 100-500 which comes out to be around 7 record s per second then the record processing gets stalled. That is it gives a message that "recorded for outbound processing".
    So can any body throw some light on it and can tell us why we rare facing such problem and how can we resolve that problem.
    Thanks in Advance.
    Regards
    rahul

    Hi rahul,
    Deregistering and Registering the Queue is a temporary solution.
    The better way to this would be to Tune your Xi system as already mentioned by Vijaya as mentioned in the guide ,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/70ada5ef-0201-0010-1f8b-c935e444b0ad
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7fdca26e-0601-0010-369d-b3fc87d3a2d9
    Regards,
    Bhavesh

  • Problem in saving data.

    Hi all.
    i am using oracle 10g forms & reports.
    i have tables EXPHEAD and EXPENSES.
    i populate a list item in EXPENSES using the following code:-
    declare
         obj_name varchar2(40):='OBJ_G';
         status number;
         groupid recordgroup;
    begin
         groupid:=create_group_from_query(obj_name,'SELECT exp_name, TO_CHAR(exp_code) exp_code FROM exphead');
         status:=populate_group(groupid);
         populate_list('expences.exp_name',groupid);
    end;
    DECLARE
    vStatus NUMBER;
    BEGIN
    vStatus := POPULATE_GROUP('OBJ_G');
    POPULATE_LIST('expences.exp_name', 'OBJ_G');
    END;
    when i change values in list items (Exp_Name) exp_code change automatically like:-
    when i select RENT (Exp_Name) in list item its code (1) automatically shown in exp_code text item, i used this code on WHEN-LIST-CHANGE:-
    :expences.exp_code:=:expences.exp_name;
    now the problem is that data in the fields shows correctly but when i store data, in both fields exp_code is store.
    means in Exp_Name field data of exp_code inserted.
    hope u understand my problem
    Regards
    Saqib
    Edited by: Saqib Alam on Jan 4, 2012 7:52 PM

    means in Exp_Name field data of exp_code inserted. Yes, that is the whole point. A list item shows the description of a code. Like the department code 10 has description ACCOUNTING. You don't store ACCOUNTING in table EMP, you store department code 10 in EMP.
    :expences.exp_code:=:expences.exp_name;That is a pretty strange line of code (giving a code a name).
    Edited by: InoL on Jan 4, 2012 10:39 AM

  • Saved data in pick list for parameter

    Hi all,
    I have a scheduled report that I want to use parameters in. But the trick is that I want the pick list for the parameter to be fetched from the saved data for a specific field in the report.
    Any ideas? I am thinking of a dynamic parameter but then how do I only get to choose from actual data in the report?
    I am using CR2008 and running the reports on BO XI 3.1
    Thanks,
    Magnus

    store in excel file and use that to pull the values through.
    there should be a white paper on this site on how to do that.

  • Writing data to spreadsheet in FOR loop without shift register

    My program has a case window within a For loop.  The loop iteration index is wired to the case, so there’s a case for each iteration of the loop (about 30 cases).  In each case, data points are gathered, formatted to a spreadsheet and written to a file, along with some occasional header strings to describe the data.  This works fine, as I can simply write the data to file as soon as I get it. 
    At some point in the loop, I’m gathering from two sources (rpm data for two fans) over several iterations that is to be written to two separate but similar formatted tables in the same output file.  Since I’m writing two tables to one file simultaneously, I can no longer write on-the-fly in a linear fashion; I’d need to store all the information until I complete the iterations, then format the header & raw data to spreadsheet and write to file in two chunks – at least, this is what I believe is the way to go, but I’m all ears if there’s another way.
    In order to buffer the data, I could use a shift register, but this requires me to wire an array across my loop for all loops, whether I’ll be using it or not.  I’ve also considered initializing an array at the case I’ll need to start buffering, then writing to a local variable of that array, but in fiddling with this approach, I don’t see how to specify what index to which I’m storing the data point.
    So I’m looking for advice on whether (1) there’s another way to accomplish my goal and/or (2) how to execute the initialize array and local variable approach. 
    Below is a picture of what I want this portion of the spreadsheet to look like.  Also included is a much abbreviated mock-up of my program for a case where I’m writing on the fly for a single table or column of information and a case where I’m setting up the write to local variable approach.  
    Message Edited by TESTIE on 04-03-2008 12:48 PM
    Attachments:
    illustration22.JPG ‏52 KB
    output_file2.JPG ‏120 KB
    illustration3.JPG ‏50 KB

    An Action Engine can thought of as an encapsulated shift register.
    AE's out-perform locals while alos elliminating possible race conditions. You may want to review the Nugget I wrote on Action Engines.
    Just trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Facing Problem in saving to Excel Sheet

    Hi,
    This is Anupam from Kolkata of India.
    I am writing a jsp in which I am facing some problem .I am trying to save the content of a table to a excel shhet.The code is follows
    <%@ page contentType="application/vnd.ms-excel" %>
    <html>
    <%-- Set the content disposition header --%>
    <%
    response.setHeader("Content-Disposition", "inline; filename=\"mult-table1.xls\"");
    %>
    <body>
    <table>
    <% for(int i = 1; i <= 12; i++){ %>
    <tr>
    <% for(int j = 1; j <= 12; j++){ %>
    <td>
    <%= i * j %>
    </td>
    <% } %>
    </tr>
    <% } %>
    </table>
    </body>
    </html>
    The jsp is saving the the table to the Excel Sheet but in the browser I am getting the Error Message
    Internet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable
    This may be because I have changed the changed the content type from text/html.
    Another problem I am facing that I am creating a portlet in the weblogic Portal but it is displaying error message box informing that the jsp can not be downloaded.
    Can any body help me out
    Thanks in advance
    Anupam Sarkar

    Your code works, when I try to access your JSP page, it correctly downloads the table data into an excel spreadsheet.
    Regarding the weblogic portlet you can check with Weblogic forum or provide more details so we can diagnose the problem.

  • Problem in saving data in spreadshee​t that comes from DAQ

    Hi
    I am new for using the Labview. I have problem saving the data in spreadsheet. mine just save the last reading that come from DAQ. And can not figure it out .
    If  there is way to make it save all the data with the time when I start run it till I stop it,please
    Thanks in advince
    Attachments:
    2 temp recording spreadsheet Ver_ 3.vi ‏141 KB

    I've changed the architecture to something that is way better then the sequence structure you had (State Machine).  Just to give you an idea on how it could be done.
    Still the dynamic data type is in there (which I don't like), but I'm not going to change your method.
    I've cleaned up your code a bit.  It's still not perfect, but it's done in 2mins. 
    I do have one question though : why are you saving an entire column (the last) of data which contains the same value (namely the total time the test ran)???
    Kind regards,
    - Bjorn -
    Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's
    LabVIEW 5.1 - LabVIEW 2012
    Attachments:
    2 temp recording spreadsheet Ver_ 4SM.vi ‏100 KB

  • Facing problem in transferring data in APD

    Hi All,
    I have a query which has 2 structures and so the in normal conditions also when the query is executed it takes a lot of time to execute and the output file is also huge.
    Now the client wants to automate this query by adding one new field in it by using the APD.
    I tried using the approach
    Query -> hide columns -> Routine(to add the new field) -> hide columns -> PC file
    This thing was working when there was a filter condition for only 2 sales offices but after removing the filter there are 22 sales offices and I am getting a "Run time error" or "Memory low error".
    So i tried the 2nd approach i.e.
    Query -> transformation -> DSO1(direct update) -> DSO(standard)
    but here also i am facing the same problem.
    Please give me a good solution as this issue has to be completed ASAP.
    Thanks in advance.

    Hi,
    For trial purpose I have set a filter in which only 3 sales offices will be used out of 20. But still I am facing the same "Memory low" error. The sales offices I have considered have less data as compared to other sales offices but still I am facing this issue I dont know is this happening.
    Can you guys share some info on this.

  • Problem with saving data in text file in Application server

    Hello Experts,
    I am trying to save a text file in application server.When I text file have less that 60000 (i.e 59999) records, it saves the file successfully, but if records in text file (saved in application server) is more than 60000 (i.e 60002), it creates a new file at the 60000th record with the continued records.
    Can anyone please advise, why it is creating a new file if records are more that 60000. I tested it with 59000 records in my internal table and it is working fine. I have not given any restriction in my program to create a new file if records are more than 60000.
    The logic I implemented is the following:
    *Open file
      open dataset g_accnt_file for output in text mode encoding utf-8.
      if sy-subrc = 0.
        clear g_header_record.
    *Building header record for Accounting Validation file
        concatenate gc_hdr_desc
                    gc_filetype
                    gc_sequence
                    gc_idntf_refresh
                    gc_cmpny_idntf
                    gc_accnt_id
                    sy-datum
                    sy-uzeit
                    gc_linde_group
                    sy-sysid
                    gc_not_used into g_header_record separated by
                                               gc_deliminator.
        transfer g_header_record to g_accnt_file.
    *Move Cost center data to file to create a detail record for Accounting
    *Validation file
        loop at gt_csks into gs_csks.
    *Remove leading Zeros
          call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
            exporting
              input  = gs_csks-kostl
            importing
              output = gs_csks-kostl.
    *      Overlay gs_csks-kostl with space.
    *      SHIFT gs_csks-kostl RIGHT DELETING TRAILING gc_space.
    *Prepare Cost Centre String
          perform prepare_costcentre_string.
    *Prepare detail record with Company Code & Cost Centre
          perform prepare_detail_record.
          clear:g_detail_record,gs_csks,g_coa.
        endloop.
    *Move Order data to file to create a detail record for Accounting
    *Validation file
        loop at gt_aufk into gs_aufk.
    *Remove leading Zeros
          call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
            exporting
              input  = gs_aufk-aufnr
            importing
              output = gs_aufk-aufnr.
    *      SHIFT gs_aufk-aufnr RIGHT DELETING TRAILING gc_space.
    *Prepare Order String
          perform prepare_order_string.
    *Prepare detail record with Company Code & Order
          perform prepare_detail_record.
          clear:g_detail_record,gs_aufk,g_coa.
        endloop.
    *Move WBS data to file to create a detail record for Accounting
    *Validation file
        loop at gt_prps into gs_prps.
          call function 'CONVERSION_EXIT_ABPSP_OUTPUT'
            exporting
              input  = gs_prps-pspnr
            importing
              output = g_wbs_element.
    *      SHIFT g_wbs_element RIGHT DELETING TRAILING gc_space.
    *Prepare WBS Element String
          perform prepare_wbs_string.
    *Prepare detail record with Company Code & WBS Element
          perform prepare_detail_record.
          clear:g_detail_record,gs_prps,g_coa.
        endloop.
    *Building trailer record for Accounting Validation file which will
    *contain the total number of detail records in file
        concatenate gc_trail_desc
                    g_total_count
                    into g_trailer_record
                    separated by gc_deliminator.
        transfer g_trailer_record to g_accnt_file.
    *Close file
        close dataset g_accnt_file.
        if sy-subrc = 0.
          message s036(/lig/fi).
        endif.
      endif.
    endform.                    " SELECT_DATA
    Edited by: Matt on Sep 30, 2010 11:02 AM - added   tags

    Hi Pankaj,
    Can u check the concatenate statement with one more data. Check the no of lines for a single file.
        concatenate gc_hdr_desc
                    gc_filetype
                    gc_sequence
                    gc_idntf_refresh
                    gc_cmpny_idntf
                    gc_accnt_id
                    sy-datum
                    sy-uzeit
                    gc_linde_group
                    sy-sysid
                    sy-subrc
                    gc_not_used into g_header_record separated by
                                               gc_deliminator.
    Regards,
    Amitava

  • Facing  problem in fetching data

    hello everyone ,
    can anyone help me out  frm the problem , i need to fetch  data in alv  report (  likp-vbeln  ,lips-vgbel , likp-kunnr , vbpa-lifnr , vbrp-vgbel,vbuk-fkstk,vbrk-kunrg, vbrk-fkart and lfa1-name1 )  using  input parameter lips-vbeln or likp-vbeln .every time  i stuck in  select querries  for  fetching fieds  of   vbpa vbrk  vbrp vbuk and lfa1 .
    i am new to this forum excuse for  any mistake  regarding the rules and restriction .
    ranjan

    Moderator message - Welcome to SCN.
    Please read Please read "The Forum Rules of Engagement" before posting!  HOT NEWS!! and How to post code in SCN, and some things NOT to do... and [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again.
    Thread locked.
    Rob

  • Facing problem in getting data in different field

    hi,
    i have made a report in ALV format. n the whole code is this..
    TABLES: VBAK,vbap.
    type-pools: slis.       "ALV Declarations
    SELECT-OPTIONS:
    s_sales   for    vbak-kunnr    obligatory,
    s_date    for    VBAK-audat    obligatory.
    *Data Declaration
    types: begin of s_sales,
      kunnr like vbak-kunnr,
      ernam like VBRP-ernam,
      audat like VBAK-audat,
      aufnr like VBAK-aufnr,
      KBMENG like vbap-KWMENG,
      matnr like vbap-matnr,
      matwa like vbap-matkl,
      end of s_sales.
    DATA: IT_VBAKUK TYPE STANDARD TABLE OF s_sales INITIAL SIZE 0,
          WA_sales TYPE s_sales.
    *ALV data declarations.
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    *start-of-selection.
    START-OF-SELECTION.
      perform data_retrieval.
      perform build_fieldcatalog.
      perform build_layout.
      perform display_alv_report.
    *&      Form  build_fieldcatalog
          text
    form build_fieldcatalog.
      fieldcatalog-fieldname   = 'KUNNR'.
      fieldcatalog-seltext_m   = 'Customer Code'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'ernam'.
      fieldcatalog-seltext_m   = 'Customer Name'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'stadat'.
      fieldcatalog-seltext_m   = 'Order Date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'aufnr'.
      fieldcatalog-seltext_m   = 'Order No'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'KWMENG'.
      fieldcatalog-seltext_m   = 'Quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'matnr'.
      fieldcatalog-seltext_m   = 'Material Code'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'matkl'.
      fieldcatalog-seltext_m   = 'Material Description'.
      fieldcatalog-col_pos     = 7.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    "build_fieldcatalog
    *&      Form  build_layout
          text
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
    endform.                    "build_layout
    *&      Form  display_alv_report
          text
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = gd_repid
          is_layout          = gd_layout
          it_fieldcat        = fieldcatalog[]
          i_save             = 'X'
        TABLES
          t_outtab           = IT_VBAKUK
        EXCEPTIONS
          program_error      = 1
          others             = 2.
      if sy-subrc <> 0.
      endif.
    endform.                    " DISPLAY_ALV_REPORT
    *&      Form  data_retrieval
          text
    form data_retrieval.
      select vbakkunnr VBakernam VBAkaudat vbakaufnr vbapKWMENG vbapmatnr vbap~matkl
      up to 10 rows
        from vbak inner join vbap on vbakvbeln = vbapvbeln
        into table IT_VBAKUK.
    endform.                    "data_retrieval
    When a execute this query it get this result:
    Customer code Customer No. Order Date      *Order No. *        *Quantity *        Material code  Material Description
    0000001390     0000001390     0000001390     0000001390     0000001390     0000001390     0000001390
    0000001175     0000001175     0000001175     0000001175     0000001175     0000001175     0000001175
    0000001175     0000001175     0000001175     0000001175     0000001175     0000001175     0000001175
    0000001175     0000001175     0000001175     0000001175     0000001175     0000001175     0000001175
    0000001175     0000001175     0000001175     0000001175     0000001175     0000001175     0000001175
    0000001001     0000001001     0000001001     0000001001     0000001001     0000001001     0000001001
    0000002200     0000002200     0000002200     0000002200     0000002200     0000002200     0000002200
    0000002200     0000002200     0000002200     0000002200     0000002200     0000002200     0000002200
    0000002200     0000002200     0000002200     0000002200     0000002200     0000002200     0000002200
    0000002200     0000002200     0000002200     0000002200     0000002200     0000002200     0000002200
    You can see in all column data is repeating even tough i have given different field name...
    Kindly give me solution of this problem.
    Thanks n Regards.

    hi,
    i have these field:
    *select VBAK~KUNNR VBAK~ERNAM VBAK~AUDAT VBAK~AUFNR VBAP~KWMENG VBAP~MATNR VBAP~MATKL
      up to 10 rows
        from VBAK inner join VBAP on VBAK~VBELN = VBAP~VBELN
        into table IT_VBAKUK.
    endform.*
    I want to add these field in my parameter by using WHERE clause but don't know how to restrict these field using where clause.
    Kindly give me some example related to this.
    Regards

  • Facing problem in writing data to excel sheet using ActiveX

    Hi.
    I want to write data from a one dimesional array to a particular excel sheet in a particular row.Please see the attached vi for explantion.
    It is giving error.But If I give a new file name when the appliation is getting closed it is writing data to the new excel file.
    Please help.
    Thanks in advance
    Attachments:
    Excel sheetWrite.vi ‏90 KB

    Thanks Jhoskin and Rudi .......
    I am able to write data to excel sheet now. I am attaching one"test.zip" file that contains a VI named "Squence.vi "that contains another subVI named "Write U94006 Table To XL.vi"which does the functionality of counting the number of rows in the excel sheet and writing data in the next blank row. I am using the same subVI in the VI named "Sequence.vi"two times so it is taking a lot of time in opening and closing the excel sheet. Will you please suggest some way of calling the subVI only one time.
    Rikki
    Attachments:
    Test.zip ‏105 KB

  • I am facing problem in loading data in ap_invoices_all  in R12 through API

    Hi,
    When I am trying to load data in R12 through API (ap_invoices_pkg. Insert_Row), I can see my record in base table ap_invoices_all but I can't find my record from frontend application.
    MAGSA AP Supervisor -> Invoices -> Entry -> Invoices.
    I will be very greatful if anyone can tell me the reason why I am not able to find my record.
    Thanks
    Ranjana

    I believe the issue is related to Multi Org Access Control (MOAC) - pl see MOS Doc 420787.1 - Oracle Applications Multiple Organizations Access Control for Custom Code - for a discussion.
    HTH
    Srini

Maybe you are looking for

  • Problem with ratings-based smart playlists in iOS5.

    I use ratings-based smart playlists to organize my music.  For example, a typical smart playlist will include all songs from a given genre rated 3 stars or better.  Playlists work perfectly on PC/iTunes and iPad (and used to work perfectly on iPhone/

  • CS4 How to save a clip or a group of clips to use in another project ?

    Hi guys, I am new here and I am new in this videoediting. I find Premiere Pro fantastic to edit videos, it really is a program for PRO´s. Because of that it has so many functions and options that it is hard for a beginner to find his way. I have trie

  • If i connect my iphone 5 to another computer, wil i lose all my music?

    Hi I have a lot of music on my iphone 5, and i was wondering if i connect my iphone to another computer, wil i lose all my music? My computer doesn't work and i have all my music saved in the computer and in itunes on my own computer, but i have the

  • HT204387 connect iphone 5s to windows laptop via bluetooth

    I am trying to connect my iPhone 5s to my Windows Laptop via Bluetooth.  The laptop can see the iPHone but cannot connect.  What can I do?

  • PCI vs PCIe slots?

    Dumb question, I suppose ... but, I'm about to upgrade from my G5 2ghz to an 8 core 3.0ghz and have two cards I need for FCP: a SATA drive card and a Blackmagic capture card (Decklink SP). I assume both cards are PCI and not PCI Express. Will these c