Dictionary structure, what, how?

Hello to all,
I need to program to load a dictionary from a file that contains the words and it's definitions, I need to load it in a efficient structure because when it will be loaded will be used to do search's in that dictionary, for example:
Dictionary file:
a
and
another
etc
hell
hellsinki
hello
And I need an structure that permit to me search in that dictionary very fast and to do search's like this:
search: he*
and result must be
hell
hellsinki
hello
search: *llo
result:
hello
search: ll
result:
hellsinki
hell
hello
do you know (what structure will be convenient to do this) how can I do this efficiently?
Thanks to all for reading!

I'd use a http://java.sun.com/j2se/1.4.2/docs/api/java/util/PropertyResourceBundle.html for the data.
For the search optimization, you can set up a "search" map where the keys are all possible substrings (of two or more lettters?) of your words and the values are a collection with all the words where the key occurs.
eg.
key: "he", value: a collection containing "hell", "hellsinki" (sic), "hello", "another".
etc.
That shifts the processing to setting up the "search" map rather than searching though all words for each search.

Similar Messages

  • Simple Transformation from Adobe Form XML document to Dictionary structures

    I have an XML document that I am receiving via email (the XML document is generated from an Adobe Interactive form). I would like to write a simple transformation that will map that XML document to a structure and internal table in my ABAP program. I am new to Simple Transformations and I am having trouble working out how to write a simple transformation for this type of XML document. I would prefer to write a custom transformation rather than using the identity transformation (ID). I would appreciate any help you can provide.
    Please refer to the below for an example of the XML file.
    This maps directly to 2 dictionary structures that exist within our system containing all of the same components. PIM_REQUEST_HDR has a corresponding SAP dictionary structure Y_REQUEST_HDR and PIM_REQUEST_ITEMS has a corresponding SAP dictionary structure Y_REQUEST_ITEMS.
    Can anyone help with some instructions or examples of how to create the simple transformation?
    Thanks for your help! We are using ECC 6.0
    Sample XML to be transformed:
    <?xml version="1.0" encoding="UTF-8" ?>
    <data>
    <SFPSY>
      <DATE>2007-07-03</DATE>
      <TIME>07:25:21</TIME>
      <USERNAME>TLCITY</USERNAME>
      <SUBRC>0</SUBRC>
      </SFPSY>
    <PIM_REQUEST_HDR>
      <MANDT />
      <REQ_NUM />
      <REQ_DESC>blah blah blah</REQ_DESC>
      <PROC_AREA>CTC</PROC_AREA>
      <REQUESTED>2007-07-03</REQUESTED>
      <REQUIRED>2007-07-03</REQUIRED>
      <REQUESTOR>TLCITY</REQUESTOR>
      <MOD_TYPE>SAP Note manual changes</MOD_TYPE>
      <SAPNOTE_NUM>59549656</SAPNOTE_NUM>
      <SAPMSG_NUM>0000000000</SAPMSG_NUM>
      <TECH_SCRIPT />
      <REASON />
      <DEV_ENV>ECC6</DEV_ENV>
      <INSTALL_NO>2861655161</INSTALL_NO>
      <BASIS_REL>700</BASIS_REL>
      <REG_STATUS />
      <REJ_REASON />
      <APP_DATE />
      <REJ_DATE />
      <APPROVER />
      <REGISTRATOR />
      <REG_DATE />
      </PIM_REQUEST_HDR>
    <PIM_REQUEST_ITEMS>
    <DATA>
      <MANDT />
      <REQ_NUM />
      <PGMID>R3TR</PGMID>
      <OBJECT>PROG</OBJECT>
      <OBJ_NAME>RSDIJOIJSDOIF</OBJ_NAME>
      <ACCESSKEY />
      </DATA>
    <DATA>
      <MANDT />
      <REQ_NUM />
      <PGMID>R3TR</PGMID>
      <OBJECT>PROG</OBJECT>
      <OBJ_NAME>RRRSDIJOIJS03</OBJ_NAME>
      <ACCESSKEY />
      </DATA>
      </PIM_REQUEST_ITEMS>
      </data>

    I have solved this one with the help of another collegue.
    To simplify, we changed the XML to be as follows:
    [code]
    <?xml version="1.0" encoding="UTF-8" ?>
    <data>
    <PIM_REQUEST>
    <REQ_HDR>
      <MANDT />
      <REQ_NUM />
      <REQ_DESC>Key required for pricing routines</REQ_DESC>
      <PROC_AREA>SD</PROC_AREA>
      <REQUESTED>2007-07-30</REQUESTED>
      <REQUIRED>2007-08-02</REQUIRED>
      <REQUESTOR>TLCITY</REQUESTOR>
      <MOD_TYPE>SAP Note: Manual Changes</MOD_TYPE>
      <SAPNOTE_NUM>0000000000</SAPNOTE_NUM>
      <SAPMSG_NUM>0000000000</SAPMSG_NUM>
      <TECH_SCRIPT>TS-2498 Pricing Routines</TECH_SCRIPT>
      <REASON>New pricing routines required</REASON>
      <DEV_ENV>ECC6</DEV_ENV>
      <INSTALL_NO>029</INSTALL_NO>
      <BASIS_REL>700</BASIS_REL>
      <REG_STATUS />
      <REJ_REASON />
      <APP_DATE />
      <REJ_DATE />
      <APPROVER />
      <REGISTRATOR />
      <REG_DATE />
      </REQ_HDR>
    <KEY_DETAILS>
    <DATA>
      <MANDT />
      <REQ_NUM />
      <PGMID>R3TR</PGMID>
      <OBJECT>PROG</OBJECT>
      <OBJ_NAME>RVGHT902</OBJ_NAME>
      <ACCESSKEY />
      </DATA>
    <DATA>
      <MANDT />
      <REQ_NUM />
      <PGMID>R3TR</PGMID>
      <OBJECT>PROG</OBJECT>
      <OBJ_NAME>RVGHT901</OBJ_NAME>
      <ACCESSKEY />
      </DATA>
      </KEY_DETAILS>
      </PIM_REQUEST>
      </data>
    [/code]
    This maps directly to 1 dictionary structure that exists within our system containing all of the same components. PIM_REQUEST has a corresponding SAP dictionary structure Y_REQUEST_HDR which is a deep structure and has within it a structure REQ_HDR and a table KEY_DETAILS.
    The corresponding simple transformation we have then used is as follws:
    [code]
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="root"/>
      <tt:template>
        <data>
          <PIM_REQUEST>
            <tt:copy ref="root"/>
          </PIM_REQUEST>
        </data>
      </tt:template>
    </tt:transform>
    [/code]
    Alternatively the following 2 options also work:
    Option 2:
    [code]
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="root"/>
      <tt:template>
        <data>
          <PIM_REQUEST>
            <REQ_HDR>
              <tt:copy ref="root.REQ_HDR"/>
            </REQ_HDR>
            <KEY_DETAILS>
              <tt:loop name="KEY_DETAILS" ref="root.KEY_DETAILS">
                <DATA>
                  <tt:copy ref="$KEY_DETAILS"/>
                </DATA>
              </tt:loop>
            </KEY_DETAILS>
          </PIM_REQUEST>
        </data>
      </tt:template>
    </tt:transform>
    [/code]
    Option 3:
    [code]
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="root"/>
      <tt:template>
        <data>
          <PIM_REQUEST>
            <REQ_HDR>
              <MANDT tt:value-ref="root.REQ_HDR.MANDT"/>
              <REQ_NUM tt:value-ref="root.REQ_HDR.REQ_NUM"/>
              <REQ_DESC tt:value-ref="root.REQ_HDR.REQ_DESC"/>
              <PROC_AREA tt:value-ref="root.REQ_HDR.PROC_AREA"/>
              <REQUESTED tt:value-ref="root.REQ_HDR.REQUESTED"/>
              <REQUIRED tt:value-ref="root.REQ_HDR.REQUIRED"/>
              <REQUESTOR tt:value-ref="root.REQ_HDR.REQUESTOR"/>
              <MOD_TYPE tt:value-ref="root.REQ_HDR.MOD_TYPE"/>
              <SAPNOTE_NUM tt:value-ref="root.REQ_HDR.SAPNOTE_NUM"/>
              <SAPMSG_NUM tt:value-ref="root.REQ_HDR.SAPMSG_NUM"/>
              <TECH_SCRIPT tt:value-ref="root.REQ_HDR.TECH_SCRIPT"/>
              <REASON tt:value-ref="root.REQ_HDR.REASON"/>
              <DEV_ENV tt:value-ref="root.REQ_HDR.DEV_ENV"/>
              <INSTALL_NO tt:value-ref="root.REQ_HDR.INSTALL_NO"/>
              <BASIS_REL tt:value-ref="root.REQ_HDR.BASIS_REL"/>
              <REG_STATUS tt:value-ref="root.REQ_HDR.REG_STATUS"/>
              <REJ_REASON tt:value-ref="root.REQ_HDR.REJ_REASON"/>
              <APP_DATE tt:value-ref="root.REQ_HDR.APP_DATE"/>
              <REJ_DATE tt:value-ref="root.REQ_HDR.REJ_DATE"/>
              <APPROVER tt:value-ref="root.REQ_HDR.APPROVER"/>
              <REGISTRATOR tt:value-ref="root.REQ_HDR.REGISTRATOR"/>
              <REG_DATE tt:value-ref="root.REQ_HDR.REG_DATE"/>
            </REQ_HDR>
            <KEY_DETAILS>
              <tt:loop ref="root.KEY_DETAILS" name="KEY_DETAILS">
                <DATA>
                  <MANDT tt:value-ref="$KEY_DETAILS.MANDT"/>
                  <REQ_NUM tt:value-ref="$KEY_DETAILS.REQ_NUM"/>
                  <PGMID tt:value-ref="$KEY_DETAILS.PGMID"/>
                  <OBJECT tt:value-ref="$KEY_DETAILS.OBJECT"/>
                  <OBJ_NAME tt:value-ref="$KEY_DETAILS.OBJ_NAME"/>
                  <ACCESSKEY tt:value-ref="$KEY_DETAILS.ACCESSKEY"/>
                </DATA>
              </tt:loop>
            </KEY_DETAILS>
          </PIM_REQUEST>
        </data>
      </tt:template>
    </tt:transform>
    [/code]

  • Dictionary Structure---data structure of Dictionary

    I don't know how to build a data structure of dictionary...
    somebody said it's was built by binary tree. but I don't know how.
    somebody helps me????
    thanks for reading my topic

    A dictionary is not a tree/hierarchical structure. Have you ever opened a dictionary before?! If you have even once, you already know the structure of a dictionary. Now, how to build that in Java is another question. I'm not sure of your requirements but you could start by creating an object that represents a single term, it's definitions, usages, etc. Then you can create a List of them (and sort them alphabetically). Simple enough?

  • "The Dictionary structure or table "*C865" is either not active or does"

    Hello experts,
    I have a transaction - VKOA. I get the following error on executing this t-code. The program used by this t code is SAPL089C.
    The error is
    Runtime errors         SYNTAX_ERROR
    Occurred on     11/23/2009 at   05:12:58                                                                               
    Syntax error in program "SAPL089C ".                                                                               
    What happened?                                                                               
    The following syntax error occurred in the program SAPL089C :                                  
    "The Dictionary structure or table "*C865" is either not active or does not exist."                       
    Error in ABAP application program.                                                                               
    The current ABAP program "SAPLSVIM" had to be terminated because one of the                    
    statements could not be executed.                                                                               
    This is probably due to an error in the ABAP program.          
    Error analysis             
    The following syntax error was found in the program SAPL089C :                       
    The Dictionary structure or table *C865 is either not active or does not exist.
    Please suggest a suitable solution to this problem...
    Many Thanks in adv.
    Kunal
    Edited by: kunal kotak on Nov 23, 2009 6:53 PM

    Hi ,
    I will try the solution propesed by Max.
    In the meantime, I would like to confirm if there is something related to SAP Note # SAP Note 72121. Refer the following details from the note.
    Symptom
    When you maintain account determination (FI or SD), you get the error
    message:
    The DDIC structure or table "*C400" is not active or does not exist.
    OR
    The system writes a dump with DBIF_NTAB_TABLE_NOT_FOUND, C400 was not
    found.
    C401 can also appear instead of C400.
    Additional key words
    Tables C400, C401.
    Program: SAPL089C, L089CT00
    Transaction: VKOA
    Solution as per the note
    1. Execute the program RV12A002. On the selection screen, enter Usage C,
    Tables 400 to 401.
    WARNING: Make sure that you only delete C400 and C401!
    Execute the program.
    2. Execute program RV12A001. On the selection screen, enter Usage C and
    mark 'Reports & Screens'.
    Can there be sometihing similar to this for C865 table as well. Just a thought.

  • Dictionary structures on minisap

    Hi,
    I'm working on Minisap installed on my PC.While writing a program that uses dictionary structures like sy-datum, sy-uname or tables like Mara,the system gives an error as unable to interpret sy-datum etc.
    what is the error?
    pls. help as i'm unable to proceed.
    Thanks in Advance,
    Sipra Jain

    Hi Sipra,
    Have you defined MARA table in Tables definition? If not define like this in ur program.
    Tables: MARA.
    For Sy-Subrc and Sy-datum, Please check in SE11 transaction for SYST table.
    Reward points if it helps you.
    Regards,
    Sudhakar.

  • I have Dreamweaver CS5.5 and all of a sudden I can't open it says XML parsing fatel error.  Invalid Document Structure  What do I do?  Thanks

    I have Dreamweaver CS5.5 and all of a sudden I can't open it says XML parsing fatel error.  Invalid Document Structure  What do I do?  Thanks

    You need to rename the Configuration folder to Configuration_BU.
    The folder can be found by following this http://www.dmxzone.com/go/16740/clearing-dreamweaver-s-cache/

  • Dictionary structure with reference to two transparent tables

    Hi
    I have a question about structures defined as dictionary objects.
    Is it possible to define a dictionary structure consisting of the structure types of two transparent tables, i.e. to define a dictionary type that corresponds to something like this:
    TYPES:
               BEGIN OF ty_s_tablejoin,
                  tab1     TYPE z_table1,
                  tab2     TYPE z_table2,
               END OF ty_s_tablejoin.
    where z_table1 and z_table2 are both transparent tables?
    I need it as a dictionary type in order to pass the structure/table into a function module as an input parameter.
    There might be other ways of doing this, but it could be interesting to know if it is possible. Please excuse me if this is a weird question, I'm rather new with SAP.
    kind regards
    Klaus Stenbæ

    Hi Klaus,
    You can't create a structure in the data dictionary from two tables.  However, you can define tables based on structures then create a structure combining both.
    For example;
    Create structures ZST1 and ZST2 (containing the fields of z_table1 and z_table2 respectively)
    Then create tables z_table1 and z_table2, defining them based on ZST1 and ZST2
    Finally create a structure (say ZST12) combining both ZST1 and ZST2
    From a practical point of view, ZST1 and ZST2 should not contain the client field as when you combine them the field will duplicate.  Add the client field to z_table1, z_table2 and ZST12 before including the structres.
    Hope this helps,
    Nick

  • Find Transparent table name for correspoding Dictionary Structure SRM 7.0

    Hi,
    I am not able to find Transparent table name for correspoding Dictionary Structure in Webdynpro Component for a field in  SRM 7.0.
    Please let me know.
    Thanks,
    Monica

    Hi Monica
    please tell the transaction name and the name of field seen in webdynpro
    regards
    andrea

  • What/how to deliver multiple TOCs?

    I'd like to use the first 'chapter/book' of my WebHelp (FH7) project as a Quick Start Guide and I think I can do it with a separate TOC.
    I figured out how to do that part. But what I don't understand is, after I generate my project using the 2nd TOC, what/how do I deliver to the developers? They'll need both.

    Hi again
    Indeed it does mean you will end up with two different help systems. The name may be the same because you will place them in different folders.
    You may wish to think about creating a merged setup. Fortunately, fellow Adobe Community Expert Peter Grainge has some excellent information on his site about all that.
    Click here to visit Peter's site
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • ModelNode and Java Dictionary structures

    Hi all,
    when working with Models it seems it is not possible to bind the context to a java-dictionary-structure, right?
    But if I want to use dictionary-structures, for example because I want to set an "output-format" or a "max-length-constraint", then I have to copy the data somehow into valueNodes and valueAttributes, right?
    Or am I completely on a wrong track?
    Josef

    Josef,
    you're right. model-nodes (-attributes) can't be changed in any way. but you can create (new) model-nodes that are created to (model)dictionary-structures.
    if you want to maintain the attributes like "max-length" you have to create your own dictionary objects, because the model-attributes are derived from the backend.
    kr, achim

  • How to access Dictionary Structure in web dynpro(Where are you GS?) ?

    i had made one person Structure in Local dictionary.
    i had already this type of value node in my context.
    now i want to make an object of that type by code
           IPersonElement person =wdThis.wdGetContext().createPersonElement();
    Then it is giving me error <i><u>type can not be resolved</u></i>.
    Please Help Me....
    Regards
    Sunny.

    I am learning WebDynpro from tutorials i have
      in that once they said me to create three views.
             1.Start View
             2.Table View.
             3.Detail View.
    In start view 's context there are four elements
          Variable Name               Type
      1. First_Name                    String
      2.Last_name                      String
      3.Date_Begin                     Date
      4.Date_End                        Date
    then In Controller 's Context I had also created all above elements with same type.
    then i mapped all views with controller 's context.
    start view 's all elements i map with contoller 's context.
    then  i had created one structure in local data dictionary.
    Name of Structure is Person.
    and all above four attributes are also there.
    Now i create one value node in Table View  type of that is person.
    now i had also created binding of table with first_name and last_name.
    then in coding
    <i>
    Public Void onPlugfromStartView( )
    //@@begin onPlugfromStartView(ServerEvent)
    String firstname =
    wdThis.wdGetExc_UIController().wdGetContext().
    currentContextElement().getCmpCtx_firstname();
    String lastname =
    wdThis.wdGetExc_UIController().wdGetContext().
    currentContextElement().getCmpCtx_lastname();
    Date date_begin =
    wdThis.wdGetExc_UIController().wdGetContext().
    currentContextElement().getCmpCtx_dateBegin();
    Date date_end =
    wdThis.wdGetExc_UIController().wdGetContext().
    currentContextElement().getCmpCtx_dateEnd();
    IPersonElement person =
    wdThis.wdGetContext().createPersonElement();
    <u><b>Above line is giving me Error that person can not be resolved</b></u>
    person.setFIRSTNAME(firstname);
    person.setLASTNAME(lastname);
    person.setDATE_BEGIN(date_begin);
    person.setDATE_END(date_end);
    wdThis.wdGetContext().nodePerson().addElement(person);
    //@@end
    </i>
    Please Help Me Sir.

  • What is the normal file structure and how do I "cut"?

    I just did a clean Yosemite install from a manually backed up external due to HDD issues.  When I backed up the original drive I copied my user folder into a folder named"backup".  When I did the new Yosemite install, I directed it it migrate my documents from that folder.  Now when I click on the standard "documents" folder on the left, I get a sub folder named "backup".  What should I see? My name folder myname/ or the sub folder under that like music/movies/etc.
    also,  how do I "cut" the folders to move them instead of copy?  I tried dragging them but I have 1.8 TB used of a 3 TB drive so I get a messeage there is not enough room to copy.  "Cut" is greed out when I select folders.
    any input appreciated ....

    How did you make the original backup?
    Dragging items in the Finder is not a good way to backup - it can miss may important files and it can skip files (or fail mid process with cryptic errors).
    Also how did you 'migrate' the folders back - did Migration Assistant do it for you or did you manually move the files?
    Finder can 'move' items instead of copying them, but there is an inherent risk in this process if the move fails mid-way through.
    Begin dragging files to another disk, the cursor will show a green plus , hold command & that green plus goes away - this will now move instead of copy. The behaviour varies depending on if you are copying onto another disk or not. press the modifiers to see what the cursor indicates (cmd, alt, will alter the behaviours).
    To see a 'normal home' folder create a new user account in System preferences > Users & groups. Then login as that user.  By default you have the following items in a user account…
    Desktop
    Documents
    Downloads
    Movies
    Music
    Pictures
    Public
    Sites (will not exist on newer installs)
    I suspect it may be simplest to delete the current botched attempt & empty the trash, go back to the original disk & re-copy the items into the correct folders. You will need to be careful though Finder is not a good tool for large file copies, and permissions can get in a mess, ask if you wan't instructions on how to repair the user permissions after the account is back in order.
    Note: Carbon Copy Cloner, SuperDuper! or even Disk Utility are better tools than Finder to use for backing up.

  • How to bind data (from database) to the Dictionary structure in Web Dynpro

    Hi,
    I am getting Hashtable object from the database related classes and I want to bind this data to the Dictionary field in Web Dynpro. So, I can bind this Dictionary field type to the Context variable.
    Please let me know the detailed procedure.
    Thanks
    Tatayya M

    Tatayya,
    Look at this sample tutorial , It will defintely help you with the Data Dictionary .
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/bad3e990-0201-0010-3985-fa0936d901b4
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/38650ecd-0401-0010-10a0-f9d8fd37edee

  • What dictionary to see how long a job has run??

    Hi, all.
    I would like to check how long a job has run.
    dba_scheduler_job_run_details.LOG_DATE - dba_scheduler_job_run_details.ACTUAL_DATE
    = the time a job has run.
    Is this right?
    Thanks and Regards.

    Dear Chandra.
    Thanks for your reply.
    Have a good night.
    Best Regards.

  • ABAP Dictionary structure for use in ABAP Mapping

    Hello, I'm creating an ABAP mapping class which requires me to use standard ABAP dictionary (table) structures (ex.MARA, KNA1 etc) for the mapping as the data coming into the mapping is in that format. I'm creating the ABAP class in the PI server and do not have table structures (MARA, KNA1 etc) in the dictionary in the PI server. What is the efficient way to create these structures (as Z elements) in the PI server's dictionary?
    I have the XSD of these table structures. Can I import those XSDs into the ABAP dictionary in PI servers? If yes, how can it be done? Please help!

    Yes you can import it as an external definition data and create the data type based on this XSD. Go through the link below for more information on the steps to import and how to use it.
    http://help.sap.com/saphelp_nwpi71/helpdata/en/26/9e97b0f525d743882936c2d6f375c7/frameset.htm

Maybe you are looking for

  • Looking into starting a business using creative cloud and business catalyst

    Hi, I am just looking for a bit of clarification on a few things. I am looking at using Creative cloud and Business Catalyst for a new business. Firstly, if I have both a Mac and a PC, will one creative cloud subscription allow me to install on both?

  • Configuring additional mailbox in Outlook 2011 (Mac)

    After adding the additional mailbox in Outlook 2011 (for Mac), sent items are saved either in 'Sent' folder for the main mailbox (Sender Mailbox in OWA) or in 'Sent' folder for main and additional mailboxes (Sender and From mailboxes in OWA). Option

  • Can you report on aggregares? If so whats the scenario?

    Can you report on aggregares? If so whats the scenario?

  • WebUtil AS_TO_CLIENT Problem

    <9iDS 9.0.2 RedHat 8.> I am running a procedure from a shared library, pretty much copied from Frank Nimphius' RUN_REPORT_OBJECT_PROC procedure. This library, and the WEBUTIL library, as well as the WEBUTIL object group is attached to my form. If I c

  • 4 port switch to 8 port 1GB, iMac loses ethernet cable

    We are getting prepped for an upgrade from our 10MB internet service to 1GB fiber.  We were trying to do the easy things first, but have run into an unexpected problem. We use a 4 port switch to distribute our current DSL signal to several locations