Matching Keys To Values

When a user clicks on a button with a letter from A to Z, the letter is fed to a method that searches a HashMap for all the keys that start with that letter. The keys represent film titles. The titles are put into a TreeSet to keep them in alphabetical order. I then need to match the key to the corresponding value so as to extract the data from the value which is a JavaBean. The goal is to extract the info and place it into a JTable which you see in the screenshot. I know how to axtract the info, it is how to match the key to the value that stumps me. Any help would be greatly appreciated.
http://pollscanada.com/screenshot.html
    public void setFilmData(String letter) {
            try {
      FileInputStream file = new FileInputStream("FilmContainer.ser");
      ObjectInputStream obInputStream = new ObjectInputStream(file);
      container = (FilmContainer)obInputStream.readObject(); 
    } catch(Exception ex) {}
          TreeSet list = new TreeSet();
           Set set = container.keySet();
           Iterator it = set.iterator();
             while(it.hasNext()) {
              String key = (String)it.next();
               if(key.startsWith(letter)) { list.add(key); }
       //start matching titles to Beans and extract Bean info
    }

When a user clicks on a button with a letter from A
to Z, the letter is fed to a method that searches a
HashMap for all the keys that start with that letter.
The keys represent film titles. The titles are put
into a TreeSet to keep them in alphabetical order. I
then need to match the key to the corresponding value
so as to extract the data from the value which is a
JavaBean. The goal is to extract the info and place
it into a JTable which you see in the screenshot. I
know how to axtract the info, it is how to match the
key to the value that stumps me. Any help would be
greatly appreciated.
http://pollscanada.com/screenshot.html
public void setFilmData(String letter) {
try {
FileInputStream file = new
= new FileInputStream("FilmContainer.ser");
ObjectInputStream obInputStream = new
= new ObjectInputStream(file);
container =
iner = (FilmContainer)obInputStream.readObject(); 
} catch(Exception ex) {}
TreeSet list = new TreeSet();
Set set = container.keySet();
Iterator it = set.iterator();
while(it.hasNext()) {
String key = (String)it.next();
if(key.startsWith(letter)) {
With(letter)) { list.add(key); }
//start matching titles to Beans and extract
extract Bean info
It will be a better idea to use TreeMap which is a sorted map.
u store in the treemap with filmname as key and the bean
as value.
On press of a button u can get a subMap with the help of
subMap method using
    char letter = button.getText().charAt(0);
     Map  letterMap = filmMap.subMap(letter+"", letter+1+"");the letterMap would contains all the keys which start with that letter.

Similar Messages

  • DB_NOTFOUND: No matching key/data pair

    Hello,
        I'm trying to index a container that has about 3000 XML documents, like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <BO>
    <cadastro>
      <id>15</id>
      <ano>06</ano>
      <hash>2446aaa904cf9a5e2748b48b378b28ac</hash>
      <inicio>
       <data>
        <d>18</d>
        <m>05</m>
        <a>2006</a>
        <date>2006-05-18</date>
       </data>
       <hora>
        <h>12</h>
        <m>45</m>
        <s>09</s>
        <time>12:45:09</time>
       </hora>
      </inicio>
      <fim>
       <data>
        <d>18</d>
        <m>05</m>
        <a>2006</a>
        <date>2006-05-18</date>
       </data>
       <hora>
        <h>12</h>
        <m>52</m>
        <s>15</s>
        <time>12:52:15</time>
       </hora>
      </fim>
      <numFlash />
      <remoteAddr>200.222.152.218</remoteAddr>
      <remotePort>60843</remotePort>
      <maquina />
      <sispol />
    </cadastro>
    <validacao>
      <situacao>REPROVADO</situacao>
      <validadores>
       <avaliador>
        <nome>NELSON MIRANDA MATTOS FILHO</nome>
        <cpf>
         <numero>47577517534</numero>
        </cpf>
        <matricula />
       </avaliador>
       <escrivao>
        <nome>FLÁVIO AMORIM DE BRITO</nome>
        <matricula>5555</matricula>
        <cpf>
         <numero>12345678909</numero>
        </cpf>
       </escrivao>
       <delegado>
        <nome>FRANCISCO MEDSON LIMA MAIA</nome>
        <matricula />
        <cpf>
         <numero>41728670306</numero>
        </cpf>
       </delegado>
      </validadores>
      <data>
       <d>18</d>
       <m>05</m>
       <a>2006</a>
       <date>2006-05-18</date>
      </data>
      <hora>
       <h>12</h>
       <m>53</m>
       <s>26</s>
       <time>12:53:26</time>
      </hora>
      <maquina>
       <dhCadastro>
        <data>
         <d>02</d>
         <m>05</m>
         <a>2006</a>
         <date>2006-05-02</date>
        </data>
        <hora>
         <h>14</h>
         <m>17</m>
         <s>58</s>
         <time>14:17:58</time>
        </hora>
       </dhCadastro>
       <nome>Maquina01-DI</nome>
       <descricao />
       <ip>10.1.26.57</ip>
      </maquina>
      <obs>TESTE</obs>
    </validacao>
    <fato>
      <natureza>FURTO</natureza>
      <uf>AL</uf>
      <cidade>MACEIÓ</cidade>
      <bairro>ANTARES</bairro>
      <lougradouro />
      <pontoReferencia />
      <data>
       <d>18</d>
       <m>05</m>
       <a>2006</a>
       <date>2006-05-18</date>
      </data>
      <periodo>MANHA</periodo>
      <descricaoFato />
      <outrosDocumentos />
    </fato>
    <pessoas>
      <vitima>
       <cpf>
        <numero>41728670306</numero>
       </cpf>
       <rg>
        <orgaoEmissor />
        <uf />
        <dExpedicao>
         <d>0</d>
         <m>0</m>
         <a>0</a>
         <date>0-0-0</date>
        </dExpedicao>
        <numero />
       </rg>
       <nome>FRANCISCO MEDSON MAIA</nome>
       <sexo>M</sexo>
       <dNasc>
        <d>01</d>
        <m>01</m>
        <a>1926</a>
        <date>1926-01-01</date>
       </dNasc>
       <lougradouro>RUA X</lougradouro>
       <numero>12</numero>
       <bairro>CENTRO</bairro>
       <compl />
       <cidade>MACEIÓ</cidade>
       <uf>AL</uf>
       <cep />
       <naturalidade>
        <cidade>MACEIÓ</cidade>
        <uf>AL</uf>
       </naturalidade>
       <filiacao>
        <pai />
        <mae>MARIA</mae>
       </filiacao>
       <fone>
        <numResidencial>8288338887</numResidencial>
        <numCelular />
       </fone>
       <email />
       <estadoCivil>1</estadoCivil>
       <grauInstrucao>0</grauInstrucao>
       <turista>n</turista>
      </vitima>
    </pessoas>
    <documentos>
      <cpf>
       <numero>41728670306</numero>
      </cpf>
      <outros>
       <descricao>carteira da ordem dos musicos</descricao>
      </outros>
    </documentos>
    <objetos />
    <historico>O DECLARANTE INFORMA QUE, NO LOCAL, DATA E HORA ACIMA CITADOS, FORAM EXTRAVIADOS 2 DOCUMENTOS , ABAIXO DISCRIMINADOS: CPF Nº 417.286.703-06;CARTEIRA DA ORDEM DOS MUSICOS; OBS.: ESTE BOLETIM NÃO SUBSTITUI O(S) DOCUMENTO(S) ACIMA CITADO.</historico>
    </BO>
        I tried to index the node:
        <date>2006-05-18</date>
        Which occurs in many places in the document. So I assumed it should be an edge-type index? So I added:
    dbxml> addIndex "" date edge-element-equality-string
       But when I perform some operation to update any document, I get this:
    com.sleepycat.dbxml.XmlException: Error: DB_NOTFOUND: No matching key/data pair found, errcode = DATABASE_ERROR
            at com.sleepycat.dbxml.dbxml_javaJNI.XmlModify_execute__SWIG_0(Native Method)
            at com.sleepycat.dbxml.XmlModify.execute(XmlModify.java:81)
            at br.gov.al.delegaciainterativa.controles.Update.atualizaXml(Update.java:146)
            at br.gov.al.delegaciainterativa.bo.GerenciaBO.mudarStatusBO(GerenciaBO.java:327)
            at br.gov.al.delegaciainterativa.bo.GerenciaBO.mudarStatusParaEmEspera(GerenciaBO.java:281)
            at org.apache.jsp.admin.boResponsavelAlterar_jsp._jspService(org.apache.jsp.admin.boResponsavelAlterar_jsp:340)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
            at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
            at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
            at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
            at java.lang.Thread.run(Thread.java:595)
         Is this related to the wrong choice for indexes-types? In this case I'm trying to perform a date-range search.
    cheers,
    -- Breno

    Breno,
    You seem to be using both the dbxml shell and a servlet.
    Are they active at the same time? Also, when you start the shell
    are you careful to join the environment your servlet uses? To
    be sure, use:
    dbxml -v -h "<path_to_environment>"
    The -v will tell you whether it joined correctly.
    I suspect that you modified your container improperly by using the shell directly.
    That said, if you want real date ranges to work, you need to use a date or dateTime;
    however, if you do so, the values need to have the correct syntax in order to work.
    You can see syntax by doing this:
    dbxml> query "current-date()"
    dbxml> print
    There are also functions for current-dateTime() and current-time().
    If your dates are not syntactically correct, they'll be silently ignored in
    the index.
    Regards,
    George

  • HashMap keys and values not staying consistent (my fault, but why?)

    Alright, after starting out for the very first time with HashMaps a few hours ago, I've gotten the hang of them decently I think. I am encountering a problem, though, when I try to get user-selected keys + values to display. My code is:
       public void useZone(String use)
           Object used = hm.get(use);
           System.out.print("\f");
           Set set = hm.entrySet();
           Iterator i = set.iterator();
           if (used != null){
               System.out.println("Time Zone Used:");
               Map.Entry thiszone = (Map.Entry)i.next();
               Object usedzone = thiszone.getValue(); //Get the value of the zones and assign them as Object usedzone
               Integer useval = (Integer) usedzone; //Assign the Object to an Integer value so we can use it
               difference = useval;
               if (useval > 0){ //Display the hour offset correctly
                   System.out.println(use + ": GMT +" + usedzone.toString());
               else if (useval == 0){
                   System.out.println(use + ": GMT");
               else if (useval < 0){
                   System.out.println(use + ": GMT " + usedzone.toString());
           else{
               System.out.println("Invalid zone name.");
           } //End if
           ClockDisplay.getZone(difference); //Send variable difference
      }What will happen is that the first time I will be fine...
    Say the HashMap keys and values are
    "Rome", "-2"
    "Chicago", "6"
    "New York", "5"
    "Paris", "-1"
    If I type "Rome" in when I execute this method, it gives me the correct output - "Rome: GMT -2"
    If I then re-run the method, as to display a different one, I get "Chicago: GMT -2"
    It's like the name the user inputs is updating, obviously, but the value of the HashMap that goes along with the user-input doesn't match up or something. My code is confusing myself after looking at it for nearly 10 hours, so I apologize that I had to post something so trivial here - I'm sure it's just a problem with my wordings....any help would be greatly appreciated.

    Hello,
    It's very possible I'm missing some things here, but I've attempted to review your code.
    Let me just define the specs of the code as I see them:
    Method useZone accepts String input, which is "supposed" to be the key to a hashmap.
    The timezone offsets are the value's in this hashmap.
    The value is of type Integer.
    If a key is properly selected, print out GMT + or - the offset?
    If I have this correct, consider the following implementation:
       public void useZone(String use) {
           Integer offset = (Integer)hm.get(use);
           System.out.print("\f");
           if (offset != null){
               System.out.println("Time Zone Used:");
               System.out.println(use + ": GMT +" + offset.toString());
           } else{
               System.out.println("Invalid zone name.");
           ClockDisplay.getZone(offset); //Send variable difference
      }I'd guess you're getting odd behavior because you're creating an iterator to iterate through the map, but then only calling i.next() once - HashMap doesn't guarantee insertion order, so the fact it worked once correctly is "random".
    Also, if you are using java 1.5 declare the map as follows:
    Map<String, Integer> hm = new HashMap<String, Integer>();And you can get rid of the casts. I would also suggest renaming the hashmap to something that describes what it holds, rather than it's object type. Maybe something like timeZoneMap - or offsetMap. I would also consider renaming "use" to something that describes the data it might hold, instead of something that describes the workflow.
    Variable naming is very difficult! I would suggest renaming all of your variables, but I think those are the only ones I kept!
    Edited by: Adam_Schaible on Nov 28, 2007 12:09 PM

  • Error in key figure value at Reporting level

    Hi Experts,
    I had problem of Key figure value which displays wrong data in reporting.
    The Process is :
    I had added the key figure SALK3 to the generic data source (xxx). The Extractor is Table/View, Table is MBEW.I had replicated to BW side.
    In BW, The process is Data Source(Generic) to 0MAT_PLANT(Infoobject (Added SALK3 to the infoobject of Attributes tab) ) loads to Multiprovider.I can see data  in the multi provider for that particular field after loading.
    Now the problem is, In Query designer i had added the key figure in Columns and ran the report.The output of the field is, If the value is 100 it displays 100 ERROR, if it 200 it displays 200 ERROR.Could you please help me on this,where i went wrong.
    Regards,
    Kishan.

    Hello,
    Please check with the follwing screen shots:
    Right click on the key fgure you created----select edit
    Once the screen opens select the NODIM from Data Functions before the key figure (as highlighted).
    Finally click on OK.
    Regards
    NS

  • Key figure value in a level

    Hi is it possible to identify which key figures values has introduce a user ? and which CVC has the user uses for inserting the key figure value?
    REgards.
    PS :We have APO DP 5.0

    Javier,
    It is possible to identify and track the inputs of specific users contribution to that Key figure using the following method, Provided you follow certain prerequisites first.
    Its should be known before the certain people are responsible for certain data selections, like if there is a change in certain Sales org, we should ideally know who is the assinged planner to that Sales Org. or that sales org has been assinged to which Planner
    Next, Develop to Lag reports in BI using the regular snapshots of the the data extracted out of DP before and after the changes have been made for that particular KF.
    Compare the changes using the versions of snapshot before changes and after changes, or perhaps create another calucalted KF showing the different between two versions. The BI team should be able to create reports that enable you to run this report on all levels for that Key figure.
    Hari V

  • Key Figure value in Cube showing with extra zeros

    Loaded data into the cube. When I display the result
    Key figure values are showing with 2 extra zeroes and Quantity value shaowing with 3 extra zeroes.
    Original value
    Price, Quantity, Sales Rev
    2     1     2
    3     2     6
    When display value from cube
    Price, Quantity, Sales Rev
    2,00     1,000     2,00
    3,00     2,000     6,00
    Why zero is showing? How can I display the original value? In PSA, values are showing correctly.
    Thanks,

    Hi,
    These are the zeroes after the decimal places. this is the property of the key figure.
    In your report you can change the display value. In the display properties of the Key figure under the number of decimal places make it as 0. This will remove the zeroes.
    Hope it helps.
    Regards,
    Gaurav
    Edited by: Gaurav Kothari on Oct 16, 2008 10:35 AM

  • GR Value is not matching with PO Value while posting good receipt.

    Hi Experts,
    My client has raised the PO with accounts assignment category K (COST CENTRE) with material description.
    but he has received invoice receipt before good receipt.while invoice receipt he has entered wrong value for some qty as per PO intially and cancelled that wrong entry.
    I have gone through original & cancelled invoice document accounting entries. below is entries:
    Original invoice document accounting entries:
    GR/IR Clearing account: Debited
    Vendor account: Credited
    during cancelling the above document it should be vendor acc is debited and GR/IR account is credited but in the system below entries taken place
    Cancelled invoice document accounting entries:
    Vendor account : Debited
    GR/IR Account : Credited
    Consumption Account : Credited
    Why consumption acc taken place here. pls help what are the possibilitis....
    these entries affecting good receipt value means while taking goods receipt for some qty out of full qty value is not matching with PO value.
    but while cancelling the  GR documents system taking correct values as per PO. Please help.
    Kindly help in this regards
    Regards
    Mohan

    Hi,
    Check the Credit Memo document whether G/L tab is there & whether any G/L account is entered ?
    I think instead of cancelling the MIRO document they might have posted a vendor credit memo manually by specifying a consumption GL.
    Thanks & Regards,

  • SQL to match a single value in a field with comma-delimited text

    I have a column that can contain none, one or many recordIDs
    (from another table) stored as comma-delimited text strings (i.e.,
    a list). I need to retrieve all records that match a single value
    within that list.
    For example, if I want to match all values that equal
    recordID 3, and I use ... WHERE MyColumn IN ('3') ... , I will get
    all records that have EXACTLY 3 as the value of MyColumn, but not
    any MyColumn records whose values include 3, if they are instances
    such as "3,17" or the like.
    Also using the LIKE operator -- as WHERE MyColumn LIKE '%3%'
    -- will get me unwanted records with values such as 35 or 13 ...
    Can I use some sort of intervening ColdFusion list processing
    to output only the desired records?

    Normalize your database so that your data becomes
    accessible.

  • MDM Exception: Key mapping value must be unique. You cannot overwrite key

    "ServerException: Key mapping value must be unique. You cannot overwrite key mapping values."
    I received such exception when code tried to manipulate Key Mappings of the record.
    error was not happen on mdm 5.5 but on 7.1 it sometimes appears.
    What is probable reason of this?
    How to resolve this ?
    Code is approximate so:
                                         String[] keys = keyMapping.getKeys();
                        if (recordKeyMapping.containsKeyMapping(remoteSystem)) {
                    recordKeyMapping.replace(remoteSystem, keys);
              else {
                   recordKeyMapping.addKeyMapping(keyMapping);
              //Persist
              targetRecord.update();
    //where methods are:
         public void replace(RemoteSystem remoteSystem, String[] keys) {
              KeyMapping keyMapping = getKeyMapping(remoteSystem);
              if (keyMapping == null) throw new IllegalArgumentException("Can't update keys: key mapping for the system '" + remoteSystem + "' is not found");
              else {
                   keyMapping.setKeys(keys);
         public void addKeyMapping(KeyMapping keyMapping) {
              RemoteSystem remoteSystem = keyMapping.getRemoteSystem();
              for(int i = 0; i < keyMapping.size(); i++) {
                   addKey(remoteSystem, (String) keyMapping.get(i));
    Edited by: Vladimir Grigoryev on Oct 5, 2010 11:26 AM

    Hello -
    I am not sure on that coding part. but is it like are you trying to retrive Key Mapping from Memory accelerator. Here this information always needs to be read from Database.
    I am sure you also maintained  the required attribute for key mapping as in Property in Console should be set as "Yes" and other relevant things properly .
    Here also go through the below link for more insight from tools perspective.
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30843106-5539-2b10-75a9-da483911b0d9
    http://help.sap.com/javadocs/mdm/sp06/com/sap/mdm/data/KeyMapping.html
    It may help
    Rgds
    Deep

  • The value in flexfield context reference web bean does not match with the value in the context of the Descriptive flexfield web bean BranchDescFlex. If this in not intended, please go back to correct the data or contact your Systems Administrator for assi

    Hi ,
    We have enabled context sensitive DFF in Bank Branch Page for HZ_PARTIES DFF , We have created Flex Map so that only bank branch context fields are only displayed in the bank branch page and  as we know party information DFF is shared by supplier and Customer Page so we dint want to see any Bank Branch fields or context information in those pages.
    We have achieved the requirement but when open existing branches bank branch update is throwing below error message :
    "The value in flexfield context reference web bean does not match with the value in the context of the Descriptive flexfield web bean BranchDescFlex. If this in not intended, please go back to correct the data or contact your Systems Administrator for assistance."
    this error is thrown only when we open existing branches, if we save existing branch and open then it is not throwing any error message.
    Please let us know reason behind this error message.
    Thanks,
    Mruduala

    You are kidding?  It took me about 3 minutes to scroll down on my tab to get to the triplex button!
    Habe you read the error message? 
    Quote:
    java.sql.SQLSyntaxErrorException: ORA-04098: trigger 'PMS.PROJECT_SEQ' is invalid and failed re-validation
    Check the trigger and it should work again.
    Timo

  • Key Field Value for File Adapter Sender Wildcard

    Hello everybody, is there a way to use a wildcard for the property of NamA.keyFieldValue in the cc for a Fils Sender????, here's an example why, I need to take some Files via PI 7.0 and my key filed can change according to the file an example is that in a file can be HF28 and in another file can be HF29, the only character that is going to be constant is the H, I would really appreciate any suggestions, thanks in advance.
    Regards,
    Julio Cesar

    Hi Julio
    File sender adapter will read the file using FCC
    Key Field Value entry is mandatory if the key field name is set. Otherwise, the entry can be ignored
    http://help.sap.com/saphelp_nw70/helpdata/EN/34/393071e9b998438ddb8ce97cd617a1/frameset.htm
    Content Conversion ( The Key Field Problem )
    Thanks
    Gaurav Bhargava

  • Wild Card as key field value in Content Conversion

    Hi,
         Can any one please tell me that can a wild card such as '*' be used as key field value.
    Thnx,
    Pravesh Puria.

    Hi Pravesh
    For the file name in the sender file adapter you can use the '*' or '?'(as a placeholder for exactly one character)
    You can also enable the "Advanced Selection for Source File" in the sender file adapter, where you can do two things:
    a)you can specify an exclusion mask for the file name specified above.
    b)you can specify/lits multiple directories with a file name and an associated exclusion mask, e.g. in file name you put ".txt" and in the associated exclusion mask "a". The every file with ".txt" except "a" will be fetched from that directory. 
    Try it out.
    Regards,
    Goekhan

  • Key Field Value in FCC

    Hi Experts,
    I have a scenario in PI, where I have 1 Header, n Data Records and 1 Trailer in the source file. This data is coming in CSV format.
    I am using FCC to convert CSV into XML.
    In the FCC, I have used keyFieldValue parameter. For the Header Record, the Key Field Value is constant "H"; for Trailer Record the key field value is constant "T".
    However for Data Record, the key field value is not constant. The first character of Key field of Data Record will always be "D", but rest of the Alphabets can change.
    Sample File:
    "H","3.04",22/10/2009,16:31:12
    "D2S",21/10/2009,20:00:26,"20044",00666,"S",1
    "D2S",22/10/2009,14:26:20,"20044",00668,"S",1
    "D0S",22/10/2009,08:33:34,"00044",04165,"S",1
    "D0S",22/10/2009,11:59:59,"00044",04166,"S",1
    "T",1393.27,1393.27,8
    Here, first line is Header Line (Key Field Value "H"), Last Line is Trailer Line (Key Field Value "T") and all lines in between Header and Trailer are Data Records (Key Field Value starts with "D). I need to convert this file into XML.
    I have no clue, if this can be converted into XML through FCC.
    Any help will be highly appreciated.
    Regards,
    Varun

    >
    Varun Agarwal wrote:
    > Sample File:
    >
    "H","3.04",22/10/2009,16:31:12
    > "D2S",21/10/2009,20:00:26,"20044",00666,"S",1
    > "D2S",22/10/2009,14:26:20,"20044",00668,"S",1
    > "D0S",22/10/2009,08:33:34,"00044",04165,"S",1
    > "D0S",22/10/2009,11:59:59,"00044",04166,"S",1
    > "T",1393.27,1393.27,8
    >
    > Here, first line is Header Line (Key Field Value "H"), Last Line is Trailer Line (Key Field Value "T") and all lines in between Header and Trailer are Data Records (Key Field Value starts with "D). I need to convert this file into XML.
    >
    > I have no clue, if this can be converted into XML through FCC.
    > Any help will be highly appreciated.
    >
    >
    > Regards,
    > Varun
    Write a simple module. The module will do a replace of the Dxx fields to D (you can use simple regex function for this)
    After the module, use the messagetransformbean to do the FCC for you.
    The module might sound complex, but trust me its a simple logic you need to implement and you can easily do the FCC with the messagetransformbean

  • Calculating a count of rows where value matches another column value in the same table

    Hi,
    I'm struggling to do something in DAX that seems to me should be super easy (coming from a SQL world)!
    That is to count all rows in column 1 where the value matches the current value for column 1?
    E.g something like this:
    [Col2]=Count of rows in [Col1] where value = this.[Col1]
    Where the results are as in the table below:
    Col1, Col2
    A, 2
    A, 2
    B, 1
    Anyone?
    Martin Laukkanen
    Nearbaseline blog - nearbaseline.com/blog
    Bulk Edit and other Apps - nearbaseline.com/apps

    Thanks, that's perfect! 
    I knew it had to be something so simple, but after spending over an hour banging my head against those exact functions I couldn't get anything working!
    Martin Laukkanen
    Nearbaseline blog - nearbaseline.com/blog
    Bulk Edit and other Apps - nearbaseline.com/apps

  • How can we hide the non key field values in the sm30 display

    hello experts,
    I have to protect the non key field values in the sm30 display , can u help me out wat changes i have to do in the layout.

    Hello Gopal,
    What do you mean by 'protecting' your non-key field value?
    1) You want to display it, but make it non-changeable
    A - Make the field as output-only in screen, as already answered by a preivous collegue
    2) You do not want to display this field at all
    A - Goto the DDIC definition of the view (not possible for a table directly), and maintain the required field as a Hidden. After activating, remember to re-generate the maintenance dialogue. Also, please maintain Event 21, in case you want to access/change the value of this field in background.
    3) You want to maintain special validations/checks for the field
    This can be easily done by introducing your modules within the CHAIN-FIELD commands in the PAI of the generated screens.
    Best Regards,
    Rekha

Maybe you are looking for