Selecting one period from array (array data selection)

Hello. I have mass spectrometer which gives me two analog signals (can be seen on attached Data.png picture). The black one is RAMP, which represents nucleous mass number and the red one is intensity of the atom with correspond mass number (in VI I simulate it with signal generators). The data flow from spectrometer is continuous without any timing.
What I am trying to do is measure N samples from both analog channels and do a data proccesing with them:
1. Find and separate one measurement period
2. Convert the period points to amount of actually measured mass (eg I measure nucleous number from 1 to 20, so there will be array of 20 indexes in the end)- that I do in FOR loop
3. Take another measurement and combine with previous to do a statistical processing (not implemented in VI yet)
The biggest problem I seem to have is with correct separation of measurement period. I have tried use "min max" function, but there is not always global minimum and maximum at array indexes where I need to. Could you please help me with that separation? Thanks.
Solved!
Go to Solution.
Attachments:
Data.png ‏30 KB
LV2.vi ‏191 KB

Thank you for revision. The final while loop is preparation for another data processing (the measurement will be done more, than once and then I combine output array results for some statistics). "Period" is wrong word you are right , it is more likely some "measurement period" of my spectrometer.
There was one more bug- the number of subarrays. Instead of (+) there has to be (-). Now it gives more reliable Output result.
Do you think is it better to use MEAN, or MEDIAN function in for loop? I think in case of spectrometer, median will be more accurate. What is your opinion?
Attachments:
LV4.vi ‏78 KB

Similar Messages

  • Fetching more than one row from a table after selecting one value from the dropdown

    Hi Experts,
    How can we fetch more than one row from a table after selecting one value from the dropdown.
    The scenario is that I have some entries in the dropdown like below
      A               B               C        
    11256          VID          911256  
    11256          VID          811256
    11256          SONY      11256
    The 'B' values are there in the dropdown. I have removed the duplicate entries from the dropdown so now the dropdownlist has only two values.for eg- 'VID' and'SONY'. So now, after selecting 'VID' from the dropdown I should get all the 'C' values. After this the "C' values are to be passed to other methods to fetch some data from other tables.
    Request your help on this.
    Thanks,
    Preeetam Narkhede.

    Hi Preetam!
    I hope I understand your request proberly, since this is more about Java and less about WebDynpro, but if I'm wrong, just follow up on this.
    Supposed you have some collection of your original table data stored in variable "origin". Populate a Hashtable using the values from column "B" (let's assume it's Strings) as keys and an ArrayList of whatever "C" is (let's assume String instances, too) as value (there's a lot of ways to iterate over whatever your datasource is, and since we do not know what your datasource is, maybe you'll have to follow another approach to get b and c vaues,but the principle should remain the same):
    // Declare a private variable for your Data at the appropriate place in your code
    private Hashtable temp = new Hashtable<String, ArrayList<String>>();
    // Then, in the method you use to retrieve backend data and populate the dropdown,
    // populate the Hashtable, too
    Iterator<TableData> a = origin.iterator();
    while (a.hasNext()) {
         TableData current = a.next();
         String b = current.getB();
         String c = current.getC();
         ArrayList<String> values = this.temp.get(b);
         if (values == null) {
              values = new ArrayList<String>();
         values.add(c);
         this.temp.put(b, values);
    So after this, you'll have a Hashtable with the B values als keys and collections of C values of this particular B as value:
    VID --> (911256, 811256)
    SONY --> (11256)
    Use
    temp.keySet()
    to populate your dropdown.
    After the user selects an entry from the dropdown (let's say stored in variable selectedB), you will be able to retrieve the collection of c's from your Hashtable
    // In the metod you handle the selection event with, get the c value collection
    //and use it to select from your other table
    ArrayList<String> selectedCs = this.temp.get(selectedB);
    // now iterate over the selectedCs items and use each of these
    //to continue retrieving whatever data you need...
    for (String oneC : selectedCs) {
         // Select Data from backend using oneC in the where-Clause or whatever...
    Hope that helps
    Michael

  • Newbie question: Select one row from table in PL/SQL

    Hi,
    I want to select one row from the table Employee where Emplyoyee Number is say 200. This is a simple SQL query, but I don't know the equivalent PL/SQL format. I will have 3 out params here - Id itself, Name, Salary. I will then have to populate a java resultset object from these out params.
    Later, I'll have to use cursors to retrieve more than one row.
    Thanks for any help.

    Perhaps something like
    CREATE OR REPLACE PROCEDURE get_employee( l_id IN OUT employee.id%TYPE,
                                              l_name OUT employee.name%TYPE,
                                              l_salary OUT employee.salary%TYPE )
    AS
    BEGIN
      SELECT name, salary
        INTO l_name, l_salary
        FROM employee
       WHERE id = l_id;
    END;Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • SQL query - select one row from each date group

    Hi,
    I have data as follows.
    Visit_Date Visit_type Consultant
    05/09/2009 G name1
    05/09/2009 G name2
    05/09/2009 G name3
    06/09/2009 I name4
    07/09/2009 G name5
    07/09/2009 G name6
    How to select data as follows
    05/09/2009 G name1
    06/09/2009 G name4
    07/09/2009 G name5
    i.e one row from every visit_date
    Thanks,
    MK Nathan
    Edited by: k_murali on Oct 7, 2009 10:44 PM

    Are you after this (one row per date per visit_type)
    with dd as (select to_date('05/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name1' Consultant from dual
                union all
                select to_date('05/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name2' Consultant from dual
                union all
                select to_date('05/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name3' Consultant from dual
                union all
                select to_date('06/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name4' Consultant from dual
                union all
                select to_date('07/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name5' Consultant from dual
                union all
                select to_date('07/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name6' Consultant from dual
                union all
                select to_date('07/09/2009','MM/DD/YYYY') Visit_Date, 'F' Visit_type, 'name7' Consultant from dual)
    select trunc(visit_date) visit_date, visit_type, min(consultant)
    from   dd
    group by trunc(visit_date), visit_type
    order by trunc(visit_date);
    VISIT_DAT V MIN(C
    09/MAY/09 G name1
    09/JUN/09 G name4
    09/JUL/09 G name5
    09/JUL/09 F name7or are you after only one row per date?:
    with dd as (select to_date('05/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name1' Consultant from dual
                union all
                select to_date('05/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name2' Consultant from dual
                union all
                select to_date('05/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name3' Consultant from dual
                union all
                select to_date('06/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name4' Consultant from dual
                union all
                select to_date('07/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name5' Consultant from dual
                union all
                select to_date('07/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name6' Consultant from dual
                union all
                select to_date('07/09/2009','MM/DD/YYYY') Visit_Date, 'F' Visit_type, 'name7' Consultant from dual)
    select trunc(visit_date) visit_date, min(visit_type) visit_type, min(consultant)
    from   dd
    group by trunc(visit_date)
    order by trunc(visit_date);
    VISIT_DAT V MIN(C
    09/MAY/09 G name1
    09/JUN/09 G name4
    09/JUL/09 F name5

  • How to call one report2 from report1 using report1 selection screen

    hi experts,
    iam presently working in report1.
    now, from my report1, i want to call report2 with report1 selection screen.
    how to call?
    thanks in advance.

    Below is an sample example, from where i am calling transaction MB5B (Report-RM07MLBD).
    Here i am using selection screen data from report ZTEST and passing it to RM07MLBD.
    REPORT  ZTEST
    DATA : listtab LIKE abaplist OCCURS 1.
    DATA : listtab_tmp LIKE abaplist OCCURS 1.
    DATA : N TYPE n.
    *DATA mseg_wa TYPE mseg.
    *SELECT-OPTIONS s_matnr for mseg_wa-matnr.
    *SELECT-OPTIONS S_WERKS for Mseg_wa-WERKS.
    PARAMETERS : S_MATNR LIKE MSEG-MATNR,
                 S_WERKS LIKE MSEG-WERKS,
                 S_CHARG LIKE MSEG-CHARG.
    DATA MKPF_WA TYPE MKPF.
    SELECT-OPTIONS S_BUDAT FOR MKPF_WA-BUDAT.
    REFRESH listtab.
    CALL FUNCTION 'LIST_FREE_MEMORY'
    TABLES
    listobject = listtab.
    SUBMIT RM07DOCS using SELECTION-SCREEN '1000'
    WITH matnr = S_MATNR
    WITH werks = S_WERKS
    WITH charg = S_CHARG
    WITH budat-low = S_BUDAT-low
    WITH budat-high = S_BUDAT-high EXPORTING LIST TO MEMORY AND RETURN .
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = listtab
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    IF sy-subrc = 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    DESCRIBE TABLE listtab LINES n .
    CALL FUNCTION 'WRITE_LIST'
    EXPORTING
    write_only = 'X'
    TABLES
    listobject = listtab
    EXCEPTIONS
    empty_list = 1
    OTHERS = 2.
    IF sy-subrc = 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Select customer name from a drop down Select List or be able to type it in

    Hi,
    Is there a way to allow my users to have an option to either select a customer name from a drop down Select List or be able to type it in...
    Thanks in advance

    This is an excellent option for another application but in this one I would prefer a drop down list to allow my users to see all the orders (to pick from the list) or type it in if they can't find it in the list...
    I know how to create a drop down select list but not sure what to do to allow users to be able to manually type in as well...
    Thanks

  • LVAssets to be depreciate fully in one period from capitalization on wards.

    Hi Gurus,
    Have a requirements regarding the Low-Value assets; which has to be depreciate fully (100%) in 1 period from the capitalization onwards, mean time it has to validate the LVAssets specified amount as 10k, should not cross the amount.
    Could help on this how to be config the required setup on the above.
    Thanks in advance, full points are avail..
    Vyas

    An asset to be considered as a LVA, we need to mention a maximum permissible amount in the depreciation areas for the low value asset class. Please follow the path:
    IMG-FA-AA-Valuation-Amount Specs-Specify max. amt for lva+asset classes
    You get two options:
    In the specify lv asset class: please check the indicator 1 to the depreciation areas.
    In the specify amt for lvasset:  mention the max permissible amount for each lv asset.
    Guess this clarifies.
    P K

  • Selecting one letter from a word Array (to start off a word game)

    Hi,
    I have been building a simple word game. It is smple but works fine. I am now trying to enhance some of the features.
    I would like to see if I can display one letter of each word so the Player has a hint. Think of this as a beginners level.
    The words are random from a text list. Either I can make the letters invisible and the game starts without a hint or I am able to select a letter using charAt() or creating a new variable substring()from the word which is the displayed repeatedly on the stage(not what I want)
    I have not been able to find a way to display one letter and display it in the correct order within the word and keep the remaining letters invisible.
    I am including the code below.
    I have another question regarding looping arrays but I'll wait until I figure this out.
    I hope it is not too long and I am being clear in my goals.
    Thanks
    import flash.net.URLLoader;
    import flash.events.Event;
    import flash.display.MovieClip;
    import flash.text.TextField;
    import flash.text.TextFormat;
    import flash.events.MouseEvent;
    var loader:URLLoader;
    var allWords:Array;
    var thisWord:String;
    var textContainer:MovieClip;
    var textFields:Array;
    var textStyle:TextFormat;
    var underline:MovieClip;
    var numCorrect:uint;
    var totalLetters:uint;
    //variables for creating games scoring limits
    var misses:uint;
    var missesToLose:uint;
    //buttons for new text versions
    artists_mc.addEventListener(MouseEvent.CLICK, getArt);
    regular_mc.addEventListener(MouseEvent.CLICK, regWords);
    function intializeGame():void
        loader = new URLLoader();
        allWords = new Array();
        textContainer = new MovieClip();
        textFields = new Array();
        textStyle = new TextFormat();
        guesses_txt.text = "";
        numCorrect = 0;
        misses = 0;
        missesToLose = 5;
        misses_txt.text = "0";
        missesToLose_txt.text = "/" + missesToLose;
        textStyle.font = "Andale Mono";
        textStyle.size = 48;
        textStyle.bold = true;
        textStyle.color = 0x5FC9D7;
        textContainer.y = 125;
        addChild(textContainer);
        /*loader.load(new URLRequest("word_Game.txt"));
        loader.addEventListener(Event.COMPLETE, reg_textLoaded);*/
        guess_btn.addEventListener(MouseEvent.CLICK, guess);
    //new loader events for different textGames
    function regWords(event:MouseEvent):void
        loader.load(new URLRequest("word_Game.txt"));
        loader.addEventListener(Event.COMPLETE, reg_textLoaded);
        loader.removeEventListener(Event.COMPLETE, art_textLoaded);
        removeChild(textContainer);
        intializeGame();
    function getArt(event:MouseEvent):void
        loader.load(new URLRequest("artists.txt"));
        loader.removeEventListener(Event.COMPLETE, reg_textLoaded);
        loader.addEventListener(Event.COMPLETE, art_textLoaded);
        removeChild(textContainer);
        intializeGame();
    //self-explanatory
    function endGame(endMessage:String):void
        var winLose:MovieClip = new WinLose();
        winLose.x = stage.stageWidth / 2 - 60;
        winLose.y = stage.stageHeight / 2 - 70;
        addChild(winLose);
        winLose.end_txt.text = endMessage;
        winLose.addEventListener(MouseEvent.CLICK, startOver);
    function startOver(event:MouseEvent):void
        event.currentTarget.parent.removeChild(event.currentTarget);
        removeChild(textContainer);
        intializeGame();
    function reg_textLoaded(event:Event):void
        var tempText:TextField;
        var stringOfWords:String = event.target.data;
        allWords = stringOfWords.split(",");
        thisWord = allWords[Math.floor(Math.random() * allWords.length)];
        totalLetters = thisWord.length;
        for (var i:uint; i < thisWord.length; i++)
            tempText = new TextField();
            tempText.defaultTextFormat = textStyle;
            tempText.name = ("textField" + i);
            tempText.text = "";
            tempText.selectable = false;
            tempText.width = 48;
            tempText.x = i * tempText.width;
            textContainer.addChild(tempText);
            textFields.push(tempText);
            if (thisWord.charAt(i) != "")
                underline = new Underline();
                underline.x = tempText.x + tempText.width / 3;
                underline.y = tempText.y + tempText.height / 1.8 + 5;
                textContainer.addChild(underline);
        textContainer.x = stage.stageWidth / 2 - textContainer.width / 2;
    function art_textLoaded(event:Event):void
        var tempText:TextField;
        var stringOfWords:String = event.target.data;
        allWords = stringOfWords.split(",");
        thisWord = allWords[Math.floor(Math.random() * allWords.length)];
        totalLetters = thisWord.length;
        //var firstChar:String = thisWord.substring(0, 1);
        for (var i:uint; i < thisWord.length; i++)
            tempText = new TextField();
            tempText.defaultTextFormat = textStyle;
            tempText.name = ("textField" + i);
            tempText.text = "";
            tempText.selectable = false;
            tempText.width = 48;
            tempText.x = i * tempText.width;
            textContainer.addChild(tempText);
            textFields.push(tempText);
            if (thisWord.charAt(i) != "")
                underline = new Underline();
                underline.x = tempText.x + tempText.width / 3;
                underline.y = tempText.y + tempText.height / 1.8 + 5;
                textContainer.addChild(underline);
        textContainer.x = stage.stageWidth / 2 - textContainer.width / 2;
    function guess(event:MouseEvent):void
        if (guess_txt.text != "")
            if (thisWord.indexOf(guess_txt.text) != -1)
                for (var i:uint = 0; i < textFields.length; i++)
                    if (thisWord.charAt(i) == guess_txt.text)
                        textFields[i].text = thisWord.charAt(i);
                        numCorrect++;
                        if (numCorrect >= totalLetters)
                            endGame("You Win");
            else if (guesses_txt.text == "")
                guesses_txt.appendText(guess_txt.text);
                misses++;
            else
                guesses_txt.appendText("," + guess_txt.text);
                misses++;
            misses_txt.text = String(misses);
            if (misses >= missesToLose)
                endGame("You Lose");
        guess_txt.text = "";
    intializeGame();

    Hi,
    After many hours of reading and trying out different strategies, I began to think that I was trying to do to much in one section.
    I created a new TextField (oneLtr) used the addChild(oneLtr) and using the charAt() method was able to isolate a uniquely different letter as a hint for each new word.
    I am now trying to work out the code so the x position moves dynamicaly with each new word.
    My hope was to have a leter sitting in the exact position but right now I'm learning a lot about text and arrays so that's ok.
    Any suggestions and help is always great
    function art_textLoaded(event:Event):void
        var tempText:TextField;
        var stringOfWords:String = event.target.data;
        allWords = stringOfWords.split(",");
        thisWord = allWords[Math.floor(Math.random() * allWords.length)];
        totalLetters = thisWord.length;
        //var firstChar:String = thisWord.substring(0, 1);
        oneLtr.text = thisWord.charAt(2);
        for (var i:uint; i < thisWord.length; i++)
            tempText = new TextField();
            tempText.defaultTextFormat = textStyle;
            tempText.name = ("textField" + i);
            tempText.text = "";
            tempText.selectable = false;
            tempText.width = 48;
            tempText.x = i * tempText.width;
            textContainer.addChild(tempText);
            textFields.push(tempText);
            if (thisWord.charAt(i) != "")
                underline = new Underline();
                underline.x = tempText.x + tempText.width / 3;
                underline.y = tempText.y + tempText.height / 1.8 + 5;
                textContainer.addChild(underline);
            addChild(oneLtr);
        textContainer.x = stage.stageWidth / 2 - textContainer.width / 2;
        oneLtr.x = tempText.x - tempText.width / 3;

  • Selecting random values from an array based on a condition

    Hi All,
    I have a small glitch here. hope you guys can help me out.
    I have an evenly spaced integer array as X[ ] = {1,2,3, ....150}. and I need to create a new array which selects 5 random values from X [ ] , but with a condition that these random values should have a difference of atleast 25 between them.
    for example res [ ] = {2,60,37,110,130}
    res [ ] = {10,40,109,132,75}
    I have been thinking of looping thru the X [ ], and selecting randomly but things look tricky once I sit down to write an algorithm to do it.
    Can anyone think of an approach to do this, any help will be greatly appreciated ...

    For your interest, here is my attempt.
    import java.util.Random;
    public class TestDemo {
        public static void main(String[] args) throws Exception {
            for (int n = 0; n < 10; n++) {
                System.out.println(toString(getValues(5, 25, 150)));
        private final static Random RAND = new Random();
        public static int[] getValues(int num, int spread, int max) {
            if (num * spread >= max) {
                throw new IllegalArgumentException("Cannot produce " + num + " spread " + spread + " less than or equals to " + max);
            int[] nums = new int[num];
            int max2 = max - (num - 1) * spread - 1;
            // generate random offsets totally less than max2
            for (int j = 0; j < num; j++) {
                int next = RAND.nextInt(max2);
                // favour smaller numbers.
                if (max2 > spread/2)
                    next = RAND.nextInt(next+1);
                nums[j] = next;
                max2 -= next;
            // shuffle the offsets.
            for (int j = num; j > 1; j--) {
                swap(nums, j - 1, RAND.nextInt(j));
            // add the spread of 25 each.
            for (int j = 1; j < num; j++) {
                nums[j] += nums[j-1] + spread;
            return nums;
        private static void swap(int[] arr, int i, int j) {
            int tmp = arr;
    arr[i] = arr[j];
    arr[j] = tmp;
    public static String toString(int[] nums) {
    StringBuffer sb = new StringBuffer(nums.length * 4);
    sb.append("[ ");
    for (int j = 0; j < nums.length; j++) {
    if (j > 0) {
    sb.append(", ");
    sb.append(nums[j]);
    sb.append(" ]");
    return sb.toString();

  • FDM Integration script - Selecting the Period from SQL based on FDM PoV

    Hi,
    I want query SQL Period Column for the month based on the FDM PoV, can or has anyone a sample script of how this is can be achieved?
    My script when run comes back with "No records to load" - msg in my script. Let me know if you can spot anything obvious that's causing this in my script.
    SQL table
    EVENT    YEAR     Period      Entity       Ccy         Acc          ICP         Value     Product
    Actual
    FY14
    May
    HME_AT
    EUR
    ws_inp
    NULL
    39
    HRX537C2VKEA
    Actual
    FY14
    May
    HME_AT
    EUR
    ws_inp
    NULL
    3
    HS2411Z1E
    Dim objSS   'ADODB.Connection
    Dim strSQL    'SQL string
    Dim strSelectPer 'FDM Period
    Dim strCurFDMYear'FDM Year
    Dim rs        'SQL Recordset
    Dim rsAppend   'FDM tTB table append rs object
    Dim recordCount
    Dim sWhere
    Dim sSelect
    'Initialize objects
    Set cnSS = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.Recordset")
    Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
    'Get Current POV Period And Year And determine HFM Select Year
    strSelectPer = Left((RES.PstrPer), 3)
    strCurFDMYear = Right(RES.PstrPer, 4)
    Select Case UCase(strSelectPer)
    Case "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"
      strSelectYear = strCurFDMYear + 1
    Case "JAN", "FEB", "MAR"
         strSelectYear = strCurFDMYear
    End Select
    'Watch with this as it can cause looping
    On Error Resume Next
    Err.clear
    'Connect to SQL database
    'cnSS.Open "Driver=SQL Server;Server=EHEINTRADCG\EHEINTRADCG;Database=dw_foundation;UID=hypdb"
    cnSS.Open "Driver=SQL Server;Server=EHEINTRADCG\EHEINTRADCG;Database=ODI_WORK_MARS;UID=hypdb"
    'Connect to SQL Server database
    cnSS.CommandTimeout = 1200
    'Keep the error message handling in for testing but will probably need  to write
    'to a log if running in an overnight batch
    'Error Handling
    If  Err.Number <> 0  Then  
    '  An exception occurred
    RES.PlngActionType = 2
    RES.PstrActionValue =  Err.Description & Chr(10) & "Unable to connect to SQL Data Source"
    Err.clear
    Set cnSS = Nothing
    FinAllLocs_Conv = False
    Exit Function
    End If
    'Create query String
    strSQL = strSQL & "From ODI_WORK_MARS.dbo.TMP_HFM_DATA_EXTRACT_TIN1 "
    strSQL = sWhere & " And YearID =  '" & strSelectYear & "'  And PeriodID = '" & strSelectPer & "'"
    'Get data
    rs.Open strSQL, cnSS
    '    Check For data
    If rs.bof And rs.eof Then
      RES.PlngActionType = 2
             RES.PstrActionValue = "No Records to load!"
      Exit Function
    End If
    '   RecordCount = 0
        'Loop through records and append to FDM tTB table in location's DB
    If Not rs.bof And Not rs.eof Then
      Do While Not rs.eof
    'Create the record 
      rsAppend.AddNew
       rsAppend.Fields("PartitionKey") = RES.PlngLocKey         ' Location ID
       rsAppend.Fields("CatKey") = RES.PlngCatKey          'Current Category ID
       rsAppend.Fields("PeriodKey") = RES.PdtePerKey         'Current Period ID
          rsAppend.Fields("DataView") = "YTD"            'Data View ID
       rsAppend.Fields("CalcAcctType") = 9            'Input data indicator
       rsAppend.Fields("Entity") = rs.fields("Entity").Value        ' Entity/Genpo ID
       rsAppend.Fields("Account")= rs.fields("Account").Value        'Account ID
          rsAppend.Fields("ICP") = rs.fields("Inter_Company_Entity_HFM").Value   ' Inter-Co/Destination
       rsAppend.Fields("Amount") = rs.fields("Value").Value        ' Data Value ID
      rsAppend.Update
      RecordCount = Recordcount + 1
      rs.movenext
      Loop
    End If
    'Records loaded
    RES.PlngActionType = 2
        RES.PstrActionValue = "SQL Import successful!   "  & RecordCount
    'Assign Return value
    SAP_HFM = True
    End Function

    Hi,
    the easiest way to check it is to redirect your SQL query to text file and then execute in a SQL tool.
    You should write the value of strSQL (which actually seems to have missing the SELECT clause)
    In any case, your SQL statement seems to be incomplete:
    strSQL = strSQL & "From ODI_WORK_MARS.dbo.TMP_HFM_DATA_EXTRACT_TIN1 "
    strSQL = sWhere & " And YearID =  '" & strSelectYear & "'  And PeriodID = '" & strSelectPer & "'"
    - You have not initialized strSQL with SELECT clause (maybe sSelect?)
    - You have not initialized sWhere with WHERE clause
    In addition to this, your source year is in FYYY format while you are taking year from POV as YYYY.
    (...And YearID = 2014 while in your table you have FY14)
    After you check this, get the SQL statement, review it, and try to launch against your source DB in a SQL tool.
    Regards

  • I am not able select one item from dropdown

    Dropdown is not working firefox,but its working fine in chrome and ie.]
    Please help me i strucked here from two days.
    Thanks in advance...
    Version: 30.0
    User Agent: Mozilla/5.0 (Windows NT 6.1; rv:30.0) Gecko/20100101 Firefox/30.0
    Crash Reports for the Last 3 Days
    All Crash Reports
    Extensions
    Name: Symantec Vulnerability Protection
    Version: 12.3.0.3 - 1
    Enabled: false
    ID: {BBDA0591-3099-440a-AA10-41764D9DB4DB}
    Important Modified Preferences
    browser.cache.disk.capacity: 358400
    browser.cache.disk.smart_size_cached_value: 358400
    browser.cache.disk.smart_size.first_run: false
    browser.cache.disk.smart_size.use_old_max: false
    browser.places.smartBookmarksVersion: 7
    browser.sessionstore.upgradeBackup.latestBuildID: 20140605174243
    browser.startup.homepage_override.buildID: 20140605174243
    browser.startup.homepage_override.mstone: 30.0
    dom.ipc.plugins.java.enabled: true
    dom.mozApps.used: true
    extensions.lastAppVersion: 30.0
    gfx.direct2d.disabled: true
    gfx.direct3d.last_used_feature_level_idx: 1
    layers.acceleration.disabled: true
    network.cookie.prefsMigrated: true
    places.database.lastMaintenance: 1406027996
    places.history.expiration.transient_current_max_pages: 85473
    plugin.disable_full_page_plugin_for_types: application/pdf
    plugin.importedState: true
    privacy.sanitize.migrateFx3Prefs: true
    storage.vacuum.last.index: 0
    storage.vacuum.last.places.sqlite: 1406027996
    webgl.disabled: true
    Graphics
    Adapter Description: Intel(R) G41 Express Chipset
    Adapter Drivers: igdumdx32 igd10umd32
    Adapter RAM: Unknown
    Device ID: 0x2e32
    DirectWrite Enabled: false (6.1.7601.18245)
    Driver Date: 6-3-2011
    Driver Version: 8.15.10.2413
    GPU #2 Active: false
    GPU Accelerated Windows: 0/1 Basic
    Vendor ID: 0x8086
    windowLayerManagerRemote: false
    AzureCanvasBackend: skia
    AzureContentBackend: cairo
    AzureFallbackCanvasBackend: cairo
    AzureSkiaAccelerated: 0
    JavaScript
    Incremental GC: true
    Accessibility
    Activated: false
    Prevent Accessibility: 0
    Library Versions
    NSPR
    Expected minimum version: 4.10.6
    Version in use: 4.10.6
    NSS
    Expected minimum version: 3.16 Basic ECC
    Version in use: 3.16 Basic ECC
    NSSSMIME
    Expected minimum version: 3.16 Basic ECC
    Version in use: 3.16 Basic ECC
    NSSSSL
    Expected minimum version: 3.16 Basic ECC
    Version in use: 3.16 Basic ECC
    NSSUTIL
    Expected minimum version: 3.16
    Version in use: 3.16

    Hi Bramhaiah,
    Thank you for your post. I understand that the dropdown menu is not working. Please try the following:
    * I would highly recommend backing up your profile before attempting this. Navigate in the url bar to this page [about:support] and select Reset Firefox
    * If the issue continues, please make sure that Java is up to date [http://java.com/en/download/help/mac_java_update.xml]
    Other issues may be cause by a corrupt profile or install. I would highly recommend backing up your profile and adding this to a fresh install.
    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    More information about reinstalling Firefox can be found [[Troubleshoot and diagnose Firefox problems#w_5-reinstall-firefox|here]].
    <b>WARNING:</b> Do not run Firefox's uninstaller or use a third party remover as part of this process, because that could permanently delete your Firefox data, including but not limited to, extensions, cache, cookies, bookmarks, personal settings and saved passwords. <u>These cannot be easily recovered unless they have been backed up to an external device!</u>
    Please report back to say if this helped you!
    Thank you.

  • Populate data into standard component alv from Zcomponent popup data selected

    HI All
    I have to call Zcomponent in standard component and need to pass value into Zcomponent (table) and from  Zcomponent select row and pass back to standard component.
    Steps
    1) Created Zcomponent with interface node
    2) Enhanced the standard component and create used components for  Zcomponent and make it available at component controllers and view controllers.
    When I click on Button in standard component I am calling this Zcomponent as popup window.
    My problem I when I select data in Zcomponent I need to populate the data in ALV of standard component.
    I thought of 2 methods to take my selected back and populate data into standard component ALV.
    1) Create event: EVENT1 and   Interface method Method1 and link to EVENT1
    So that I can raise this event in Zcomponent and populate the data into standard component ALV
    Problem: Under events interface checkbox is visible, when I select my enhancement implementation the interface checkbox not visible under events tab?.
    2) Create Interface method Method1 write logic to populate data into standard component ALV
    But here to when I select my enhancement implementation the interface checkbox not visible under?
    Can anyone please help me why interface checkbox is not visible or any better solution to populate the data back to standard component alv?
    Thanks
    Gopal

    Hi Gopal,
    You can achieve your requirement by using EVENTS as below
    Create an event SET_DATA in component controller of zcomponent and mark it as interface and also include the parameters like context_element( type ref to if_wd_context_element), etc as below
    Now, create an action for the event onLeadSelect of your zcomp Table and write the below code
                     DATA lo_ctx_element TYPE REF TO if_wd_context_element.
                   "get the selected row
                     lo_ctx_element = wdevent->get_context_element( name =
                        'NEW_ROW_ELEMENT' ).
                   "Raise the event with parameter
                   wd_comp_controller->fire_set_data_evt( context_element = lo_ctx_element ).
    Use the Zcomponent in your standard component and make available in std. view's properties
    Create an event handler SET_DATA method for your Zcomp's event as below
    Now, inside this method, you get the parameter CONTEXT_ELEMENT and get the data from this context element as below
                   context_element->get_attrribute( ) or
                   context_element->get_static_attributes( )
    You can populate the data into standard component based on the obtained value from Zcomponent.
    Hope this helps you.
    Regards,
    Rama

  • How do I select one version from multiple stacks and export?

    I have a color copy and B&W copy of 800 images. I want to export the B&W versions only. How do I select just the B&W versions in the stack at one time without having to click on 800 images?

    If you check the filenames, you'll see that the versions have a version name tagged on the end, like "Version 2" when I did a quick monochrome mix of one of my own. Make a smart album with the search term set for text being "Version 2" and you should end up with all the b&w versions. That is, assuming you made them all in the same way and they're all Version 2 versions. Since the initial version would not have the term "Version" attached, you could make the search term "Version" and it would fill with all the 2nd and 3rd et al. versions.
    Just a thought. Give it a try.
    Mark

  • How to select one row from the datatable

    hi,
    I have a data table which displays the employee list .the table contains 4 columns which represents the employee code,address,status like that.
    when we click on particular row,the row must be selected and the total details of the employee will be displayed on the same page below the datatable.
    how to write the code for this.

    Hi
    Jsp Page
    <h:dataTable value="#{bean.list}" var="role" binding="#{bean.table}">
    binding- attribute need to include in dataTable tag
    Bean
    1> private UIData _table; as variable
    2>Getter and setter Methods
    public void setTable(UIData table) {
    _table = table;
    public UIData getTable() {
    return _table;
    3> Object objectName=(Object)_table.getRowData();; -- include the code in the method u wanna fetch the row data.
    It'll work

  • Help! about insert into one table from two tables'data?

    hi,all friends!
    i have a question:
    i have two table as like this:
    table_one(id,ipaddr,col1,col2) primary key(id,ipaddr)
    table_two(id,ipaddr,col1,col3,col4) primary key(id,ipaddr)
    about table_one and table_two,it's columns may change execept id and ipaddr,
    how can i insert the data of table_one and table_two into table_three,the columns of table_three may change with the columns of table_one and table_two
    table_three may dynamic create,but it's primary key is (id,ipaddr)
    thanks!
    pls help!
    any suggestion welcome!

    insert into table_3
    (id, ipaddr, col1, col2, col3, col4)
    select t1.id, t1.ipaddr, t1.col1, t1.col2, t2.col3, t2.col4
    from table_1 t1, table_2 t2
    where t2.id = t1.id
    and t2.ipaddr = t1.ipaddr;

Maybe you are looking for

  • Automatic PO at the time of GRN

    Dear expert, Anybody please tell me where the no range of  automatically generated PO is maintained.I am generating automatic PO in Transaction code MB01 in mvt type 101. Regards, ABHI

  • Handling events in a while loop

    In a while loop, I need to stop the loop after a change of state from false to true or true to false or I can do this by detecting a certain string from the serial port. Seems like I should be able to do this simply by using a counter which is edge t

  • Changing service options after installtio​n

    Fios was just made availble in my street. I found out because a door salesman came by and informed me. His price was lower than what I would get if I signed up online so I ordered with him. I did not know that I had two choices for phone server, Free

  • Fails then starts from scratch!

    Hi, I had TM on my new Mac mini set up to do backups to my HFS+ (non journalled) 500GB external hard drive (internal put into a USB case) and I have another FireWire 'My Book' 750Gb with all of my media, installers etc which is included in the backup

  • IOS 7 caused error code 21

    During IOS 7 Update my phone went to recovery mode and then, would not restore, and update it gives me constantly error code 21, and also ive tried most fixes for it. New battery, Got all connections checked, even put the device into dfu mode.. Is th