SQL Query on MDM API

Someone know how can i make the next query using the MDM Api? How can i make this sentence using classes as FreeFormTableParameters, FreeFormFieldParametes...?
SELECT FIELD1, FIELD2 FROM PRODUCTS WHERE FIELD1="HELLO"
I dont speach english good... Sorry about that.
Thanks!

Hi Giancarlo,
something like this:
        TableId mainTableId = new TableId(1);
        // Define the result
        ResultDefinition rd = new ResultDefinition(mainTableId);
        // select all records
        Search search = new Search(mainTableId);
        // retrieve the records
        RetrieveLimitedRecordsCommand limitingCommand = new RetrieveLimitedRecordsCommand(connections);
        limitingCommand.setSession(sessionId);
        limitingCommand.setResultDefinition(rd);
        limitingCommand.setSearch(search);
        //limitingCommand.setPageSize(10);
        try {
            limitingCommand.execute();
        } catch (CommandException e) {
            e.printStackTrace();
            return;
        System.out.println("Record count is " + limitingCommand.getRecords().getCount());
// To get fields....
Record[] rec= limitingCommand.getRecords().getRecords();
For i to rec.length
RecordId objrecId = taxoSubClassRecs<i>.getId();
Hope this help you.
Regards,
Vito

Similar Messages

  • How to Create Resource Object in OIM through SQL queries or OIM APIs

    Hello,
    I have to create few (100) resource Objects in OIM. I was creating manually through Design console one by one. In future we might need to create many more Resource Objects .It takes lot of time if we do it through Manually.
    Is there any possiblity we can create Resource Objects through SQL query or OIM APIs ???
    Thanks!!

    Yes. I do it all the time.
    If you are using 11G 11.1.1.3
    Go here
    http://fredforester.org/code/xmlstarters/
    Download the files.
    RESCFORM.xml is an example resource built from the template
    buildtemplate.sh is a shell script that creates a resource from the template
    index.php - you dont need this
    templateresource.xml - this is the template resource. it was created by building a simple resource with all its basic tasks and components then editing it and renaming things so I can find them with sed
    to create Resource C you would
    ./buildtemplate.sh RESCFORM "Resc Resource" "Resc Process"
    you would end up with a file called RESCFORM.xml where when imported would have
    UD_RESCFORM
    Resc Resource Resouce Defintion
    Resc Process Process Defition with basic tasks pointing to a dummy adapter.
    You can optionally create your own prepop so it will get assigned to the form when you import.
    Good luck

  • Help Required -- Can we use SQL Query to READ data from SAP MDM Tables

    Hi All,
    Please help.........
    Can we use SQL Query to READ(No Creation/Updation/Deletion  just Read) Data from SAP MDM tables directly, without using MDM Syndicator.
    Or direct SQL access to SAP MDM tables is not possible. Only through MDM Syndicator can we export data.
    Thanks in Advance
    Regards

    All the tables you create in Repository comes under A2i_CM_Tables in Database named as your repository name. So the tables names are fields of table A2i_CM_Tables. Now i tried it but cant make it.
    Now, I dont think its possible to extract all fields in tables and there values using select query. May be pure sql guy can do that or not.
    But there is no relation of data extraction and syndicator. Data is viewed in Data Manager. and you can also store data in a file from DM also.
    BR,
    Alok

  • API to retrieve SQL query from a Webi Document

    Hi,
    Which API can be used to retrieve the Oracle SQL query for a webi report using BO XI web services SDK? The report is connected to a Oracle database in the backend.
    A sample code is greatly appreciated.
    Thanks a lot!
    Liz

    Hi Liz,
    The libraries for the Enterprise and Report Engine SDKs are included with your Enterprise installation and the location will vary with each version:
    XI Release 1 and Release 2
    XI Release 1 (assuming it's installed on C:\):
    - Windows: C:\Program Files\Common\3.0\java\lib
    - Linux/UNIX: (INSTALL_DIR)/java/lib
    XI Release 2:
    - Windows: (INSTALL_DIR)\Business Objects\Common\3.5\java\lib
    - Linux/UNIX: (INSTALL_DIR)/java/lib
    There are quite a few JAR files in this location, but you should only need the following set for Enterprise & REBean with XI Release 1 or XI Release 2:
    From the java\lib directory
    - boconfig.jar
    - cecore.jar
    - celib.jar
    - ceplugins.jar
    - cereports.jar
    - cesession.jar
    - ceutils.jar
    - cexsd.jar
    - corbaidl.jar
    - ebus405.jar
    - jtools.jar
    - keycodeDecoder.jar
    - rebean.common.jar
    - rebean.fc.jar
    - rebean.jar
    - rebean.wi.jar
    - rpoifs.jar
    - Serialization.jar
    - URIUtil.jar
    - wilog.jar     
    From the java\lib\external directory:
    - Concurrent.jar
    - freessl201.jar
    - icu4j.jar
    - jaxrpc.jar
    - jsafe.jar
    - log4j.jar
    - pullparser.jar
    - saaj.jar
    - sslj.jar
    - xbean.jar
    - xercesImpl.jar
    - xml-apis.jar
    BusinessObjects Enterprise XI 3.0
    - Windows: (INSTALL_DIR)\Business Objects\Common\4.0\java\lib
    - Linux/UNIX: (INSTALL_DIR)/java/lib
    You can find a list of required JAR files in the [XI 3.0 Enterprise SDK Developer Guide|https://boc.sdn.sap.com/node/7298].
    Cheers,
    Parin
    Edited by: Parin Patel on Jun 25, 2008 11:03 AM

  • Abap MDM API query with OR operation

    Hi experts,
    not sure this is the proper section for the thread, anyway; dealing with ABAP MDM API, is there a way to build up a query which involves several clause in OR conjunction?
    This is the scenario: I've got to extract several items on the basis of exact product codes. Tipically, I've got huge vectors of hundreds of product codes; actually, I could easily retrieve data by looping over them and, for each code, perform a query on MDM via QUERY method building the clause as follows:
          ls_query-parameter_code  = 'MDMSRM_PART_NO'. "Field code
           ls_query-operator        = 'EQ'.   "Contains
           ls_query-dimension_type  = mdmif_search_dim_field.      "Fieldsearch
           ls_query-constraint_type = mdmif_search_constr_text.    "Text search 
           lv_text = wa_codes-product_code.
           GET REFERENCE OF lv_text INTO ls_query-value_low.
           APPEND ls_query TO lt_query.
    This will however result in hundreds of query in the LOOP itself.
    Is there any way to build a query with OR operators ?
    Thanks,
    M.

    Hi,
    I see you are not clearing your local structure "ls_query".  This could be reason of problem,  try this and let us know the result:
    DATA lt_query                  TYPE mdm_query_table.
    DATA ls_query                 TYPE mdm_query.
    DATA lv_search_text       TYPE string.
    DATA lt_result_set            TYPE mdm_search_result_table.
    DATA ls_result_set           LIKE LINE OF lt_result_set.
    Fill query structure with FIRST parameter
        ls_query-parameter_code  = 'Name'.
        ls_query-operator        = 'CS'. 
        ls_query-dimension_type  = mdmif_search_dim_field.    
        ls_query-constraint_type = mdmif_search_constr_text.
        lv_search_text = 'BMW'.
        GET REFERENCE OF lv_search_text INTO ls_query-value_low.
        APPEND ls_query TO lt_query.
    CLEAR ls_query.
    Fill query structure with SECOND parameter
        ls_query-parameter_code  = 'Model'.
        ls_query-operator        = 'CS'. 
        ls_query-dimension_type  = mdmif_search_dim_field.    
        ls_query-constraint_type = mdmif_search_constr_text.
        lv_search_text = '2009'.
        GET REFERENCE OF lv_search_text INTO ls_query-value_low.
        APPEND ls_query TO lt_query.
    CLEAR ls_query.
    Query on records (search for value 'BMW' model '2009' in table Products)
        CALL METHOD lr_api->mo_core_service->query
          EXPORTING
            iv_object_type_code = 'Products'                  
            it_query            = lt_query
          IMPORTING
            et_result_set       = lt_result_set.

  • Executing sql query in maviewer 10.1.3 javascript api

    Hi, i want to execute a sql query according to my applications requirement i.e. for retrieving some fields from the oracle database.How to do that? Please someone help me. Thanks.

    Im sorry..
    But how can I use JSP for querying non spatial data???
    Can you give me some example please..
    I've read about doQuery.. but I don't quite understand how to use it.. ^^

  • How to set a sql query time out with jdbc:oracle:thin

    should i change the JDBC driver with jdbc:oralce:XA:thin or other driver with XA?

    SQL query timeout may be set with setQueryTimeout.
    http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Statement.html#setQueryTimeout(int)
    A query timeout bug is fixed in Oracle JDBC Drivers release
    10.1.0.2.0 (10g)
    FIXED BUG-2249191
    In the Server Internal Driver, setting the query timeout does not
    +(and likely will never) work. The query execution will not be+
    canceled when the timeout expires, even if the query runs forever.
    Further, after the query returns, the execution of your code
    may pause for the length of the timeout.
    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_readme101020.html

  • How to set fetchsize of sql Query when using Database Adapter.

    Hi All,
    I am using DatabaseAdapter to connect to database and retriving huge amount of data.For improvement in the performance I want to set the "fetchsize" of sql query. I know fetchsize can be preset in Java using Jdbc 2.0 API.Please let me know how to set this value in BPEL when using DBAdapter?
    Thanks
    Chandra

    I talked to the developer of the db adapter - and he told me this feature will be available in BPEL PM 10.1.3 (which is supposed to be production later this year, and a public beta soon). If this is an emergency I would recommend going throug Oracle support and have them file an enhancement for 10.1.2.0.2
    hth clemens

  • SQL Query based BI Pub report - Taking too long to produce the output

    Hi All,
    I was trying to produce a BI Publisher based report through enterprise edition of BI Publisher 10.1.3.4
    Its a sql query based report and it has around 20 columns and it has around 1 lakh records.
    The query actually takes only 2 seconds to execute in the database but when we execute from BI Publisher it takes a long time and also it times out most of the time
    Is there something I am missing in the configuration options ?
    Thanks
    Shasi

    I am facing the same problem as well. I am using the Publisher Web service API to run a report with 1 Million records. This report is configured to use OBIEE. It takes a lot of time to generate the report ( around 30 Mins) and even though OBIEE generates the data, my web service client either timesout. Even after increasing the timeout, a 500 internal server error is thrown . Does anyone know of a solution to this.
    Thanks

  • Sql query not execute

    Hi Forum
    i made an application which run on JRun server.
    In many of my jsps i used sql query like this:
    " select id, name, rollno from student where add = 'jj';"
    and retrieve the record from resultset like this:
    rs.getString("id");
    rs.getString("name");
    rs.getString("rollno");
    I got no error.
    BUT WHEN I RETRIEVE THE RECORDS LIKE THIS
    rs.getString("name");
    rs.getString("id");
    rs.getString("rollno");
    i got the error:
    java.sql.SQLException: [Oracle][ODBC]Invalid column number <1>.
    I can not understand what is the problem ?
    all the datatypes are correct.
    all coding is correct.
    and everything is correct.
    pls help me & suggest a solution.
    is there any problem of jdbc API OR of JRUN SERVER SETTINGS?
    thanks
    mail me at [email protected]
    Arvind Goel

    I would advise against ever using SELECT * - the order of the columns is undetermined so you're bound to hit this problem sooner or later. Besides, it assumes the column names and you know what happens when you assume things...
    I would recommend retrieving only the columns you need, in the order you want them and to call ResultSet.getXXX for each of the columns, in order.

  • How to add a parameter to sql query in report

    Hi
    How to add a parameter to sql query in report.
    Parameter is from Visual studio
    example:
    select * from tab1 where dl=parameter???
    I have VS 2008 prof CR XI R2, mysql

    Hello,
    If you have this API available then you can modify the record selection formulae in code to add filtering:
              string recordSelectionFormula = "{T_INV_RPT_ADDR.IND_PROMUS} = {?P_PROMUS?} AND {T_INV_RPT_POINT.INVOICE_DATE} = DATE(2008, 05, 31) AND {T_INV_RPT_POINT.CHECKOUT_DATE} = date(2008, 04,29)";
                CrystalDecisions.CrystalReports.Engine.ReportDocument.RecordSelectionFormula = recordSelectionFormula;
    You have to format and follow the rules as in the Designer so not too much work to get this to work.
    CR for .NET may not have the ability so you will need to upgrade to a Developer version of Crystal Reports.
    Thank you
    Don

  • SQL query in adapter process task

    Hi all,
    I am building a custom connector with its bunch of adapters.
    In one of the adapters, i need an auto increment number and therefore i have built an SQL sequence in the DB. Is there a way to use the tcDataProvider variable mapped to the adapter database reference to execute an sql query and retrieve the number? What other ways may i have to accomplish this task?
    thx in advance

    i've found the jar containing the tcErrorReceiver class. But now i get this exception
    + Thor.API.Exceptions.tcAPIException: Error while getting utility Thor.API.Base.tcUtilityOperationsIntf +
    +     at Thor.API.tcUtilityFactory.getRemoteUtility(tcUtilityFactory.java:433) +
    +     at Thor.API.tcUtilityFactory.getUtility(tcUtilityFactory.java:330) +
    +     at FirstAPITest.main(FirstAPITest.java:46) +
    below is my code.
    +public static void main(String[] args) {+
    +          System.setProperty("XL.HomeDir", "/home/alex/workspace/OIMSignatureClient"); +
    +          System.setProperty("java.security.auth.login.config","/home/alex/workspace/OIMSignatureClient/config/authwl.conf"); +
    +          System.setProperty("java.security.policy","/home/alex/workspace/OIMSignatureClient/config/xl.policy"); +
    +          try{ +
    +               System.out.println("Startup..."); +
    +               System.out.println("Getting configuration..."); +
    +               ConfigurationClient.ComplexSetting config = +
    +                    ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer"); +
    +               System.out.println("Login..."); +
    +               Hashtable env = config.getAllSettings(); +
    +               tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","Technology0"); +
    +               System.out.println("Getting utility interfaces..."); +
    +               tcBaseUtility mBaseUtil = (tcBaseUtility) ioUtilityFactory.getUtility("Thor.API.Base.tcUtilityOperationsIntf"); +
    +               tcDataProvider databaseReference=mBaseUtil.getDataBase(); +
    +               +
    +          }catch (Exception e){ +
    +               e.printStackTrace(); +
    +          } +
    +          System.exit(0); +
    +     } +
    +} +
    any ideas?
    Edited by: Prorad on Dec 17, 2010 6:48 AM

  • How to run recordset SQL query in FORM DATA event

    How can I run recordset SQL query in FORM DATA event upon clicking on Add button in the document?

    Hi Slamet,
    When you receive a form data event you have a class containing inside it a ObjectKeys xml info regarding the object added/modified,...
    With the objects keys you can then use the DI API method called GetByKeys to obtain the DI Object.
    There is some information about it in the SDK Help file, mainly in the "FormDataEvent" class definition:
    <i>The event provides the unique ID (BusinessObjectInfo.ObjectKey) of the modified business object. You can use the value of this property as an input parameter in the DI API DataBrowser.GetByKeys method to get a DI object.</i>
    Pay attention you don't have this information in the Before=True event of the Add as it is not yet in the database.
    Hope it helps
    Trinidad.

  • How to obtain the transformed SQL query using SEM_MATCH

    Dear all,
    Is it possible to get the transformed relational SQL query when using the SEM_MATCH prefix, by querying directly on the database. We are able to obtain the relational SQL query using Joseki/Jena, however this is not the way to go for us. We would like (if possible) to get it straight from the oracle database by logging or something.
    Kind regards.
    Max

    Hi Max,
    Just to clarify. What SEM_MATCH prefix are you talking about?
    A SEM_MATCH based query is indeed a SQL query as SEM_MATCH is a SQL table function. So if you don't want to go through Java APIs or web service endpoint, then running SEM_MATCH directly should give you what you need. Or maybe you just want to see the underlying generated (from SEM_MATCH) SQL query. If that is true, can you please tell us why?
    Thanks,
    Zhe Wu

  • 401 Unauthorized after too many tables in AXL SQL Query

    Hi...
    I have an app that sends several AXL calls. All work fine with the exception of one accessing MGCP data via the AXL SQL QUERY command. I have found that if I only do a couple of tables it works fine, but if I had in more than 3 I get a 401 unauthorized return. Now, I know the commands are built correctly becuase its working for every other command in the set and like I said if I only do 3 or less tables the query works. Also, if I SSH into the CM locally and do run sql with the full command, it returns all tables fine, which leads me to believe this is a restriction in the return of the axl soap call...
    Help?
    I am using CM 6.0. The full query being passed in that returns 401 unauthorized is:
    SELECT MGCP.pkid, MGCP.DomainName, TypeProduct.Name AS GatewayProduct, CallManagerGroup.Name AS CallManagerGroup, MGCPSlotConfig.Slot, TypeMGCPSlotModule.Name AS UnitModule, MGCPSlotConfig.Subunit AS SubUnitIndex, TypeMGCPVic.Name AS SubUnitProduct, TypeMGCPVic.MaxNumPorts, MGCP.VersionStamp, MGCP.SpecialLoadInformation FROM TypeMGCPVic RIGHT OUTER JOIN MGCPSlotConfig ON TypeMGCPVic.Enum = MGCPSlotConfig.tkMGCPVic LEFT OUTER JOIN CallManagerGroup RIGHT OUTER JOIN MGCP ON CallManagerGroup.pkid = MGCP.fkCallManagerGroup LEFT OUTER JOIN TypeProduct ON MGCP.tkProduct = TypeProduct.Enum ON MGCPSlotConfig.fkMGCP = MGCP.pkid LEFT OUTER JOIN TypeMGCPSlotModule ON MGCPSlotConfig.tkMGCPSlotModule = TypeMGCPSlotModule.Enum ORDER BY MGCP.DomainName, MGCPSlotConfig.Slot, UnitModule DESC, MGCPSlotConfig.Subunit"
    Again, this works locally on the CM machine, it works if I pull back some of the tables... The AXL trace logs do not have errors, they just stop (with a return soap call that isnt passed back because 401 is recieved).
    Thanks!

    Here is the trace log. The return is there! It just never gets recieved.
    2008-05-22 09:50:23,458 INFO [http-8443-Processor23] axl.AXLRouter - <?xml version="1.0" encoding="UTF-8"?>http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">http://www.cisco.com/AXL/API/6.0" xmlns:xsi="http://www.cisco.com/AXL/API/6.0" sequence="1">67a5af3c-878b-8dd3-2865-ca3ca007d2c22811-Test-VG1Cisco 2811Sub-Pub0NM-4VWIC-MBRD0VWIC2-1MFT-T1E1-T111209133478-fb3741a3-bb70-4013-90fa-734bea80f77267a5af3c-878b-8dd3-2865-ca3ca007d2c22811-Test-VG1Cisco 2811Sub-Pub0NM-4VWIC-MBRD1VWIC2-1MFT-T1E1-T111209133478-fb3741a3-bb70-4013-90fa-734bea80f77267a5af3c-878b-8dd3-2865-ca3ca007d2c22811-Test-VG1Cisco 2811Sub-Pub0NM-4VWIC-MBRD2VIC2-4FXO41209133478-fb3741a3-bb70-4013-90fa-734bea80f77267a5af3c-878b-8dd3-2865-ca3ca007d2c22811-Test-VG1Cisco 2811Sub-Pub0NM-4VWIC-MBRD3VIC-4FXS41209133478-fb3741a3-bb70-4013-90fa-734bea80f77243187db4-aa08-2141-a7eb-c865f45c5996Router.atrion.internalCisco 2811Pub-Sub0NM-4VWIC-MBRD0VWIC-2MFT-T121207845753-f4497a98-4ee7-42e7-9770-090898a52ca9eb492b1e-f238-ace9-3ffe-0a7b8765f364test-3845Cisco 3845Pub-Sub0NM-4VWIC-MBRD0VIC2-2MFT-T1E1-E121210884106-fa04b172-efe5-4ca0-9e44-1934af3fa7c6eb492b1e-f238-ace9-3ffe-0a7b8765f364test-3845Cisco 3845Pub-Sub0NM-4VWIC-MBRD1VIC2-2MFT-T1E1-E121210884106-fa04b172-efe5-4ca0-9e44-1934af3fa7c6
    2008-05-22 09:50:23,461 INFO [http-8443-Processor23] axl.AXLRouter - Request 1211393338927 was process in 30ms

Maybe you are looking for

  • Upgrade to 4.0 shows no data found on tabular forms

    Hi, After upgrading from 3.x to 4.0, an application that had many tabular forms is now showing "no data found" in their regions. A few pages work, while many others do not. Strangely enough, if I take the same sql in the source box and create a new p

  • The same filename from a sender to a receiver file adapter - SP14

    Hi Expers, I Have Gone through the link which is given bu Michal. /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 Here My Questions are......... 1.Should we give any file name in the receiv

  • LDAP security authentication in weblogic sp4 (URGENT)

    We have a web application which interacts to the D/B to authenticate a user during our login process. Now we are trying to change the login to LDAP authentication. Here is the List I did on weblogic configuration correct me if this is correct or if a

  • CRM Business package for EP 7.4 system

    Hi, Need to apply CRM Buisness package for CRM 7.0-ABAP stack on a Portal 7.4 system. Please guide me for suitable business packages and respective download link of the same. Can we apply CRM 5.0 business package on the portal system for my scenario.

  • Filters won't work in CS6

    Hello - I would be grateful if someone can help me... In CS6 (Windows 7), I am trying to add filter effects like the Radial Blur....I have created a new layer, applied the effect (the filters are not greyed out like I've heard others complain about).