How to perform FT on XY Graph data?

Hello,
I have my data in two 1D arrays (X and Y) and plotted in an XY Graph.  I did not use a waveform because it was not a time signal, it was a spatial one with an uneven interval.  Briefly, the experiment measured the output of an amplifier as the position of a mirror was varied through several millimeters.  I need the fourier transform of this plot but cannot figure out how to do it in labview.
I've uploaded the raw data file which is a tab delimited txt file.  If this is transposed and displayed in an XY graph you will retrieve the curve I need to FT.  As the X data is on the order of 1E-10 I am expecting reciprocal space, X', to be on the order of 1E+10.
Please help, I have been playing about with FFT.vi and signal processing VI's all day and cannot seem to get anywhere. 
Attachments:
60mW_Delay1.txt ‏5 KB

FFT assumes that your data is equally spaced in X, but you said that you have uneven intervals (if I understand you right).
There is a tool for unevenly sampled data: Unevenly Sampled Signal Spectrum VI
You could also resample your data into a even grid using interpolation.
A waveform graph does not imply time data, you can call the axis anything you want. The only requirement is that the data has a constant x-increment. If it does, you can di a plain FFT on the Y array and calculate df from dx and N.
EDIT: looking at your data: for all practical purpose it is sampled equally in time, the differences are due to the limited decimal resolution. the delta is randomly either 3.3E-14 or 3.4E-14, depending on where you look. You could just use an average delta.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    Here's a quick example I threw together that generates a sort-of-bell-curve shaped data distribution, then performs the binning and plotting.
    -Kevin P.
    Message Edited by Kevin Price on 12-01-2006 02:42 PM
    Attachments:
    Binning example.vi ‏51 KB
    Binning example.png ‏12 KB

  • How to perform calculations using column data in BI Publisher

    Hello guys
    I am very new to BIP, and recently I am learning to create new templates using XML files..
    I am trying to create a report that has Account Amount, Amount Net Amount, PM_Amount and a New field say "X"
    For Account Amount it is what it is, but for Net Amount it is "Account Amount/40%", for PM_Amount it is "Net Amount x (Account Amount/30)" and for field X it is "(Net Amount + PM_Amount)/column A" where column A is another data field in the XML file but it should not be included in the template report..
    Could anyone help me with how to perform such kind of calculations in BIP Template builder? In OBIEE, it is very easy that I can just use column formula, but in BIP I still haven't figure out the way yet..
    PLease advice
    Thanks

    Thanks for the reply..
    I looked at the link you provided already, what I wanna know is how to exactly apply the expression in my calculation. In other words, I know that Column C = "Column A div Column B", but in BIP form property, how do I actually substitue "column A" with the actual column..
    I wish I could post the XML, but it is huge, it contains 6 data sets and more than 100 columns. I only need 15 columns on my template.
    On the form property of each measures, in the "advance tab", I see codes like <?accountamount?>. Now I wanna have a new column said "PM_Amt" which should be "(accountamount div %40) x column B". So I just randomly select another column said "payment". I rename it to "PM_AMT" and on its "advanced tab" it is still <?payment?>. So right there, if I wanna replace that code with a new one that does "(accountamount div %40) x column B" calculation, how would I do it? What would be the syntax including how to propertly refer to the right column field as part of the expression?
    And do I have to always use xdofx between <>? how would I know?
    Please advice if you understood what I am trying to say
    Much thanks
    Edited by: user7276913 on Sep 14, 2009 11:24 PM

  • How to have a web-based interface for Lumira that also performs Ad-Hoc visualizations on data that should be loaded live from HANA.

    How to have a web-based interface for Lumira that also performs Ad-Hoc visualizations on data that should be loaded live from HANA. I have another tool that puts data into HANA, So don't want to reload this new data into Lumira every time I want to run a report.
    so do i  have the ability to create polished ad hoc dashboards, reports, infographics and storyboards Apart from Ad-Hoc reports, I also need a dashboard with some fixed reports that update with the live data.
    So please suggest me to accomplish this task.
    Thanks and regards
    Shashi kiran

    Please have a look at Ludek's document here which contains links: SAP Lumira Family Supported Versions Matrix
    Ludek has also attached the PAM's as zipped files; Lumira comes in many flavors so I encourage you to research options
    Also see this "HANA Live" document: [SAP HANA Academy] Visualized: Lumira & HANA

  • How do I write a vi that will save graph data and text data (related to the graph) so the next time I want to view the graph data the text data is included in the read vi?

    I am new at writing vi's and hope you may be able to help. I would like to create a vi that will graph measurements taken from a daq device. I would like to include text data that a user can choose from (example: machine number, test circuit, load cell type) that will stay with the graph so when the graph is viewed at a later time the text data (explaining parts of the graph) will display with the graph data. I have included a vi I am using to capture and display a force value. Any help would be greatly appreicated.
    Attachments:
    force.vi ‏500 KB

    What you want is a DATALOG file:
    When you save a file, use the BUNDLE function to bundle your machine number, test circuit, whatever (include a few spare fields), plus your graph data. Get the graph data from the source, or use a local variable of the graph itself.
    Wire the bundle output to the DATALOG TYPE of a NEW FILE function. (I presume you'll use a FILE DIALOG set to SAVE FILE to choose a file path).
    Write the same bundle output to the DATA input of a WRITE FILE function.
    Use a CLOSE FILE function to (ahem) close the file.
    When you want to read a file, use a FILE DIALOG set to EXISTING FILE (or some other means) to specify what file to read. Wire the same cluster type to the DATALOG TYPE of the FILE DIALOG, so that it will only
    offer files of the correct type.
    When you have a file path chosen, wire the bundle to the DATALOG TYPE input of a FILE OPEN operation.
    Use a FILE READ to read a single cluster - the output of FILE READ will be a cluster of the right type.
    Use a CLOSE FILE function to....
    Out of the FILE READ function, you can UNBUNDLE BY NAME the data and send to the graph and the other fields, or, if you're clever, you can use a cluster on the screen, and not unbundle it. That's harder though, since you probably want the text fields to be controls (inputs) and the graph to be an indicator (output).
    Hope that helps.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • How can I modify the High Speed Data Reader VI to show correct time informatio​n in x-axis?

    I am just a beginner learning the LabVIEW programming currently.
    I have a PXI 6115 DAQ card and have to make a hardware timed acquisition VI for maximum performance. Thus I use the High Speed Data Logger VI for data acquisition.
    However, when I read my data by using the High Speed Data Reader VI, it doesn't show its correct time information in the graph.
    How can I modify the High Speed Data Reader VI to show correct time information in x-axis?
    I hope you can explain easily because I am a beginner.

    Hey Chunrok,
    I've modified the High Speed Data Reader VI slightly so that it now uses the scan rate of the data (as determined from the file) to set the scaling for the data points. If you wanted the start time to be a specific time you could use the start time obtained from your file to set the xscale offset as well.
    I hope this helps!
    Sarah Miracle
    National Instruments
    Attachments:
    Example.vi ‏281 KB

  • How can I modify the High Speed Data Reader VI to show the time information in x-axis?

    I am just a beginner learning the LabVIEW programming currently.
    I have a PXI 6115 DAQ card and have to make a hardware timed acquisition VI for maximum performance. Thus I use the High Speed Data Logger VI for data acquisition.
    However, when I read my data by using the High Speed Data Reader VI, it doesn't show its time information in the graph.
    How can I modify the High Speed Data Reader VI to show the time information in x-axis?
    I hope you can explain easily because I am a beginner.

    Format the x axis to either absoulte or relative time.
    You can do this by right clickingo n the graph and selecting x axis then formatting from the menu.
    Thanks,
    Naresh

  • How can I modify the High Speed Data Reader VI to show correct time information in x-axis?

    I am just a beginner learning the LabVIEW programming currently.
    I have a PXI 6115 DAQ card and have to make a hardware timed acquisition VI for maximum performance. Thus I use the High Speed Data Logger VI for data acquisition.
    However, when I read my data by using the High Speed Data Reader VI, it doesn't show its correct time information in the graph.
    How can I modify the High Speed Data Reader VI to show correct time information in x-axis?
    I hope you can explain easily because I am a beginner.

    First, I couldn't seem to find that example either on computer or on the NI sites.
    The problem that we're running into is stated in the article that I pointed to - when real time VIs are running, then the OS will stop updating the OS clock. TO us it looks like the clock is losing time. There is a hardware clock on the PXI and it is read only during boot up to set the OS clock. Our discussions with NI have not led to a solution for this problem without checking the time on start and then checking the tick count (which does not lose time) and calculating what the current time is. No access to the hardware clock is supplied.
    We're still working on a simpler way to get accurate time.
    Rob

  • How To Perform Lot Split Transactions Using Transaction Open Interface (MTI)

    Can anyone give me some guidance on how to perform lot split transaction using MTI?
    I am using the following code:
    DECLARE
    l_transaction_type_id NUMBER := 83;
    l_transaction_action_id NUMBER := 41;
    l_transaction_source_type_id NUMBER := 13;
    l_org_id NUMBER := 1884;
    l_txn_header_id NUMBER;
    l_txn_if_id1 NUMBER;
    l_txn_if_id2 NUMBER;
    l_txn_if_id3 NUMBER;
    l_parent_id NUMBER;
    l_sysdate DATE;
    l_item_id NUMBER :=287996;
    l_user_id NUMBER;
    l_distribution_account_id NUMBER;
    l_exp_date DATE;
    BEGIN
    --For Lot Merge, there should be only one resultant lot.
    --The transaction_quantity populated in MTI/MTLI should be the entire
    --quantity that is available to transact for the org/sub/item/locator/LPN in
    --that particular lot number.
    --Get transaction_header_id for all the MTIs
    SELECT APPS.mtl_material_transactions_s.NEXTVAL
    INTO l_txn_header_id
    FROM sys.dual;
    --Get transaction_interface_id of resultant record
    SELECT APPS.mtl_material_transactions_s.NEXTVAL
    INTO l_txn_if_id1
    FROM sys.dual;
    l_parent_id := l_txn_if_id1;
    l_sysdate := SYSDATE;
    l_user_id := -1; --substitute with a valid user_id
    l_distribution_account_id := NULL; --needed for lot translate
    l_exp_date := NULL; --set if required
    --Populate the MTI record for resultant record
    INSERT INTO MTL_TRANSACTIONS_INTERFACE
    transaction_interface_id,
    transaction_header_id,
    Source_Code,
    Source_Line_Id,
    Source_Header_Id,
    Process_flag,
    Transaction_Mode,
    Lock_Flag,
    Inventory_Item_Id,
    revision,
    Organization_id,
    Subinventory_Code,
    Locator_Id,
    Transaction_Type_Id,
    Transaction_Source_Type_Id,
    Transaction_Action_Id,
    Transaction_Quantity,
    Transaction_UOM,
    Primary_Quantity,
    Transaction_Date,
    Last_Update_Date,
    Last_Updated_By,
    Creation_Date,
    Created_By,
    distribution_account_id,
    parent_id,
    transaction_batch_id,
    transaction_batch_seq,
    lpn_id,
    transfer_lpn_id
    VALUES
    l_txn_if_id1, --transaction_header_id
    l_txn_header_id, --transaction_interface_id
    'INV', --source_code
    -1, --source_header_id
    -1, --source_line_id
    1, --process_flag
    3, --transaction_mode
    2, --lock_flag
    l_item_id, --inventory_item_id
    null, --revision
    l_org_id, --organization_id
    'EACH', --subinventory_code
    1198, --locator_id
    l_transaction_type_id, --transaction_type_id
    l_transaction_source_type_id, --transaction_source_type_id
    l_transaction_action_Id, --l_transaction_action_id
    100000, --transaction_quantity
    'EA', --transaction_uom
    100000, --primary_quantity
    l_sysdate, --Transaction_Date
    l_sysdate, --Last_Update_Date
    l_user_id, --Last_Updated_by
    l_sysdate, --Creation_Date
    l_user_id, --Created_by
    l_distribution_account_id, --distribution_account_id
    l_parent_id, --parent_id
    l_txn_header_id, --transaction_batch_id
    2, --transaction_batch_seq
    NULL, --lpn_id (for source MTI)
    NULL --transfer_lpn_id (for resultant MTIs)
    --Insert MTLI corresponding to the resultant MTI record
    INSERT INTO MTL_TRANSACTION_LOTS_INTERFACE(
    transaction_interface_id
    , Source_Code
    , Source_Line_Id
    , Process_Flag
    , Last_Update_Date
    , Last_Updated_By
    , Creation_Date
    , Created_By
    , Lot_Number
    , lot_expiration_date
    , Transaction_Quantity
    , Primary_Quantity
    VALUES (
    l_txn_if_id1 --transaction_interface_id
    , 'INV' --Source_Code
    , -1 --Source_Line_Id
    , 'Y' --Process_Flag
    , l_sysdate --Last_Update_Date
    , l_user_id --Last_Updated_by
    , l_sysdate --Creation_date
    , l_user_id --Created_By
    , 'Q0000.1' --Lot_Number
    , l_exp_date --Lot_Expiration_Date
    , 100000 --transaction_quantity
    , 100000 --primary_quantity
    INSERT INTO MTL_TRANSACTIONS_INTERFACE
    transaction_interface_id,
    transaction_header_id,
    Source_Code,
    Source_Line_Id,
    Source_Header_Id,
    Process_flag,
    Transaction_Mode,
    Lock_Flag,
    Inventory_Item_Id,
    revision,
    Organization_id,
    Subinventory_Code,
    Locator_Id,
    Transaction_Type_Id,
    Transaction_Source_Type_Id,
    Transaction_Action_Id,
    Transaction_Quantity,
    Transaction_UOM,
    Primary_Quantity,
    Transaction_Date,
    Last_Update_Date,
    Last_Updated_By,
    Creation_Date,
    Created_By,
    distribution_account_id,
    parent_id,
    transaction_batch_id,
    transaction_batch_seq,
    lpn_id,
    transfer_lpn_id
    VALUES
    l_txn_if_id1, --transaction_header_id
    l_txn_header_id, --transaction_interface_id
    'INV', --source_code
    -1, --source_header_id
    -1, --source_line_id
    1, --process_flag
    3, --transaction_mode
    2, --lock_flag
    l_item_id, --inventory_item_id
    null, --revision
    l_org_id, --organization_id
    'EACH', --subinventory_code
    1198, --locator_id
    l_transaction_type_id, --transaction_type_id
    l_transaction_source_type_id, --transaction_source_type_id
    l_transaction_action_Id, --l_transaction_action_id
    100000, --transaction_quantity
    'EA', --transaction_uom
    100000, --primary_quantity
    l_sysdate, --Transaction_Date
    l_sysdate, --Last_Update_Date
    l_user_id, --Last_Updated_by
    l_sysdate, --Creation_Date
    l_user_id, --Created_by
    l_distribution_account_id, --distribution_account_id
    l_parent_id, --parent_id
    l_txn_header_id, --transaction_batch_id
    3, --transaction_batch_seq
    NULL, --lpn_id (for source MTI)
    NULL --transfer_lpn_id (for resultant MTIs)
    --Insert MTLI corresponding to the resultant MTI record
    INSERT INTO MTL_TRANSACTION_LOTS_INTERFACE(
    transaction_interface_id
    , Source_Code
    , Source_Line_Id
    , Process_Flag
    , Last_Update_Date
    , Last_Updated_By
    , Creation_Date
    , Created_By
    , Lot_Number
    , lot_expiration_date
    , Transaction_Quantity
    , Primary_Quantity
    VALUES (
    l_txn_if_id1 --transaction_interface_id
    , 'INV' --Source_Code
    , -1 --Source_Line_Id
    , 'Y' --Process_Flag
    , l_sysdate --Last_Update_Date
    , l_user_id --Last_Updated_by
    , l_sysdate --Creation_date
    , l_user_id --Created_By
    , 'Q0000.1' --Lot_Number
    , l_exp_date --Lot_Expiration_Date
    , 100000 --transaction_quantity
    , 100000 --primary_quantity
    --Get transaction_interface_id of Source record-1
    SELECT APPS.mtl_material_transactions_s.NEXTVAL
    INTO l_txn_if_id2
    FROM sys.dual;
    --Populate the MTI record for Source record-1
    INSERT INTO MTL_TRANSACTIONS_INTERFACE
    transaction_interface_id,
    transaction_header_id,
    Source_Code,
    Source_Line_Id,
    Source_Header_Id,
    Process_flag,
    Transaction_Mode,
    Lock_Flag,
    Inventory_Item_Id,
    revision,
    Organization_id,
    Subinventory_Code,
    Locator_Id,
    Transaction_Type_Id,
    Transaction_Source_Type_Id,
    Transaction_Action_Id,
    Transaction_Quantity,
    Transaction_UOM,
    Primary_Quantity,
    Transaction_Date,
    Last_Update_Date,
    Last_Updated_By,
    Creation_Date,
    Created_By,
    distribution_account_id,
    parent_id,
    transaction_batch_id,
    transaction_batch_seq,
    lpn_id,
    transfer_lpn_id
    VALUES
    l_txn_if_id2, --transaction_header_id
    l_txn_header_id, --transaction_interface_id
    'INV', --source_code
    -1, --source_header_id
    -1, --source_line_id
    1, --process_flag
    3, --transaction_mode
    2, --lock_flag
    l_item_id, --inventory_item_id
    null, --revision
    l_org_id, --organization_id
    'EACH', --subinventory_code
    1198, --locator_id
    l_transaction_type_id, --transaction_type_id
    l_transaction_source_type_id, --transaction_source_type_id
    l_transaction_action_Id, --transaction_action_id
    -200000, --transaction_quantity
    'EA', --transaction_uom
    -200000, --primary_quantity
    l_sysdate, --Transaction_Date
    l_sysdate, --Last_Update_Date
    l_user_id, --Last_Updated_by
    l_sysdate, --Creation_Date
    l_user_id, --Created_by
    l_distribution_account_id, --distribution_account_id
    l_parent_id, --parent_id
    l_txn_header_id, --transaction_batch_id
    1, --transaction_batch_seq
    NULL, --lpn_id (for source MTI)
    NULL --transfer_lpn_id (for resultant MTIs)
    --Insert MTLI corresponding to the Source record-1
    INSERT INTO MTL_TRANSACTION_LOTS_INTERFACE(
    transaction_interface_id
    , Source_Code
    , Source_Line_Id
    , Process_Flag
    , Last_Update_Date
    , Last_Updated_By
    , Creation_Date
    , Created_By
    , Lot_Number
    , lot_expiration_date
    , Transaction_Quantity
    , Primary_Quantity
    VALUES (
    l_txn_if_id2 --transaction_interface_id
    , 'INV' --Source_Code
    , -1 --Source_Line_Id
    , 'Y' --Process_Flag
    , l_sysdate --Last_Update_Date
    , l_user_id --Last_Updated_by
    , l_sysdate --Creation_date
    , l_user_id --Created_By
    , 'Q0000' --Lot_Number
    , l_exp_date --Lot_Expiration_Date
    , -200000 --transaction_quantity
    , -200000 --primary_quantity
    END;

    the first MTI record should be the source record ...ie. it should have transaction quantity as negative.
    new set of MTI records should have positive transaction quantities.
    Also ensure that sum of transaction quantities for the set should be 0...
    What is the error that you are getting?
    Thanks,
    Hrishi.

  • How do I make an XY-Graph plot points over time?

    I am building a program to plot and take data of a relationship between two voltages.  One is voltage is uniquely dependent on the other.  So far I have successfully built an XY-Graph to plot the voltages against each other (Voltage1 along the x-axis and Voltage2 along the y-axis).  However, the XY-Graph only diplays the point (V1, V2) at the instantaneous time I am looking at it, and does not continuously plot different points as I vary the independent voltage.  I need the graph to display all the points that occur as I vary the independent voltage.  As of right now, all I see is one little cursor that moves all over the graph as I vary it.  My program consists of a While Loop that contains all of the following:  two seperate data anolog input functions that take both voltage separately from my board.  The the output samples from each 'AI Sample' function are then bundled into one cluster using the 'bundle' function.  The cluster output from the 'bundle' function is then wired to a 'build array' function.  The 1-D array output from the 'build array' function is then wired to my 'XY-Graph'.  How do I get the XY-Graph to plot a point every millisecond or so?

    Bundling and then using the Build Array is not correct. Yuo can see the correct method in the help for an XY Graph below. In order to use the normal XY Grpah, you would have two shif registers. One for the X array and one for the Y. Bundle the two arrays and then wire to the graph.
    The other way is to use the Express XY Graph. With that, you can just wire your scalars to the X and Y inputs and set the Reset input to false.
    Message Edited by Dennis Knutson on 11-12-2007 06:32 PM
    Attachments:
    XY Graph 1.PNG ‏21 KB
    XY Graph 2.PNG ‏6 KB

  • Graph Data Labels in OBIEE 11g - Customizing

    Hi folks!
    Would somebody know how to select what is shown in graph data labels in OBIEE 11g?
    For example in a scatter graph data label I'd like to show the Group only (not the combination of Series, Group, X and Y, as by default). For a pie chart one can select the data shown in data labels to some extent (name / value), however couldn't find this option for scatter graph.
    After searching I could only find instructions for 10g - such as John's instructions at http://obiee101.blogspot.com.es/2008/01/obiee-xy-and-data-in-mouse-over-label.html.
    However, my understanding is that the graph engine in OBIEE 11g is now different, and the 10g instructions are not valid for 11g anymore.
    I was also having a look on the .cxml files in OBIEE 11g but those seem to relate to colors only?
    Any help appreciated, best regards,
    Ilmari

    hello,
    i'm facing the same situation here,did you find a solution for your problem?

  • How to perform a clean install of Windows 8 / 8.1

    This document describes, how to perform a clean install of Windows 8.
    Windows 8 System Requirements
    1 GHz or faster processor (with PAE, NX and SSE2 support)
    1 GB RAM (32-bit) or 2 GB RAM (64-bit)
    16 GB available hard disk space (32-bit) or 20 GB (64-bit)
    DirectX 9 graphics device with WDDM 1.0 or higher driver
    Additional requirements to use certain features:
    To use touch, you need a tablet or a monitor that supports multitouch.
    To access the Windows Store and to download and run apps, you need an active Internet connection and a screen resolution of at least 1024 x 768.
    To snap apps, you need a screen resolution of at least 1366 x 768
    More Info: http://aps2.toshiba-tro.de/kb0/TSB2903E20000R02.htm

    I have a new SSD drive and need to either migrate my old HD data, including the Windows 8.1 OS or do a a clean install.  I have obtained the ISO, prepared the boot for the flashdrive and downloaded the install software.  It asks for the product key.   I used the suggested BIOS reader and obtained "a" product key off the BIOS and used that it but (as above) it does not recognize the image.
    How id I get my single Windows license onto my new SSD HD?  Reload, clean install, ???
    How do I get the proper product key or confirm it is correct? 
    It is a new system with little data that I need to copy. I just want the operating system.  I have the driver disc that came with it.

  • How to perform Error Handling in this Bdc Code

    Hi,
    I had created this BDC for the tcode MB1B and i want to know how to perform the ERROR HANDLING in it ..
    Plzz provide me guidelines for doing it . here's d code:-
    report ZBDC_MB1B
           no standard page heading line-size 255.
    include bdcrecx1.
    data: begin of record OCCURS 0,
          WERKS_001(004),     "Plant
          MATNR_002(018),     "ItemId
          ERFMG_003(013),     "Quantity in Unit of Entry
          ERFME_004(003),     "Unit of Entry
          LGORT_005(004),     "Storage Location
          CHARG_006(010),     "BatchId
          KDAUF_007(010),     "Sales Order Number
          KDPOS_008(006),     "Item Number in Sales Order
          end of record.
    PARAMETERS : P_FILNAM LIKE RLGRAP-FILENAME.
      initialization.
      CTUMODE = 'A'.
      CUPDATE = 'A'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILNAM.
      CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
         MASK                   = ',. '
         MODE                   = 'O'
         IMPORTING
         FILENAME                 = P_FILNAM
       EXCEPTIONS
         INV_WINSYS             = 1
         NO_BATCH               = 2
         SELECTION_CANCEL       = 3
         SELECTION_ERROR        = 4
         OTHERS                 = 5
      IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    start-of-selection.
    CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
         FILENAME                      = P_FILNAM
         FILETYPE                      = 'DAT'
        TABLES
          DATA_TAB                     = RECORD
       EXCEPTIONS
         CONVERSION_ERROR              = 1
         FILE_OPEN_ERROR               = 2
         FILE_READ_ERROR               = 3
         INVALID_TYPE                  = 4
         NO_BATCH                      = 5
         UNKNOWN_ERROR                 = 6
         INVALID_TABLE_WIDTH           = 7
         GUI_REFUSE_FILETRANSFER       = 8
         CUSTOMER_ERROR                = 9
         NO_AUTHORITY                  = 10
         OTHERS                        = 11
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT RECORD.
      BEGIN OF SCREEN 1
    perform bdc_dynpro      using 'SAPMM07M' '0400'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RM07M-SOBKZ'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    *perform bdc_field       using 'MKPF-BLDAT'
                                 '22.12.2008'.
    *perform bdc_field       using 'MKPF-BUDAT'
                                 '22.12.2008'.
    perform bdc_field       using 'RM07M-BWARTWA'
                                  '411'.
    perform bdc_field       using 'RM07M-SOBKZ'
                                  'E'.
    perform bdc_field       using 'RM07M-WERKS'
                                  RECORD-WERKS_001.             "Plant
    perform bdc_field       using 'XFULL'
                                  'X'.
    perform bdc_field       using 'RM07M-WVERS2'
                                  'X'.
      BEGIN OF SCREEN 2
    perform bdc_dynpro      using 'SAPMM07M' '0421'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSEG-CHARG(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MSEG-MATNR(01)'
                                  RECORD-MATNR_002.             "ITEMID
    perform bdc_field       using 'MSEG-ERFMG(01)'
                                  RECORD-ERFMG_003.             "QTY.
    perform bdc_field       using 'MSEG-ERFME(01)'
                                  RECORD-ERFME_004.             "UOM
    perform bdc_field       using 'MSEG-LGORT(01)'
                                  RECORD-LGORT_005.             "ST.LOC
    perform bdc_field       using 'MSEG-CHARG(01)'
                                  RECORD-CHARG_006.             "BATCHID
    perform bdc_field       using 'MSEGK-MAT_KDAUF'
                                  RECORD-KDAUF_007.             "S.O.
    perform bdc_field       using 'MSEGK-MAT_KDPOS'
                                  RECORD-KDPOS_008.             "S.O.LINE ITEM
    perform bdc_field       using 'DKACB-FMORE'
                                  'X'.
      BEGIN OF SCREEN 3
    perform bdc_dynpro      using 'SAPLKACB' '0002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTE'.
    perform bdc_field       using 'DKACB-FMORE'
                                  'X'.
    perform bdc_dynpro      using 'SAPLKACB' '0002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTE'.
    perform bdc_dynpro      using 'SAPMM07M' '0421'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSEG-ERFMG(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'DKACB-FMORE'
                                  'X'.
      BEGIN OF SCREEN 4
    perform bdc_dynpro      using   'SAPLKACB' '0002'.
    perform bdc_field       using      'BDC_OKCODE'
                                                '=ENTE'.
    perform bdc_transaction using 'MB1B'.
    ENDLOOP.

    hi,
    check this code in bold letters.
    INCLUDE BDCRECX1.
    TABLES : MARC.
    TYPES : BEGIN OF TY_UPLOAD,
            MATNR TYPE MARA-MATNR,
            WERKS TYPE MARC-WERKS,
            STEUC TYPE MARC-STEUC,
            END OF TY_UPLOAD.
    TYPES : BEGIN OF TY_MARC,
            MATNR TYPE MARA-MATNR,
            WERKS TYPE MARC-WERKS,
            END OF TY_MARC.
    TYPES : BEGIN OF TY_MTART,
            MATNR TYPE MARA-MATNR,
            MTART TYPE MARA-MTART,
            END OF TY_MTART.
    DATA : T_MARC TYPE STANDARD TABLE OF TY_MARC,
         : T_UPLOAD TYPE STANDARD TABLE OF TY_UPLOAD,
         : T_BASIC TYPE STANDARD TABLE OF TY_UPLOAD,
         : T_SALES TYPE STANDARD TABLE OF TY_UPLOAD,
         : T_ERROR TYPE STANDARD TABLE OF TY_UPLOAD.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
           IT_BDCDATA_VIEW LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
           IT_DATA(3200) OCCURS 0 WITH HEADER LINE,
           IT_FIELD(3200) OCCURS 0 WITH HEADER LINE,
           IT_BDCMSG TYPE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA GI_MSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : CHAR1(500),
          CHAR2(500),
          CHAR3 TYPE STRING,
          V_SELECTION TYPE STRING.  " For View Selection
    DATA : W_MARC TYPE TY_MARC,
           WA_UPLOAD TYPE TY_UPLOAD,
           WA_BASIC TYPE TY_UPLOAD,
           WA_SALES TYPE TY_UPLOAD,
           WA_ERROR TYPE TY_UPLOAD,
           WA_MTART TYPE TY_MTART.
    DATA : VAR TYPE N,
           VAR1 TYPE STRING.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.   "SELECTION SCREEN
    PARAMETERS: P_FNAM LIKE RLGRAP-FILENAME.
    PARAMETERS: P_BAS LIKE RLGRAP-FILENAME.
    PARAMETERS: P_SAL LIKE RLGRAP-FILENAME.
    PARAMETERS: P_ERR LIKE RLGRAP-FILENAME.
    SELECTION-SCREEN : END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAM.
      PERFORM SEARCH USING P_FNAM.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BAS.
      PERFORM SEARCH USING P_BAS.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SAL.
      PERFORM SEARCH USING P_SAL.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_ERR.
      PERFORM SEARCH USING P_ERR.
    *&      Form  SEARCH
          text
         -->PFNAME     text
    FORM SEARCH USING PFNAME.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          STATIC    = 'X'
        CHANGING
          FILE_NAME = PFNAME.
    ENDFORM.                    "SEARCH
    START-OF-SELECTION.
      PERFORM UPLOAD_PROCESS USING P_FNAM.
      PERFORM OPEN_GROUP.
      PERFORM PROCESS.
      PERFORM CLOSE_GROUP.
      IF NOT T_BASIC[] IS INITIAL.
        PERFORM DOWNLOAD TABLES T_BASIC[] USING P_BAS .
      ENDIF.
      IF NOT T_SALES[] IS INITIAL.
        PERFORM DOWNLOAD TABLES T_SALES[] USING P_SAL .
      ENDIF.
      IF NOT T_ERROR[] IS INITIAL.
        PERFORM DOWNLOAD TABLES T_ERROR[] USING P_ERR.
      ENDIF.
    *&      Form  PROCESS
          text
    FORM PROCESS.
      LOOP AT T_UPLOAD INTO WA_UPLOAD.
        PERFORM CONV_ROUTINE  USING WA_UPLOAD-MATNR
                            CHANGING WA_UPLOAD-MATNR.
        SELECT COUNT(*) FROM MARA WHERE MATNR = WA_UPLOAD-MATNR.
        IF SY-SUBRC NE 0.
          MOVE-CORRESPONDING  WA_UPLOAD TO WA_BASIC.
          APPEND WA_BASIC TO T_BASIC.
          CLEAR WA_BASIC.
          CONTINUE.
        ENDIF.
        SELECT COUNT(*) FROM MARC WHERE MATNR = WA_UPLOAD-MATNR
                                        AND WERKS = WA_UPLOAD-WERKS
                                        AND PSTAT LIKE '%V%'.
        IF SY-SUBRC NE 0.
          MOVE-CORRESPONDING  WA_UPLOAD TO WA_SALES.
          APPEND WA_SALES TO T_SALES.
          CLEAR WA_SALES.
          CONTINUE.
        ENDIF.
        CLEAR : WA_MTART.
        SELECT SINGLE MATNR MTART FROM MARA INTO WA_MTART WHERE MATNR = WA_UPLOAD-MATNR.
        PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0060'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RMMG1-MATNR'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=AUSW'.
        PERFORM BDC_FIELD       USING 'RMMG1-MATNR'
                                      WA_UPLOAD-MATNR.
        CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW'     " Function module
        EXPORTING
          MATERIAL                  = WA_UPLOAD-MATNR  " Material number
          MATERIALART               = WA_MTART-MTART          " Material Type
          SELECTION                 = 'V'              "
          TCODE                     = 'MM02'           " Tcode where view's are called.
        TABLES
          BTCI_D0070                = IT_BDCDATA_VIEW
        EXCEPTIONS
          MATERIAL_NOT_FOUND        = 1
          MATERIAL_NUMBER_MISSING   = 2
          MATERIAL_TYPE_MISSING     = 3
          MATERIAL_TYPE_NOT_FOUND   = 4
          NO_ACTIVE_DYNPRO_SELECTED = 5
          NO_AUTHORITY              = 6
          OTHERS                    = 7.
        READ TABLE IT_BDCDATA_VIEW WITH KEY FVAL  = 'X'.
        IF SY-SUBRC = 0.
          V_SELECTION = IT_BDCDATA_VIEW-FNAM.
        ELSE.
          CONTINUE.
        ENDIF.
        VAR = IT_BDCDATA_VIEW-FNAM+17(2).
        VAR = VAR + 3.
        CONCATENATE 'MSICHTAUSW-KZSEL(' '0' VAR ')' INTO VAR1.
        PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0070'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'MSICHTAUSW-DYTXT(06)'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM BDC_FIELD       USING VAR1
                                       'X'.
        CLEAR VAR.
        CLEAR VAR1.
       PERFORM BDC_FIELD       USING 'MSICHTAUSW-KZSEL(06)'
                                     'X'.
        PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0080'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RMMG1-VKORG'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM BDC_FIELD       USING 'RMMG1-WERKS'
                                      WA_UPLOAD-WERKS.
        PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '4004'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=BU'.
       PERFORM BDC_FIELD       USING 'MAKT-MAKTX'
                                     'MTI_ESE_HALB_01'.
        PERFORM BDC_FIELD       USING 'MARC-STEUC'
                                      WA_UPLOAD-STEUC.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'MARC-HERKR'.
        PERFORM BDC_FIELD       USING 'MARC-HERKL'
                                      'IN'.
        PERFORM BDC_FIELD       USING 'MARC-HERKR'
                                      'MAH'.
        PERFORM BDC_TRANSACTION USING 'MM02'.
    move the error record into seperate internal table nad down load it ****
        IF MESSTAB-MSGTYP = 'E'.
          MOVE-CORRESPONDING WA_UPLOAD TO WA_ERROR.
          APPEND WA_ERROR TO T_ERROR.
          CLEAR WA_ERROR.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "PROCESS
    *&      Form  UPLOAD_PROCESS
          text
         -->PFNAME     text
    FORM UPLOAD_PROCESS USING PFNAME.
      DATA : PFNAME1 TYPE STRING.
      PFNAME1 = PFNAME.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME            = PFNAME1
          FILETYPE            = 'ASC'
          HAS_FIELD_SEPARATOR = 'X'
        TABLES
          DATA_TAB            = T_UPLOAD[].
      IF SY-SUBRC <> 0.
      ENDIF.
    ENDFORM.                    "UPLOAD_PROCESS
    *&      Form  CONV_ROUTINE
          text
         -->P_INPUT    text
         -->P_OUTPUT   text
    FORM CONV_ROUTINE   USING    P_INPUT
                     CHANGING P_OUTPUT.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = P_INPUT
        IMPORTING
          OUTPUT = P_OUTPUT.
    ENDFORM.                    "CONV_ROUTINE
    *&      Form  DOWNLOAD
          text
         -->GI_FINAL   text
         -->PFNAME     text
    FORM DOWNLOAD TABLES
                  GI_FINAL
                         USING  PFNAME .
      DATA : FNAME TYPE STRING.
      FNAME = PFNAME.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                        = FNAME
          FILETYPE                        = 'DAT'
         WRITE_FIELD_SEPARATOR           = 'x'
            HEADER                          = '00'
          IMPORTING
            FILELENGTH                      =
        TABLES
          DATA_TAB                        =  GI_FINAL[]
          FIELDNAMES                      = GI_FIELDNAMES[]
      IF SY-SUBRC = 0.
        MESSAGE 'FILE DOWNLOADED SUCCESSFULLY' TYPE 'I'.
      ENDIF.
    ENDFORM.                    " DOWNLOAD
    Regards
    Siva Prasad

  • How do I get the last changed date & time of a file in app server?

    Hi Experts,
    How do I get the last changed date & time of a file in app server?
    Thanks!
    - Anthony -

    Hi,
    that's what I use...
      CALL 'C_DIR_READ_FINISH'.             " just to be sure
      CALL 'C_DIR_READ_START' ID 'DIR' FIELD p_path.
      IF sy-subrc <> 0.
        EXIT. "Error
      ENDIF.
      DO.
        CLEAR l_srvfil.
        CALL 'C_DIR_READ_NEXT'
          ID 'TYPE'   FIELD l_srvfil-type
          ID 'NAME'   FIELD l_srvfil-file
          ID 'LEN'    FIELD l_srvfil-size
          ID 'OWNER'  FIELD l_srvfil-owner
          ID 'MTIME'  FIELD l_mtime
          ID 'MODE'   FIELD l_srvfil-attri.
    *    l_srvfil-dir = p_path .
        IF sy-subrc = 1.
          EXIT.
        ENDIF." sy-subrc <> 0.
        PERFORM p_to_date_time_tz
          USING    l_mtime
          CHANGING l_srvfil-mod_time
                   l_srvfil-mod_date.
        TRANSLATE l_srvfil-type TO UPPER CASE.               "#EC TRANSLANG
        PERFORM translate_attribute CHANGING l_srvfil-attri.
        CHECK:
          NOT l_srvfil-file = '.',
          l_srvfil-type = 'D' OR
          l_srvfil-type = 'F' .
        APPEND l_srvfil TO lt_srvfil.
      ENDDO.
      CHECK NOT lt_srvfil IS INITIAL.
      pt_srvfil = lt_srvfil.
    FORM p_to_date_time_tz  USING    p_ptime  TYPE p
                            CHANGING p_time   TYPE syuzeit
                                     p_date   TYPE sydatum.
      DATA:
        l_abaptstamp TYPE timestamp,
        l_time       TYPE int4,
        l_opcode     TYPE x VALUE 3,
        l_abstamp    TYPE abstamp.
      l_time = p_ptime.
      CALL 'RstrDateConv'
        ID 'OPCODE' FIELD l_opcode
        ID 'TIMESTAMP' FIELD l_time
        ID 'ABAPSTAMP' FIELD l_abstamp.
      l_abaptstamp = l_abstamp.
      CONVERT TIME STAMP l_abaptstamp TIME ZONE sy-zonlo INTO DATE p_date
          TIME p_time.
    ENDFORM.                    " p_to_date_time_tz
    Regards,
    Clemens

  • How to perform power spectra analysis in DIAdem

    Dear all:
    I am a beginner in DIAdem but I have to complete my PhD thesis that is about the
    analysis of rat EEG in DIAdem. I have acquired 10G data of rat EEG. I prefer the
    power spectra method. Would someone please tell me:
    1. How to perform power spectra analysis of multichannel EEG(8 channels) in
    DIAdem? I hope the unit of the vertical axis is microV^2, but not dB ,nor
    10*log10(microV^2/Hz).
    2. How to calculate the absolute power and the relative power of EEG at a certain
    frequency band in DIAdem? Is it possible to do it in DIAdem?
    Thank you very much
    Jing
    [email protected]

    Hello,
    It looks like you posted this question on a different thread. Please refer to this thread Duplicate Post for information about your question.
    Regards,
    Kevin L.
    Applications Engineer
    National Instruments

Maybe you are looking for

  • How do I move Notes from one account to another?

    When I upgraded to Lion and ios5, all my Notes were on my Mac, iPhone and iPad, having been synched via USB and iTunes in the past. Some of these notes have been around for quite a while. Later, I edited a few notes and became aware that the chnages

  • Dynamic update of pdf files on web server with xml

    Hi forum Is it possible, to make a pdf form quiz, on a web site, there are updating it contents every day just bye replacing a xml file there have the text for the questions.? I just need some guindes or ide how to make this. ( i am new in xml/ dynam

  • E61 with Skype for Mobile (beta) can't call?

    hi, i just installed Skype for Mobile (Beta) onto my E61, am able to login. but once login, i cannot skype call at all, i select active contact and press "CALL" button, but there is no response. has anyone been successful using E61 with Skype? pls he

  • MM - BW Process Keys / Movement Type mapping

    Hi, Can anyone point me to a document, reference or an answer as to how I can map BW Process Keys for Purchasing and Inventory with SAP Movement Types? I'm trying to validate some Purchasing goods receipt data in BW which is filtered by process keys.

  • I want to use filesharing between 3 macs in my network.

    I have 3 Macs in my home network. The older iMac with mountain lion is available via Finder. With the newer iMac and MBP with Mavericks it's no possible to connect. Both worked perfect under Mountain Lion. Can this problem been caused by the firewall