AJAX: Junk value coming at end of records

Hi,
I am using ajax to populate the values in Combo box. I have an issue there.
When i select one value in first combo, it displays junk characters at end of records.
e.g. If on selction of A i should get 1, 2 and 3 in second drop down. I am getting 1, 2, 3, ^%^%.
Please let me know what can be issue.
~Aman

This is the JS call.
               function fnGetBonusData2()
               for(i=document.getElementById("bonusData2").options.length-1;i>=0;i--)
                         document.getElementById("bonusData2").remove(i);
                    var bonusData1 = document.getElementById("bonusData1").value;
                    var strURL = "../getBonusData2.do"
                    strURL = strURL+"?methodName="+"getBonusData2";
                    strURL = strURL+"&controlName="+"bonusData2";
                    strURL = strURL+"&bonusData1="+bonusData1 ;
                    fnRetrieveURL(strURL,"fnOnReturnFromBonus2");
               }Action Method code
          try {
               if (isValidSession(request)) {
               String strBonusData1 = request.getParameter("bonusData1");
               BonusDataManager bonusDataManager = new BonusDataManager();
               String strAreaForRegion = bonusDataManager.getBonusData2(strBonusData1) ;
               System.out.println("bonus data 2"+strAreaForRegion);
               response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              out.println(strAreaForRegion);
              out.flush();
               } else {
                    return null;
          } catch (Exception ex) {Manager method call
    public String getBonusData2(String strBonusData1)
          String value="";
          PersistencyManager persistencyMgr = new PersistencyManager();
          try {
               persistencyMgr.beginTransaction();
               if(!strBonusData1.equalsIgnoreCase(""))
                    StringBuffer userQueryBuffer = new StringBuffer();
                    userQueryBuffer.append("SELECT distinct bonusMaster.bonusData2 ");
                    userQueryBuffer.append("from BonusMaster bonusMaster where bonusMaster.bonusData1 ='");
                    userQueryBuffer.append(strBonusData1);
                    userQueryBuffer.append("'");
                    Collection collection = persistencyMgr.find(userQueryBuffer.toString());               
                    int counter = 0;
                    if(collection != null || collection.size() != 0)
                    for (Iterator it = collection.iterator(); it.hasNext();) {
                              Object obj = (Object) it.next();
                              String bonusMasterData2 = (String) obj;
                              if(null != bonusMasterData2){
                                   if(counter != 0)
                                        value += ",";
                                   value +=bonusMasterData2;
                                   counter ++;
          }Return JS method call
               function fnOnReturnFromBonus2()
                    if (varXMLrequest.readyState == 4)
                         if(varXMLrequest.status == 200)
                              var strSubClassValue = varXMLrequest.responseText;
//                              alert(strSubClassValue.length);
                              if(strSubClassValue != '')
                                var strArray = strSubClassValue.split(",");
//                                   alert(strArray);
                                   var iLength = strArray.length;
//                                   alert(iLength);
                                   var optnSelect = document.createElement("OPTION");
                                   optnSelect.text = 'Select';
                                   optnSelect.value = '';
                                   document.getElementById("bonusData2").options.add(optnSelect);
                                   for(i =0 ; i< iLength;i++)
                                        var optn = document.createElement("OPTION");
                                        optn.text = strArray;
                                        optn.value = strArray[i];
//                                        alert(optn.value);
                                        document.getElementById("bonusData2").options.add(optn);

Similar Messages

  • Timeline usage : To display value at the end of timeline values

    Hi Team,
    In my current project, I want to implement functionality given below. All records are present in one single table.
    Table has columns as (City,Date,Positive,Negative,CountOfItems)
    I have created data model as given below.
    I need to design Power View Report for which Date will act as "Timeline", so when I select DAte as "2010-10-01" to "2010-11-01" then It should show me report having data on "2010-11-01 because it is latest data I am having.
    Final report should look like as below.
    But as I have used "Sum" function, it shows me wrong result.
    My actual meaning is that, on every date of selected window in timeline, value at the last day of selected window should be displayed at report.
    Can anyone help me to do db design and report formulation.

    It looks like this was answered in your other thread...
    Display value at the end of timeline range selection: http://social.msdn.microsoft.com/Forums/en-US/sqlkjpowerpivotforexcel/thread/20ce91d4-9cc1-4680-be71-6172c64e4da7/#20ce91d4-9cc1-4680-be71-6172c64e4da7
    In the future, please try to avoid creating multiple threads for the same problem :)
    Regards,
    Michael
    Please remember to mark a post that answers your question as an answer...If a post doesn't answer your question but you've found it helpful, please remember to vote it as helpful :)

  • How to fetch Junk values and its columns dynamically

    Hello,
    Can anyone help me in writing a procedure/dynamic SQL to fetch the column where the junk values appears and its value. Eg: If emp table contains ID and Name columns, and ID column contains junk values, the result should be the Id column and the junk value/s. It should be dynamic because next time if the other column contains junk values(like $,%...), the query should display the other column too..
    Thanks in advance..

    Can anyone help me in writing a procedure/dynamic SQL to fetch the column where the junk values appears and its value. Eg: If emp table contains ID and Name columns, and ID column contains junk values, the result should be the Id column and the junk value/s. It should be dynamic because next time if the other column contains junk values(like $,%...), the query should display the other column too..1. define "junk" values.
    2. usually it does not matter what values are in ID, because it is used internally by application, to maintain uniqueness or relations, not having any semantical meaning. End users usually should not see IDs, such IDs are generated automatically. There is no need to cleanse them from "junk" values.
    3. If you made a typo, and you are looking for "junk" values in Name column, it is a different story. You can use TRANSLATE to search such values, as already advised, translating all "junk" characters to one "junk" character and searching for the latter.
    select id, name from T where translate(name,'?@#$%^<>','~~~~~~~~~') like '%~%';
    Edited by: Mark Malakanov (user11181920) on Jan 4, 2013 11:40 AM

  • Takeover values coming with grey mode

    Hi!!!
    Please help me somebody....
    I hve a problem... I create asset on AS91 but when i put a Asset capitalization date in XX.XX.2009 the Takeover values coming with grey mode but if i put Asset capitalization date in XX.XX.2008 I can fill the takeover values without problems.
    I already execute the AJAB and AJRW I now, mi fiscal year is 2009.
    Please Help me....
    Regards,

    I am not sure why you are using AS91 for current year data transfer.
    AS91 is for legacy date transfer...that is for assets capitalized in the prior years and loaded in the system this year.
    If the assets have a capitalization date in the current year then you can create the master record using AS01 and then post using AB01.. right
    Another thing to note is when you have the current year capitalization date, why will you have cumulative acquisition value and  accumulate deepreciaiton
    You will have to use the transactions  to fill in the current year transactions tab instead of the takeover values.
    Take a look here for more clarification
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/4f/71e327448011d189f00000e81ddfac/content.htm

  • Junk values in an internal table field

    Hi,
    I have an internal table with a field matnr and matxt.
    Now both the fields have a junk value '#'.
    matnr has '#' at the end and matxt has '#' in between the description.
    How do I get rid of them.
    Michael

    if in description "#' occurs many times.
    then split the description into one internal table
    like
    data: begin of it occurs 0,
           fld(50),
          end of it.
    data : text(100).
    data : ch(50).
    ch = 'teygvwsjsf#wewew#wqdhfd#jdhgfd'.
    split ch at '#' into table it.
    loop at it.
    concatenate it-ch into text sperated by space.
    endloop.
    u will get the string in variable text after the loop.
    guru

  • How to bring the RFC table values to front end

    All
    I want to display a table in front end
    For that I connect to the RFC .Get into the table .
    Here pl tell me how to get the values from the table
    I did the following
    JCO.Function func = getDefaultJCoConnection().getJCoFunction("Z_TestRFC");
    getDefaultJCoConnection().execute(func);
    JCO.Table records=func.getTableParameterList().getTable("ET_TestTable");
    ArrayList list=new ArrayList();
    for (int i = 0; i < records.getNumRows(); i++, records.nextRow()) {
    list.add(records.getString("Name"));            
    return list;
    But the table contains 4 columns Name,Address,age,remarks
    In the above code I'm able to take just one column which is "Name" which works fine
    I want to take all the values to front end
    Please suggest
    Murali

    sateesh
    If I iterate all other fields where do I store them to take it to my jsp
    If u see I added that column value in one ArrayList
    So you want me to create 4 ArrayList and add populate them inside that for loop.
    could you please elaborate on the same.or could you please improve that code and post
    Thanks in advance
    Murali

  • Junk values in Excel for ALV output

    Hello
    I have developed a FM based (not OOPS) ALV and its giving output/report, fine.
    But, when user want to get it into excel, then,
    1) If user selects the CntrlShiftF7 - Microsoft Excle icon - I am getting just blank excel opened on my SAP GUI, i did not see any data on the excel, its just blank excel
    2) If user selects the Local file - CntrlShiftF9 - and then selects the Spreadsheet radio button (selected the encoding as 000000): Then, user getting some junk (########) values in the saved excel, like for Invoice number, Date fields/columns.
    We are on ECC 6.0 with windows 7
    Thank you

    Hi,
    I tried the same code page which is used in the example... but no luck.
    Regards,
    Vinay

  • How to add spaces at the end of record

    Hi Friends,
    i am creating a file which contains more than 100 records.
    In ABAP i have internal table with on field(135) type c.
    some time record have length 120, somtime 130 its vary on each record.
    but i would like to add space at the end of each record till 135 length.
    Can you please help me how to add speace at the end of record.
    regards
    Malik

    So why did you said that in your first posting? My glass sphere is out for cleaning...
    Instead of type c use strings and add spaces until they have the appropriate length.
    loop at outtab assigning <pout>.
      while strlen( <pout>-val ) < 135.
        concatenate <pout>-val `` into <pout>-val.
      endwhile.
    endloop.

  • Need to place a variable value at the end of report heading in BI 7

    Dear All,
    We have to place a variable value at the end of the report heading and the value should get refreshed whenever we change the variable by using "Change Variable Value". I have created a macro and the value will get triggered unless and until we click on any where on a sheet. But, we want to automate this one by using a macro.
    Ex: Quarterly TA Host Country Details As Of "Variable Date" Variable is created on TA Date characteristic. User can enter date on Pop up window box at the time of changing a variable TA Date. We need changed date at the end of the Report heading Qua----
    Please suggest me on how to place variable value at the end of report heading by using a macro.

    No need to use Macro. You can use text variable.
    Goto the Query Description and click on the Text variable icon.
    Create a text variable of processing type as REPLACEMENT PATH and replace it with the characteristic for which you have a ready for input variable that will be eneter by the user.
    This will populate the text variable with the value entered by teh user.
    Use this text variabkle along with the Query Description. So your description will look something like REPORT_TITLE&TXT_VAR&
    Hope this helps.

  • Can a subreport select records based on values in the main report record?

    Post Author: calvin
    CA Forum: General
    Perhaps my understanding of a subreport is incorrect as this is the first time I've used one, but it seems to me that the subreport should be able to use the values from the main report record in its (the subreport's) operations-but my subreport doesn't seem to be working that way.In my main report, I select a set of records from a 'request' table. I have a subreport in the detail section so the subreport is processed for each of the request records. That works, but I'm simply getting the same data reported multiple times. It's as if the subreport only uses the last request record rather than the current one. Stating it this way I can see that the problem might be evaluation time-it's processing the request records first, then processing the subreport, and only then printing everything. If this is correct then putting WhilePrintingRecords on the subreport should work-but the only way I know of to do that is in a formula. Can I call the subreport from a formula? Or am I totally off-track?Thanks.

    Post Author: foghat
    CA Forum: General
    Have you established a link(s) between your main report and subreport?When viewing the main report, click edit --> subreport links and link the 2 based on whatever values from the main report you want.

  • How to fetch the junk values of a column and the column name in oracle

    Hello,
    Can anyone help me in writing a procedure/dynamic SQL to fetch the column where the junk values appears and its value. Eg: If emp table contains ID and Name columns, and ID column contains junk values, the result should be the Id column and the junk value/s. It should be dynamic because next time if the other column contains junk values(like $,%...), the query should display the other column too..
    Thanks in advance..

    Try this, I'm not sure if it'll help... and get some idea...
    try to modify it as per your requirement -
    select * from junk_vals;
    1     ranit1
    2#     ranit2
    3     ranit3
    4$     ranit@4
    5     ranit5
    6     r^anit6
    select 'ID', id, val from junk_vals
        where regexp_like(id,'[^a-zA-Z0-9]')
    UNION
    select 'VALUE', id, val from junk_vals
        where regexp_like(val,'[^a-zA-Z0-9]');
    -- "Output :"
    ID     2#     ranit2
    ID     4$     ranit@4
    VALUE     4$     ranit@4
    VALUE     6     r^anit6
    NOTE - I've considered anything other than Alphabets and Numbers as a Junk Value
    Edited by: ranit B on Jan 4, 2013 5:07 PM
    -- o/p added

  • 0fi_ar_4 netduedate(netdt) value coming in RSA3 but not coming in BI PSA

    Hi all,
    i am using 0fi_ar_4,
    netduedate(netdt) value coming in RSA3 but not coming in BI PSA, in BI PSA there is 10-12 do cument there where netduedate is null while for same document we are getting the netduedate running from transaction RSA3, how?
    Thanks.

    Hi,
    I found  the problem, i have write a user exit in data sourc e in ecc, i am getting value in rsa3 but not getting in BI PSA becaue ise there is 20000 KB limits for per info package load request i.e. idoc size, as its fixed, i did change little in my user exit at ECC.
    thaks

  • Ajax - Multiple Values - Help with the code

    Hi all,
    My code is probably wrong, though, I don't know where the problem is. I'm not that good with programming and copied the example from oracle.com and modified it... I hope you guys can help me. Here is what I have:
    A select list: P4_DOBJ1_NR (The user selects something from DOBJ_NR from the table dataobject)
    A display as text item: P4_NAMSP1
    Another display as text item: P4_DOBJ_NAME1
    Here my code:
    HTML Header Setting for my select list-attribut:
    onchange="javascript:getDOBJ1Info(this);"
    The HTML header from my page:
    <script type="text/javascript">
    function getDOBJ1Info(filter)
    var xml = null;
    var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=GETDOBJ1Info',0);
    get.add('GOBJ1NO', filter.value);
    ret = get.get('XML');
    if(ret)
    var oneItems = ret.getElementsByTagName("NAMSP");
    if (oneItems)
    var onedisplay = document.getElementById("P4_NAMSP1");
    onedisplay.innerHTML = oneItems[0].getAttribute("VALUE");
    var twoItems = ret.getElementsByTagName("DOBJ_NAME");
    if (twoItems)
    var twodisplay = document.getElementById("P4_DOBJ_NAME1");
    twodisplay.innerHTML = twoItems[0].getAttribute("VALUE");
    get = null;
    </script>
    An application item, called: GOBJ1NO
    And the Application Process:
    DECLARE
    vONE VARCHAR2(100);
    vTWO VARCHAR2(100);
    BEGIN
    owa_util.mime_header('text/xml', FALSE );
    htp.p('Cache-Control: no-cache');
    htp.p('Pragma: no-cache');
    owa_util.http_header_close;
    htp.prn('<DATA>');
    SELECT NAMSP, DOBJ_NAME INTO vONE, vTWO FROM DATAOBJECT WHERE DOBJ_NR = :GOBJ1NO;
    htp.prn('<ONE VALUE="' || vONE || '"></ONE>');
    htp.prn('<TWO VALUE="' || vTWO || '"></TWO>');
    htp.prn('</DATA>');
    EXCEPTION WHEN OTHERS THEN
    htp.prn('<ONE VALUE="Error"></ONE>');
    htp.prn('<TWO VALUE="Error"></TWO>');
    END;

    Your process returns a XML document with structure
    <DATA>
       <ONE> value one </ONE>
       <TWO> value two </TWO>
    </DATA>but you are trying to retrieve element named "NAMSP"
    so try to chang it to :
    var oneItems = ret.getElementsByTagName("ONE");You will find fantastic examples on Denes Kubicek web site:
    Try this url:
    http://apex.oracle.com/pls/otn/f?p=31517:106:1074750275898234::NO
    HTH
    Thomas

  • Smartform:Window Tilte Texts r  junk values in PDF of my forms

    Dear all
    Smartform: i get header title & Window Tilte Texts r  not appearing, some  junk values does appear in PDF of my forms .
    Whr to check ?
    thnx
    Moni

    Hello,
    The reason why I proposed the reinstallation of Adobe Acrobat is due to the reason that the font which you used in SSF ( font size also matters ) may NOT be available in Adobe Acrobat.
    May be you can try out with some other font and try.
    Hope this helps you.
    Best Regards, Murugesh AS

  • At a time of uploading the file its giving a junk value.

    Hi  All,
    I am uploading .DOC file using GUI_UPLOAD function and its giving junk value in the internal table at a time of uploading the file.
    Is there any alternative or any function which can help me to upload the .DOC file or any scanned file?
    And is there any possibility to convert the junk value to the string or character?
    I would like to mention the version as i'm working on 5.0.
    Regards,
    Bhavani

    use File_type as 'BIN'

Maybe you are looking for

  • Mac Pro w/ Quadro FX 4500 not sending 1080p signal

    Hi, I've got a Mac Pro with an nVidia Quadro FX 4500 video card and I'm having a lot of difficulty getting OS X to send a 1080p signal to my high-end Sanyo PLV-HD10 projector via DVI. When I say 1080p, I mean 1920x1080 in progressive (non-interlaced)

  • Connecting a 2nd display

    HI, I have a Mac Pro, circa Dec 07 (therefore no mini display port) and currently use a 23" cinema display. I want to attach another identical display and assume I can do this via the other (spare) DVI port at the back of the Mac? However, my main mo

  • Widgets in Desktop?

    Simple Question: Can I put my widgets in the desktop? ~Christoph

  • 11g For Windows and Linux 32 Now available for Download

    for your information only ;)

  • Corrupted Downloaded Filenames

    Not sure this is correct forum, but here goes. In Tiger, when I download (I use firefox - but same goes for opera and safari) a file (such as a word doc) the filename is often changed into strings of numbers and "%" signs. e.g.: Sociology 556 week 2