Localized ordering in Toplink queries?

Is there any way to define a language dependent query in Toplink?
Thanks!

TopLink does not directly provide any support for Oracle Databases localization API. You can, however, register for SessionEvents that will allow you to gain access to the connection after TopLink has acquired it and update the session properties to set the locale.
If you would like to execute specific functions with localization, you can create a custom ExpressionOperator as explained here:
http://download-west.oracle.com/docs/cd/B10464_01/web.904/b10313/queries.htm#1127345
If this is no help, please repost with more specifics and possibly an example of the query in SQL form.
--Gordon

Similar Messages

  • Error while creating local order in MAM

    Hi ,
    I am trying to create local order in MAM2.5, but in the monitor it is giving the error , Business Area required.This field is a mandatory field in R/3, but in client it doesn't specifically ask for it. It can pick it from Equipment or Functional Location in which the order is created. But i am not sure about this.
    I want to know , from where exactly this Business Area field is picked in client,
    Equipment or Functional Location.
    To be more precise can anyone tell me from which class on the client side it picks the value.
    Regards
    Priya Ghosh

    Hi Priya,
    It means backend is customized in the way that Business area is manadatory instead if picking the default.
    Two solutions:
    1. create order with tech. object, business area will be copied from object
    2. change backend customizing:
        spro, Financial Accounting/Business Area/Enable Business Area Balance Sheet
        your company must be DEACTIVATED!
      To find your company: create any order for your workcenter and look through the pages to find which company (and business area) was enetered.
    This is not MAM specific problem but PM/CS issue. You will have the same error returned if try to create similar order directly on the backend.
    Cheers,
    Larissa Limarova

  • Why we do we use TopLink Queries?

    We can make object-queries and data-queries using Java or SQL.
    Why we we invent TopLink Queries? What are the TopLink Queries used for?
    Are they used to replace of Java or SQL queries?
    Thank you

    Generaly i think that TopLink queries are much more specialized then Java queries. So you can use them to cover way more unusual cases. Probably you could do the same with JPA queries and Java postprocessing of results. But it would take more time to write and it wouldn't be as efficient as specialized TopLink queries. For example using ReadAllQuery and addBatchReadAttribute you can have 2 queries instead of 1+n.
    On the other hand you could do the same with SQL but then you would have to transform SQL results to objects with every query and that is not efficient.
    Take a look at javadoc's of *Query classes in oracle.toplink.queryframework there are many hints why different types of Queries exist.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Query related to local Orders (  after it syncs )

    Hi all
    When we create a local Order "NEW" is assigned to the Order id (I know that internally a unique sync key is defined).
    How do i get the corresponding order id after the synchronization without resetting all the data in the client ?
    Thanks
    Vipin

    hello vipin,
    there's no api to do this at the moment. the "real" key
    assigned to your newly created synbo is mapped to your
    deviceid in the middleware. so in your client, all newly
    created syncbo instances have local keys (<100000). now,
    when you try to modify syncbo having these local keys after
    you had uploaded them, the middleware takes care which
    syncbo instance is to be modified by retrieving the real
    global key.
    a simple workaround is to define a semantic field which
    will be updated with the global key that is returned when
    your syncbo is inserted in the backend. if you have worked
    with the contact address sample application (SAP_EXM002),
    the person number field is a semantic key field which is
    assigned with a value on the middleware when the data in
    inserted into the backend. this value is then returned to
    the client and that field is updated. you can define the
    same sort of a semantic key field for the global synckey.
    regards
    jo

  • MAM 2.5 - Update Non local orders via MAM25_001

    Hi all
    Since there's only possible in MAM25 standard to update local created orders(correct me if I'm wrong), I wonder if anyone have attempted a workaround for this.
    What I want to do is simply to change the Service order longtext in the backend from MAM.
    For local orders I simply edit via standard edit screen which uses MAM25_001 and child segment 060 for this. I attempted a quick and dirty fix and  bypassed the Edit mode checks in order_detail.jsp but that didn't work of course.
    Could someone please point me on the right correction here!
    Best Regards!
    Mikael
    Ps And I will attend a MI class soon!   Ok!  Ds

    Thank you for your answer Larissa
    I don't think the text is changeable even in application.      Opps!!
    So if define some custom fields(or use some unused fields perhaps) for my text described in the enhancement guide and implement the appropriate BADIs the bypass trick could work you mean? The change bapi will be called even for global orders during sync?
    Unfortunately I can't test this until the end of next week when I'm at my client site.
    Best regards!
    Mikael
    Message was edited by:
            Mikael Björndahl

  • Order By on toplink queries.. how to?

    Greetings
    I use jdev 10.1.3 to create my apps. I also use toplink. I have the default findAll methods that I use to read an entire table into a list. I can then write a comparator and sort the list. My question is there a way to do effectively an order by? While i was googling around I saw an "order" tab on a graphic screen capture of toplink workbench. I dont have toplink workbench, is it better / different than what is in jdeveloper? Also, I tried looking for where to download it and wasn't able to find it.
    Is there maybe some paramater I can put in the following line to specify and ordering?
    (List<PlLoginPrefixes>)session.executeQuery("findAllPlLoginPrefixes", PlLoginPrefixes.class);
    thanks
    troy

    depends on what you want do and what you're background is.
    Business components are more datacentric:
    - easier to start with from the point of view of a database developer
    - when business rules are implemented in the database
    - when there are multiple applications to work with the same data
    Whereas Toplink is more focused on objects:
    - easier to start with from the point of view of a java developer with less database knowledge
    - when there are no business rules in the database
    - when there is only one application to interact with your database
    Toplink is also said to be faster in querying because of object caching, but the downside is a greater chance of corrupt data when the connection is unexpectedly lost( worst case is power failure).
    So the best choice depends on your knowledge and the scope of your project.
    Kind regards,
    Nemata

  • Wrong order of sql queries

    Hello,
    I have an application working properly except for one thing.
    The commands I do are in order:
    1. Register first employee (new object)
    2. Register second employee (new object)
    3. Register company (new object)
    4. Associate employees with company via company.addEmployee(object) {
    if (object instanceof Employee) {
    ((Employee) object).setCompany(this);
    this.getEmployees().add(object);
    5. Commit unit of work
    The sql commands are all perfect, with inserts and updates needed. The problem is: Toplink is making an UPDATE of a ROW that is still not inserted. It updates the second employee with the Company_Id before Toplink executes the insert of the employee.
    Here is the SQL:
    INSERT INTO CONTATOS (ID, EMAIL, HOMEPAGE, TP_CONTATO) VALUES (63, '[email protected]', 'www.inflor.com.br', 'PJ')
    INSERT INTO PESSOAS_JURIDICAS (CNPJ, NOME_FANTASIA, RAZAO_SOCIAL, ID) VALUES (NULL, 'Inflor', 'Inflor Consultoria e Sistemas', 63)
    INSERT INTO CONTATOS (ID, EMAIL, HOMEPAGE, TP_CONTATO) VALUES (123, '[email protected]', NULL, 'PF')
    INSERT INTO PESSOAS_FISICAS (CPF, NOME, RG, PESSOA_JURIDICA_ID, ID) VALUES (NULL, 'Aline', NULL, NULL, 123)
    UPDATE PESSOAS_FISICAS SET PESSOA_JURIDICA_ID = 63 WHERE (ID = 123)
    UPDATE PESSOAS_FISICAS SET PESSOA_JURIDICA_ID = 63 WHERE (ID = 124)
    INSERT INTO CONTATOS (ID, EMAIL, HOMEPAGE, TP_CONTATO) VALUES (124, '[email protected]', 'www.pablo.com', 'PF')
    INSERT INTO PESSOAS_FISICAS (CPF, NOME, RG, PESSOA_JURIDICA_ID, ID) VALUES ('08555041708', 'Pablo', '1383371', NULL, 124)
    INSERT INTO TELEFONES (DDD, NUMERO, ID, TIPO, DDI, CONTATO_ID) VALUES (27, '32331289', 42, 'RES', 55, 124)
    INSERT INTO TELEFONES (DDD, NUMERO, ID, TIPO, DDI, CONTATO_ID) VALUES (27, '32257115', 43, 'COM', 55, 124)

    public PessoaFisica inserirPessoaFisica(String nome, String email, String homePage,
    String rg, String cpf, Session parentSession) {
    UnitOfWork uow = parentSession.acquireUnitOfWork();
    PessoaFisica clone = null, pf = new PessoaFisica();
    pf.setNome(nome);
    pf.setEmail(email);
    pf.setHomepage(homePage);
    pf.setRg(rg);
    pf.setCpf(cpf);
    pf.setId(uow.getNextSequenceNumberValue(PessoaFisica.class));
    clone = (PessoaFisica) uow.registerNewObject(pf);
    uow.commit();
    return clone;
    public PessoaJuridica inserirPessoaJuridica(String email, String homePage, String razaoSocial, String nomeFantasia,
    String cnpj, Session parentSession) {
    UnitOfWork uow = parentSession.acquireUnitOfWork();
    PessoaJuridica clone = null, pj = new PessoaJuridica();
    pj.setEmail(email);
    pj.setHomepage(homePage);
    pj.setCnpj(cnpj);
    pj.setRazaoSocial(razaoSocial);
    pj.setNomeFantasia(nomeFantasia);
    pj.setId(uow.getNextSequenceNumberValue(PessoaJuridica.class));
    clone = (PessoaJuridica) uow.registerNewObject(pj);
    uow.commit();
    return clone;
    public Telefone inserirTelefone(Contato contato, Integer ddi, Integer ddd, String numero, String tipo, Session parentSession) {
    UnitOfWork uow = parentSession.acquireUnitOfWork();
    Contato contatoClone = (Contato) uow.registerObject(contato);
    List telefones = contatoClone.getTelefones();
    if (telefones == null) {
    telefones = new LinkedList();
    Telefone clone = null, tel = new Telefone();
    tel.setDdd(ddd);
    tel.setDdi(ddi);
    tel.setNumero(numero);
    tel.setTipo(tipo);
    tel.setContato(contatoClone);
    tel.setId(uow.getNextSequenceNumberValue(Telefone.class));
    clone = (Telefone) uow.registerNewObject(tel);
    telefones.add(clone);
    contatoClone.setTelefones(telefones);
    uow.commit();
    return clone;

  • Help with toplink queries

    Hello,
    I really hope that someone has encountered this problem before.
    I have a table that is keyed by following three Varchar Keys:
    PURPOSE_NAME VARCHAR
    GROUP_NAME VARCHAR
    IV_TYPE VARCHAR
    I have a class that has only three attributes defined, namely:
    purposeName
    groupName
    IVType
    I am mapping this class to the table, all columns Direct to Field. I have defined all these three attributes as key fields in the mapping.
    I have a toplink query that does the selection of the rows in the table by PURPOSE_NAME.
    When I look at the log file, it shows me that a SQL statement was run, which was something like this:
    'SELECT GROUP_NAME, IV_TYPE, PURPOSE_NAME FROM IV_TYPE_GRP_MBR WHERE (PURPOSE_NAME = ?)'
    It also says binding attribute DRMWKSTN
    But there are no rows to be displayed !!!
    I changed the query not to have any selection (WHERE clause) and it shows all the data.
    I am baffled. I have tried different options. SQL Plus shows me all the data, Toplink Log shows me the right query, but there is no data shown.
    Has anyone encountered this issue before?
    Thanks for any help.
    Regards,
    Neeraj

    In answer to your question, no I have not encountered this before. However I have a few suggestions:
    Add an integer PK field to the table and to the Object. It is good database design to have a primary key. Toplink works best when the PK field is a sequential integer. It will work with other types of PK, but ints are easiest.

  • Order of execution of Queries in Workbook

    Hi,
    Am facing a problem wherein there is a mismatch between the order in which queries are embedded in the workbook and the order in which they are executed.
    For ex- query A is embedded in sheet1 and query B in sheet2. However, while executing the workbook, the system prompts query B for input first and query A later, this should other way round.
    What are the possible reasons for this and their resolution ?
    Thanks in advance.
    Saurabh Diwakar

    Hi,
    Normally in workbook, the last inserted query will be refereshed first.. this is the behaviour..
    Check the below thread as well.
    Re: Query Execution Order
    Regards,
    Siva.

  • PO and Order

    This might be really dummy question:
    Which table(s) can I see how many orders were created for a particular PO? And what's the PO status (if that exists)?
    Thank you.

    Check follwoing 2 links to my blog , I have listed complet queries.
    http://eoracleapps.blogspot.com/2009/05/queries-for-internal-requisition-and.html
    http://eoracleapps.blogspot.com/2009/04/oracle-order-to-cash-queries.html
    [email protected]

  • Error on Purchase Order - Document number 45* not within defined interval

    Hi All,
    PLEASE HELP ME or guide me in the right direction.
    I am faced with a somewhat unique case in our enviroment. Some background first.
    Back in 2000 when we upgraded from Walker to SAP, a number of Purchase orders had to be migrated, one of them is the order i am struggling with. Back then very little validations were built in, resulting in a Local Order being incorrectly created as a International Order but against a local currency.
    Now this ordered is still being reflected as open in our system. When attempting to change the order by activating the 'Delivery Complete indicator", we get an error "use only foreign currency" This is due to the fact that validations against Document Type and Currency was created in 2003 and are in full operation now. It is hard coded thus i can not remove this easily.
    Now when attempting to get around this by changing the Document Type to a Local Purchase order or trying to delete a line, we get the error below.
    "Document number 45* not within defined interval"
    Number ranges do come to mind based on the error description, however, Local Orders have a number range of 45, International Orders have a number range of 47. In this case, the order is created as a International Order BUT the number range is 45*, again, due to a lack of validations/incorrect config back in 2000
    Do any of you know a possible solution to such a problem.
    Regards,
    Jody Ponnusami.

    The validation of document type and currency is not standard, and if this validation cannot be deactivated, then you will have to resort to making changes in debug mode. Put a breakpoint at the relevant check and force it to accept the current combination.
    The second option is to update EKPO table manually using SE16N. Set the delivery completed indicator to X.

  • Line Details are not shown in an order

    I am working on oracle EBS india local order management and we have recently
    applied a Patch
    *11i_ATG_PF_H_delta_7 (RUP 7)*
    *6i Developer*
    Jre plugin
    We have a customization that we insert orders from our custom table to our Order Interface.
    It was working fine from last 1 years.
    Suddenly after applying the above patch,we noticed that Pricing information (Price list name) didn't get populated in some Orders.
    And orders remained in Entered State.
    The orders are not too specific,it happens with any of the customer and any of the order Type.
    Yes, the Work around for this is we can manually insert the Price list name in Orders lines and then can Booked the order
    But to remove this manually intervention,i need your help.
    If Anybody ever had faced such problem like this,Please share your views.
    Edited by: Anshul Sharma on Feb 9, 2012 10:31 PM

    any help ??
    Samier Danish Rachel Tang Mohamed Abd elrazek Mohamed PRASOON AK Rob Burbank LAXMIKANTH Patnaik Anders Jensen
    Thanks

  • How to get primary keys in some order with joins?

    Hi, I build BBS using BDB as backend database, forum database, topic database and post database share one environment. This BBS web application is multi-thread program. If user selects one forum, its topics will be listed in order of last reply time;selecting one topic, posts are listed in order of reply time as well.
    struct forum {
    UInt16 forumID;
    string forumName;
    string _lastPoster;      // who is the last one replied in this forum
    struct topic {
    UInt32 topicID;
    UInt16 forumID; // topic comes from this forum
    string title; // topic title
    UInt64 dateOfLastReply; // when last reply to this topic happen
    struct post {
    UInt64 postID;
    UInt32 topicID; // post comes from this topic
    string title; // post title as of topic
    UInt64 dateOfPost; // when this post is created
    I create one primary database and two secondary databases for topic, primary key is topicID, secondary key are forumID and dateOfLastReply respectively, and I want to show 1st 25 topics in latest reply time order on the 1st browser page, 2nd 25 topics on the 2nd browser page, and etc.
    if using SQL, it will be: SELECT topicID FROM topic WHERE forumID=xx ORDER BY dateOfLastReply DESC
    From performance perspective, I want get all topics id of one same forum, and need them come in reply time order, then retrieve topic one by one based on returned topicID, how can I do this? guess I have to use joins.
    Plus, do you have any suggestion about retrieval performance given the fact that topics retrieval will happen each time browser want to request the next page, that is, 2nd 25 topics of this forum?
    Is DB_DBT_MULTIPLE helpful to me?
    thanks.
    Edited by: tiplip on 2011-1-22 上午5:43
    Edited by: tiplip on 2011-1-22 下午5:52
    Edited by: tiplip on 2011-1-23 下午7:42

    Hi tiplip,
    Bellow I will describe how you can support "SELECT * FROM table WHERE X = key ORDER BY Y" queries using Berkeley DB, which, as you suspected, should be done by using a composite index.
    First of all, think of Berkeley DB as the storage engine underneath an RDBMS. In fact, Berkeley DB was the first "generic data storage library" implemented underneath MySQL. As such, Berkeley DB has API calls and access methods that can support any RDBMS query. However, since BDB is just a storage engine, your application has to provide the code that accesses the data store with an appropriate sequence of steps that will implement the behavior that you want.
    If you have two indices in SQL, each on a single column (call them X and Y), and you do:
    SELECT * FROM table WHERE X = key ORDER BY Y;then there are three plausible query plans:
    (1) scan the whole table, ignore both indices, filter by X = key then sort by Y;
    (2) use the index on Y to scan all rows in the required order, filter by X = key;
    (3) use the index on X, find the matching rows, then sort by Y.
    There are cases where (1) would be fastest, because it has all of the columns from one scan (the other query plans will do random lookups on the primary for each row). This assumes that the data can fit into memory and the sort is fast.
    Query plan (2) will be fastest if the selectivity is moderate to high, looking up rows in the main table is fast, and sorting the rows is very slow for some reason (e.g., some complex collation).
    Query plan (3) will be fastest if the selectivity is small (only a small percentage of the rows in the table matches). This should be the best case for us, making it the best choice in a Berkeley DB key/value application.
    The optimal plan would result from having a composite index on (X, Y), which can return just the desired rows in the desired order. Of course, it does cost additional time and space to maintain that index. But note that you could have this index instead of a simple index on X: it can be used in any query the simple index could be used in.
    Records in Berkeley DB are (key, value) pairs. Berkeley DB supports only a few logical operations on records. They are:
    * Insert a record in a table.
    * Delete a record from a table.
    * Find a record in a table by looking up its key.
    * Update a record that has already been found.
    Notice that Berkeley DB never operates on the value part of a record. Values are simply payload, to be stored with keys and reliably delivered back to the application on demand. Both keys and values can be arbitrary byte strings, either fixed-length or variable-length.
    So, in case of a "SELECT * FROM X WHERE id=Y ORDER BY Z" query, our suggestion, from Berkeley DB's point of view, would be for you to use a composite index (as it would be in SQL), where a string created as X_Y should do the trick, as explained in the following scenario.
    Primary:
        X Y
    1 10 abc
    2 10 aab
    3 20 bbc
    4 10 bba
    5 20 bac
    6 30 cbaSecondary:
    10_aab 2
    10_abc 1
    10_bba 4
    20_bac 5
    20_bbc 3
    30_cba 6If the query looks like this:
    'SELECT * FROM primarydb WHERE X = 10 ORDER by Y'the application can run a cursor on the secondary and begin the loop with the DB_SET_RANGE flag on 10. When iterating with DB_NEXT, this will return:
    2 10 aab
    1 10 abc
    4 10 bbcThe application must check for the end of the range inside the loop, in this case it should stop when it hits 20_bac.
    As in SQL, retrieving by a secondary key is remarkably similar to retrieving by a primary key and the Berkeley DB call will look similar to its primary equivalent.
    tiplip wrote:
    Plus, do you have any suggestion about retrieval performance given the fact that topics retrieval will happen each time browser want to request the next page, that is, 2nd 25 topics of this forum?As you are concerned about the performance, I think this would be the fastest solution. Of course, you can tune the performance at a later time, after you have the functionality in place. What I think you should do first is to increase the cache size and test with a bigger database page size, and maybe to configure the transactional subsystem (in case you use one).
    If you are not very familiar with how to implement the above in BDB, please read the Guide to Oracle Berkeley DB for SQL Developers, available at: http://www.oracle.com/technetwork/articles/seltzer-berkeleydb-sql-086752.html
    You will also need to be familiar with the following documentation:
    Related documentation pages:
    Secondary indexes - http://download.oracle.com/docs/cd/E17076_01/html/programmer_reference/am_second.html
    Cursor operations - http://download.oracle.com/docs/cd/E17076_01/html/programmer_reference/am_cursor.html#am_curget
    DBcursor->get() - http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/dbcget.html
    DB_SET_RANGE - http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/dbcget.html#dbcget_DB_SET_RANGE
    If my answer helps you with your question, please go ahead and rate it as Helpful or Correct, and the forum thread as answered. For each unrelated question, please create a new forum thread.
    Good luck with building your forum application,
    Bogdan Coman
    PS: If you are a BDB licensed customer, you can also use My Oracle Support (https://support.oracle.com) to visit the KM note 1210173.1, that discusses the same topic.

  • Population of Customer Exit Variables in Web Template Queries

    Hello,
    Desired Scenario:
    I have three Queries: Q1, Q2, Q3, attached to one Web Template in the same order. Queries Q2 and Q3 have exit variables which are populated from the Input Variable of Query Q1 (these customer Exit variables are mandatory,  not available for user input and are populated in STEP=2).
    Problem:
    Sometimes on execution of the template, Q1 is executed first and then the exit variables are populted (which is OK) BUT  sometimes Query Q2 or Q3 is executed first and exit variables don't get populated.
    As such, I am not sure of the order these three queries are executed. Please suggest how do I ensure that Q1 is always executed first, followed by Q2 or Q3.
    Thanks for your suggestions.
    Best Regards,
    Sumita

    Hi,
    The Infoobjects are different in all the three queries. In Q1, the variable is on 0CALWEEK. In Q2, the variable is on XWEEKD (which is reference to 0CALWEEK). IN Q3, it is on XFORWEEK (which is again reference to 0CALWEEK). So, I can't use the same variable in all three queries. But all these variables have to have the Week from to Week To as the input and that input remains same for all three variables.
    To prevent the user from entering this week from & to thrice, we populate the other two in customer exit depending on the value input by the user.
    So, now I want to know the order in which the queries attached to a Web Template are executed.
    Best Regards,
    Sumita

  • Order state being changed automaticaly don't know where

    Hello people!
    After i finished my shopping process i set a state (ORDER_SUBMITTED) for the order, shortly after its state is updated to another automatically i don't know by which component. I have debugged all the components, processors, pipeline chains but it is a mistery. Does anyone have a suggestion what can it be?
    Thanks!

    Did u update order?
    If not : ur local order state submitted as changed by u, but order status at repository level may be different,So at the time of loadorder ATG might be overriding local order with repository order. Which is leading to data lost situation.
    Refer to Design Pattern for Updating an ATG Order | Devon Hillard&amp;#039;s Digital Sanctuary
    Thanks,
    Nitin.

Maybe you are looking for

  • Windows Support software takes forever to download... (iMac 2011)

    hi.. im a newbie on mac OS.. just bought a new imac.. and found out that there's a lot of software for work that i cant use on mac OS ( but i love MAC OS, windows is boring) trying the bootcamp on my imac and it takes forever to download Windows Supp

  • IPhoto '08 prints blank photos

    Since updating to iPhoto '08 on a very new MacBook, when trying to print photos with a Canon Selphy DS810 it only prints blank white pages. In the print dialog it only shows blank photos: http://homepage.mac.com/dsemaya/.Pictures/iphoto.png I can pri

  • HT201413 Apple Application Support

    Whenever i try opening iTunes, a message pops up to say "Apple Application Support was not found. Error 2 (Windows error 2)"

  • Report for cost centers when using MVT 261

    Guru's, Most of the request for material for our storerooms are done through a work order and issued out using MVT 261. We're trying to find a report that shows the cost centers used when using MVT 261. I've tried using MB51 and MVT 261 but no cost c

  • Re-installing boot camp

    I have a MacBook Pro (early 2011) running 10.8.5 and Firefox 26.  I currently have BootCamp installed and am running Windows 7 Professional. As time goes on, I am finding that it seems messed up - getting popups (have popups blocked); things I never