Query object problem

I create a query object and then I'm trying to populate the
object with data, but I get the following error:
"Query objects cannot be modified, they can only be
displayed".
\wwwroot\bracketWinners\publish\publish3.cfm: line 27
25 : <cfset a = evaluate("FORM.#i##j#")>
26 : #a#<br />
27 : <cfset qMatches[ i ][ j ] = a />
28 : </cfloop>
29 : </cfloop>
Here is my code:

Holy cow! Nevermind.

Similar Messages

  • Problem with return a ColdFusion query object from a Java class

    Hi!
    I need to return a ColdFusion query object from a Java class
    using a JDBC result set ( java.sql.ResultSet);
    I have tried to pass my JDBC result set in to the constructor
    of the coldfusion.sql.QueryTable class with this code:
    ColdFusion code
    <cfset pra = createObject("java","QueryUtil").init()>
    <cfset newQuery = CreateObject("java",
    "coldfusion.sql.QueryTable")>
    <cfset newQuery.init( pra.getColdFusionQuery () ) >
    My java class execute a query to db and return QueryTable
    Java code (QueryUtil.java)
    import coldfusion.sql.QueryTable; // (CFusion.jar for class
    QueryTable)
    import com.allaire.cfx //(cfx.jar for class Query used from
    QueryTable)
    public class QueryUtil
    public static coldfusion.sql.QueryTable
    getColdFusionQuery(java.sql.ResultSet rs)
    return new coldfusion.sql.QueryTable(rs);
    but when i run cfm page and coldfusion server tries to
    execute : "<cfset pra =
    createObject("java","QueryUtil").init()>" this error appears:
    Object Instantiation Exception.
    An exception occurred when instantiating a java object. The
    cause of this exception was that: coldfusion/sql/QueryTable.
    If i try to execute QueryUtil.java with Eclipse all it works.
    Also I have tried to return java.sql.ResultSet directly to
    coldfusion.sql.QueryTable.init () with failure.
    Do you know some other solution?

    ok
    i print all my code
    pratica.java execute a query to db and return a querytable
    java class
    import java.util.*;
    import java.sql.*;
    import coldfusion.sql.*;
    public class Pratica {
    private HashMap my;
    private String URI,LOGIN,PWD,DRIVER;
    private Connection conn=null;
    //funzione init
    //riceve due strutture converite in hashmap
    // globals
    // dbprop
    public Pratica(HashMap globals,HashMap dbprop) {
    my = new HashMap();
    my.put("GLOBALS",globals);
    my.put("DBPROP",dbprop);
    URI = "jdbc:sqlserver://it-bra-s0016;databaseName=nmobl";
    LOGIN = "usr_dev";
    PWD = "developer";
    DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
    try{
    // Carico il driver JDBC per la connessione con il database
    MySQL
    Class.forName(DRIVER);
    /* Connessione alla base di dati */
    conn=DriverManager.getConnection(URI,LOGIN,PWD);
    if(conn!=null) System.out.println("Connection Successful!");
    } catch (ClassNotFoundException e) {
    // Could not find the database driver
    System.out.print("\ndriver non trovato "+e.getMessage());
    System.out.flush();
    catch (SQLException e) {
    // Could not connect to the database
    System.out.print("\nConnessione fallita "+e.getMessage());
    System.out.flush();
    //funzione search
    //riceve un hash map con i filtri di ricerca
    public QueryTable search(/*HashMap arg*/) {
    ResultSet rs=null;
    Statement stmt=null;
    QueryTable ret=null;
    String query="SELECT * FROM TAN100pratiche";
    try{
    stmt = conn.createStatement();// Creo lo Statement per
    l'esecuzione della query
    rs=stmt.executeQuery(query);
    // while (rs.next()) {
    // System.out.println(rs.getString("descrizione"));
    catch (Exception e) {
    e.printStackTrace();
    try {
    ret = Pratica.RsToQueryTable(rs);
    } catch (SQLException e) {
    e.printStackTrace();
    this.close();
    return(ret);
    // ret=this.RsToQuery(rs);
    // this.close(); //chiude le connessioni,recordset e
    statament
    //retstruct CF vede HashMap come struct
    //METODO DI TEST
    public HashMap retstruct(){
    return(my);
    //conversione resultset to querytable
    private static QueryTable RsToQueryTable(ResultSet rs)
    throws SQLException{
    return new QueryTable(rs);
    //chiura resultset statament e connessione
    private void close(){
    try{
    conn.close();
    conn=null;
    catch (Exception e) {
    e.printStackTrace();
    coldfusion code
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN">
    <html>
    <head>
    <title>Test JDBC CFML Using CFScript</title>
    </head>
    <body>
    <cftry>
    <cfset glb_map =
    createObject("java","java.util.HashMap")>
    <cfset dbprop_map =
    createObject("java","java.util.HashMap")>
    <cfset glb_map.init(glb)> <!---are passed from
    another page--->
    <cfset dbprop_map.init(glb["DBPROP"])>
    <cfset pra =
    createObject("java","Pratica").init(glb_map,dbprop_map)>
    <cfset ourQuery
    =createObject("java","coldfusion.sql.QueryTable").init(pra.search())>
    <cfcatch>
    <h2>Error - info below</h2>
    <cfdump var="#cfcatch#"><cfabort>
    </cfcatch>
    </cftry>
    <h2>Success - statement dumped below</h2>
    <cfdump var="#ourQuery#">
    </body>
    </html>
    error at line <cfset pra =
    createObject("java","Pratica").init(glb_map,dbprop_map)>
    An exception occurred when instantiating a java object. The
    cause of this exception was that: coldfusion/sql/QueryTable.
    -----------------------------------------------------------------------

  • Query has problem

    Below query has problem .
    Pls see the queries for Usage Summary with Partition and Without Partition
    . I have executed this now so it may be in Buffer …****
    DB Query ... SUM from event objects, bin variables
    SELECT sum(amount) , sum(quantity), event.poid_type,ebal.resource_id,****
    event.service_obj_type, event.service_obj_id0,ebal.
    rate_obj_id0, ebal.OFFERING_OBJ_ID0, ebal.IMPACT_CATEGORY ****
    FROM event_bal_impacts_t ebal, item_t item, event_tevent*
    WHERE event.item_obj_id0 = item.poid_id0****
    AND ebal.obj_id0 = event.poid_id0****
    --                   and event.Poid_id0 >= 266838277921701888****
    --                 and event.Poid_id0 < 267928993456455680****
    --               and ebal.obj_id0 >= 266838277921701888****
    --             and ebal.obj_id0 < 267928993456455680****
    AND item.bill_obj_id0 = 148715294****
    AND ebal.product_obj_id0 = 27433706****
    AND ebal.account_obj_id0 = 146876519****
    AND item.account_obj_id0 = 146876519****
    AND event.poid_type like '%session/telco/gsm%'****
    AND ebal.impact_category <> 'Free'****
    AND resource_id not in (select resource_id from
    resource_id_t)****
    group by****
    event.poid_type, ebal.resource_id,****
    event.service_obj_type, event.service_obj_id0,****
    ebal.rate_obj_id0, ebal.OFFERING_OBJ_ID0,ebal.
    IMPACT_CATEGORY****
    order by****
    ebal.resource_id desc;****
    SELECT sum(amount) , sum(quantity), event.poid_type,ebal.
    resource_id,****
    event.service_obj_type, event.service_obj_id0,ebal.
    rate_obj_id0, ebal.OFFERING_OBJ_ID0, ebal.IMPACT_CATEGORY ****
    FROM event_bal_impacts_t ebal, item_t item, event_tevent*
    WHERE event.item_obj_id0 = item.poid_id0****
    AND ebal.obj_id0 = event.poid_id0****
    and event.Poid_id0 >= 264199450015039488****
    and event.Poid_id0 < 265237388991660032****
    and ebal.obj_id0 >= 264199450015039488****
    and ebal.obj_id0 < 265237388991660032****
    AND item.bill_obj_id0 = 148715294****
    AND ebal.product_obj_id0 = 27433706****
    AND ebal.account_obj_id0 = 146876519****
    AND item.account_obj_id0 = 146876519****
    AND event.poid_type like '%session/telco/gsm%'****
    AND ebal.impact_category <> 'Free'****
    AND resource_id not in (select resource_id from
    resource_id_t)****
    group by****
    event.poid_type, ebal.resource_id,****
    event.service_obj_type, event.service_obj_id0,****
    ebal.rate_obj_id0, ebal.OFFERING_OBJ_ID0,ebal.
    IMPACT_CATEGORY****
    order by****
    ebal.resource_id desc;****
    --

    848478 wrote:
    Below query has problem .
    Pls see the queries for Usage Summary with Partition and Without Partition
    . I have executed this now so it may be in Buffer …****
    DB Query ... SUM from event objects, bin variables
    SELECT sum(amount) , sum(quantity), event.poid_type,ebal.resource_id,****
    event.service_obj_type, event.service_obj_id0,ebal.
    rate_obj_id0, ebal.OFFERING_OBJ_ID0, ebal.IMPACT_CATEGORY ****
    FROM event_bal_impacts_t ebal, item_t item, event_tevent*
    WHERE event.item_obj_id0 = item.poid_id0****
    AND ebal.obj_id0 = event.poid_id0****
    --                   and event.Poid_id0 >= 266838277921701888****
    --                 and event.Poid_id0 < 267928993456455680****
    --               and ebal.obj_id0 >= 266838277921701888****
    --             and ebal.obj_id0 < 267928993456455680****
    AND item.bill_obj_id0 = 148715294****
    AND ebal.product_obj_id0 = 27433706****
    AND ebal.account_obj_id0 = 146876519****
    AND item.account_obj_id0 = 146876519****
    AND event.poid_type like '%session/telco/gsm%'****
    AND ebal.impact_category <> 'Free'****
    AND resource_id not in (select resource_id from
    resource_id_t)****
    group by****
    event.poid_type, ebal.resource_id,****
    event.service_obj_type, event.service_obj_id0,****
    ebal.rate_obj_id0, ebal.OFFERING_OBJ_ID0,ebal.
    IMPACT_CATEGORY****
    order by****
    ebal.resource_id desc;****
    SELECT sum(amount) , sum(quantity), event.poid_type,ebal.
    resource_id,****
    event.service_obj_type, event.service_obj_id0,ebal.
    rate_obj_id0, ebal.OFFERING_OBJ_ID0, ebal.IMPACT_CATEGORY ****
    FROM event_bal_impacts_t ebal, item_t item, event_tevent*
    WHERE event.item_obj_id0 = item.poid_id0****
    AND ebal.obj_id0 = event.poid_id0****
    and event.Poid_id0 >= 264199450015039488****
    and event.Poid_id0 < 265237388991660032****
    and ebal.obj_id0 >= 264199450015039488****
    and ebal.obj_id0 < 265237388991660032****
    AND item.bill_obj_id0 = 148715294****
    AND ebal.product_obj_id0 = 27433706****
    AND ebal.account_obj_id0 = 146876519****
    AND item.account_obj_id0 = 146876519****
    AND event.poid_type like '%session/telco/gsm%'****
    AND ebal.impact_category <> 'Free'****
    AND resource_id not in (select resource_id from
    resource_id_t)****
    group by****
    event.poid_type, ebal.resource_id,****
    event.service_obj_type, event.service_obj_id0,****
    ebal.rate_obj_id0, ebal.OFFERING_OBJ_ID0,ebal.
    IMPACT_CATEGORY****
    order by****
    ebal.resource_id desc;****
    --Consider getting the asterisk key fixed, since it results in invalid SQL syntax

  • Difficulty parsing XML document into query object

    Background: Using CFMX 6.1 to take an XML file exported from
    MS-Access and parse it into a query object.
    Problem: Of the 6 columns defined in the target query, one of
    the columns is only populated in the XML file a very low percentage
    of the time. When trying to populate the column for a record that
    has no volume I was getting the following error:
    Element KEY6.XMLTEXT is undefined in a Java object of type
    class coldfusion.xml.XmlNodeMap referenced as...
    To get around this I made this code change:
    Before
    <cfset temp = QuerySetCell(mcquery, "CuKey6",
    #mydoc.root.dataroot.qTop1000
    .Key6.XmlText#, #i#)>
    After
    <cfif
    StructKeyExists(mydoc.root.dataroot.qTop1000.XMLAttributes,"Key6")>
    <cfset temp = QuerySetCell(mcquery, "CuKey6",
    #mydoc.root.dataroot.qTop1000
    .Key6.XmlText#, #i#)>
    </cfif>
    The new code gets around the error, but when the template is
    executed, columns that DO have values
    show up as "[empty string]".
    I am trying to figure out why when the record has a actual
    value it is now overwritten instead of populated
    normally?

    Use XmlChildren[1], XmlChildren[2],... etc., in place of
    Key1, Key2, etc.

  • Can you use a query object in QOQ Query?

    Hi, I have a component with two functions. One does a query
    and simply returns the query object (getItem), the other function
    in this CFC needs to query this query object by using a QOQ.
    However, it's choking on the part of the "FROM" in the getItemTitle
    function. Am I calling the internal function incorrectly?
    If I dump the results of the getItem function it returns the
    query correctly. So the problem is definately with the QOQ query. I
    have attached my CFC code.
    Thanks,
    Mikey.

    Heya Dan,
    Taking away the #'s doesn't solve it, cos it then throws an
    error about the ()'s I also tried taking them out but no luck.
    Here's my latest code, which STILL gives the same error. I'm
    confused. Porbably missing something really simple here.
    Thanks,
    Mikey.
    <cfcomponent hint="item" displayname="item"
    output="false">
    <cffunction name="init" returntype="item" output="false"
    access="public">
    <cfargument name="itemID" type="numeric" required="true"
    />
    <cfset variables.itemID = arguments.itemID />
    <cfreturn this />
    </cffunction>
    <cffunction name="getItem" returntype="query"
    output="true" access="public" displayname="getItem">
    <cfset var local = {} />
    <cfquery name="local.item" datasource="#request.dsn#"
    username="#request.username#" password="#request.password#">
    SELECT *
    FROM items
    WHERE itemID = <cfqueryparam value="#variables.itemID#"
    cfsqltype="cf_sql_integer" />
    </cfquery>
    <cfreturn local.item />
    </cffunction>
    <cffunction name="getItemTitle" returntype="string"
    output="true" access="public" displayname="getItemTitle">
    <cfset var local = {} />
    <cfset local.itemObject = getItem() />
    <cfquery name="local.item" dbtype="query">
    SELECT itemTitle
    FROM #local.itemObject#
    </cfquery>
    <cfreturn local.item.itemTitle />
    </cffunction>
    </cfcomponent>

  • Query object java method issue

    MyUsernameQuery['userNames'].indexOf('tomjones') will find
    the tomjones
    value in the query.
    BUT:
    MyUsernameQuery['id'].indexOf(99) won't find the numeric
    index value, even
    though it's in the record set.
    BUT WAIT, THERE'S MORE:
    If I manually build a query object with integer values and
    try a similar
    search for the numeric id value,it finds it!
    What's up with that?
    If it was a casting issue, why would it find it in the
    manually built object
    and NOT in the query object?
    I tried casting the integer as a string but no luck.
    I'm in over my head with these methods. Any help much
    appreciated.
    Cheers,
    Lossed
    __when the only tool you have is a hammer, everything looks
    like a nail __

    I should point out that the relative processing speeds are
    dependant upon
    the size of the recordset and position in that recordset of
    the value being
    searching for.
    "Lossed" <[email protected]> wrote in message
    news:eucai4$lhj$[email protected]..
    > It was indeed the casting.
    > I had to cast it as 'long'.
    > There are other ways to find if the value exists:
    > convert column array to list and listfindnocase(), Q of
    Q, loop over
    > query. I was trying to find the fastest. the underlying
    java indexOf()
    > method seems to leave the others in it's dust :).
    >
    > "cf_dev2" <[email protected]> wrote in
    message
    > news:euc51t$epr$[email protected]..
    >>> I'm in over my head with these methods
    >>
    >> Doesn't answer your question, but is indexOf()
    really the only way to get
    >> the
    >> job done? Just wondering if there is an easier way.
    >>
    >> The undocumented stuff is neat, but the java methods
    tend to be stricter
    >> about
    >> object type and case than many of the standard CF
    functions. Two things
    >> may
    >> appear the same but that doesn't mean they are the
    same to java. It can
    >> trip
    >> you up ;)
    >>
    >> That could be the problem with your number column.
    You didn't mention the
    >> column type but some numeric data types don't map to
    a java integer. For
    >> example a biginteger column might map to a java
    long. In which case
    >> searching
    >> for an integer wouldn't work. So it could still be a
    casting
    >> problem
    >>
    >>
    >
    >

  • About query related problem

    hi ,
           we are generate query in 2005b,and procced for execuite query.following problem occure'<b>odbc sql server driver'[sql server] syntax error the converting the nvarchar value' 70302/20307' to column of data type int received alert OAIB</b>
    QUERY SHOWN BE AS FOLLOW.
    SELECT T5.DocNum as'Po. No. ', T5.DocDate as 'Po Date',T0.CreateDate,T5.NumAtCard as 'Man.PO. No/ Dt.', T0.DocNum as'AP No. ', T0.DocDate as 'AP Date',T0.NumAtCard as 'Vendor Ref. No.', T0.U_vbdt as 'Vendor Ref. Date', T0.CardName as 'Vendor', T1.Dscription as 'Item',  T1.Quantity AS 'QTY'  , T1.Price as 'Basic Rate', (T1.Price *T1.Quantity) as 'Value',T0.Comments as 'Po No. & Po.Dt.' FROM OPCH T0 INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN OPDN T3 ON T2.CardCode = T3.CardCode INNER JOIN PDN1 T4 ON T3.DocEntry = T4.DocEntry INNER JOIN OPOR T5 ON T2.CardCode = T5.CardCode INNER JOIN POR1 T6 ON T5.DocEntry = T6.DocEntry INNER JOIN OITM T7 ON T1.ItemCode = T7.ItemCode INNER JOIN OITB T8 ON T7.ItmsGrpCod = T8.ItmsGrpCod WHERE (  T1.BaseRef  =  T3.DocNum )  AND ( T4.BaseRef =  T5.DocNum ) AND (  T0.U_vbdt >=[%25]AND  T0.U_vbdt <=[%26]) AND ( T4.Dscription =T1.Dscription ) AND ( T4.Dscription = T6.Dscription  ) AND  (( T1.Dscription=[%0] OR T1.Dscription=[%1] OR T1.Dscription=[%2] OR T1.Dscription=[%3] OR T1.Dscription=[%4] OR T1.Dscription=[%5] OR T1.Dscription=[%6] OR T1.Dscription=[%7] OR T1.Dscription=[%8] ) OR ( T0.CardName=[%10] OR T0.CardName=[%09] OR T0.CardName=[%27] OR T0.CardName=[%28] ) OR ((  T8.ItmsGrpNam =[%11]  oR T8.ItmsGrpNam =[%12] OR T8.ItmsGrpNam =[%13] OR T8.ItmsGrpNam =[%14] OR T8.ItmsGrpNam =[%15] OR T8.ItmsGrpNam =[%16] OR T8.ItmsGrpNam =[%17] OR T8.ItmsGrpNam =[%18] OR T8.ItmsGrpNam =[%19] ) and  ( T7.U_FirmName =[%20] OR T7.U_FirmName =[%21] OR T7.U_FirmName =[%22] 
    oR T7.U_FirmName =[%23] OR T7.U_FirmName =[%24] )) )

    Hi Vishal,
    the value '70302/20307' is not an whole number so converting it to an int is not possible.
    You should check your data for this value an change your query or data.
    Regards
    Ad

  • Query designing problem while applying cell properties

    Hello Experts,
    I have a problem while designing query. Problem is as follow:
    I have a calculated field on key figure column. This key figure calculates variance between 2 columns.
    for E.g I have 2 columns Budget and Actual and third column is %Variance which should be          
    1. ((Actual - Budget)/Budget) *100 or
    2. ((Budget -Actual)/Budget)*100, depening on some values on the row i should use any of these 2 formulas but the result should be dispalyed in single column % Variance.
    how can i change the formula in key figures depending on these conditions. I can achieve this by applying cells but i dont want to do so as it is very complex way to desing these queries.
    also let me know applying cells on query affects its performance or not?
    Regards,
    Nirav

    Hi Nitin,
    Your reply may help me.
    But my exact requirement is not that. Requirement is as follow:
    I have created Char. Structure in row which contains few rows as revenue and few rows as expense.
    I created them by creating selections. Now in case of expense the variance should be                (Budget-Actual)/Budget *100.
    In case of revenue variance should be (Actual-Budget)/Budget *100.
    So, here i have to find out revenue & expense char. iresspective of which one is greater.
    Regards,
    Nirav

  • How to enhance Dynamic Query Object TerrSearch (Territory Management)?

    Hello Friends,
    In the TerrSearch dynamic query object, There are 2 fields Territory_ID and Level_ID. Now i have a requirement to Enhance the Search object using the new field called TERRITORY PATH ID. using which we can search all the entities not only for the terrritory level which we have selected (for example we have assigned the value '01' to LEVEL_ID) but also all the below territory levels of selected territory level.
    If we enhance the search object structure CRMST_TMIL_SEARCH (structure of TerrSearch object) using AET to add the Z field called TERRITORY_PATH_ID then which is the suitable BADI where we can add the necessary code to select all the entities based on all the territory levels below the selected territory level.
    Please guide me friends how to enhance the TerrSearch object.

    Hi friend,
    Try using MACRO and dynamic WHERE condition.
    Group simialr Select statements under a Macro.
    Build a dynamic where by checking conditions
    Call macro passing dynamic where condition.
    TABLES afpo.
    DATA: str TYPE string.
    *Macro definition
    DEFINE operation.
      select single *
           from afpo into afpo
           where (&1).    " Dynamic condition
    END-OF-DEFINITION.
    *Build dynamic WHERE by checking some conditions
    *If conditon 
    CONCATENATE 'AUFNR = ''000000700008''' 'AND POSNR = ''0001''' INTO str SEPARATED BY space.
    *Else
    CONCATENATE 'AUFNR = ''000000700008''' 'AND POSNR = ''0002''' INTO str SEPARATED BY space.
    *Endif.
    *Call Macro passing dynamic WHERE condition
    operation str.

  • Translation of all query objects

    Hello,
    We have a requirement to translate all the query objects in 10 languages and this needs to be done for many queries. So manual translation of all the query objects is not a feasible solution.
    We have checked the table RSZELTXREF and it seems that we are getting all the query elements belonging to the multiprovider. Although all these objects are not present in the text table RSZELTTXT. So we are not able to identify all the text elements belonging to certain query.
    It would be nice if someone can help with any quick method for translating the texts for all query elements.
    Thank you.
    Prithwish

    Actually links are not suppose to be asked in SCN. Since you asked, I am giving you now..I have simply searched with the title which I gave you in SCN search and got it.
    How To Translate Business Intelligence Objects (NW7.0)

  • Query object in main page available to iframe?

    Hello, everyone.
    What is the best way to make a query object in a document available to an iframe (with a .cfm file as the source of the iframe) in that document?
    Thanks,
    ^_^

    >> So, which is best, Application scope, or Session scope?
    If the data is user specific, then probably the session scope. Performance-wise, either one should be fine.
    >> And will a simple CFSET SESSION.VariableName = CFQUERYOBJECT work?  I didn't think a simple variable could contain a complex object?
    What makes a variable simple or complex is its content. 
    <cfset session.key = 1 /> Creates a simple variable
    <cfset session.key = structNew() /> Creates a complex variable
    Yes, session.key = queryObject will work just find.

  • BOL Search/Query Object for Schema Search!.

    Hi All,
    I have to do search for categorization schemas, as the first step I opened the standard schema search component ( GS_MCAT ) and found that the Dynamic Search Object responsible for the same is:   'MC_DynaQSchemaByAttributes'.
    Now, I have 2 questions 4u
    1.  If I run the BOL browser by giving the component set as 'all' I couldnt see this query!. how can I find
    this in BOL/MODEL browser
    2. Is there any standard BOL Search/Query Object on which I can perform a search on Schema based on the product assigned at the categorization level!.
    Any help/hint highly appreciated!,
    Thanks in Advance, Sudeep..

    Also solved.
    As SAP tends to confuse people with the "ALL" component set, ...
    I debugged the "CL_CRM_CATEGO_GENIL" class. Here's the component set you need to load:
        lv_core->start_up( 'ONEORDER' ).

  • Enhancing a Dynamic Query Object

    Hi All,
    I've added a new field to the contract header using the EEWB, I then added the field to an append on the dynamic query object BTQSrvCon. The entry in CRMC_REPDY and the BADI implementation of BADI CRM_RF_SEARCH_EEW have been created automatically.
    This is working fine when I use the 'IS' separator on the search screen and enter the field exactly.
    I would like to use the dynamic query separators (contains, starts with etc.) but when I try I get the error message
    Search contains fields where wild card search is not allowed
    Has anyone implemented this functionality?
    Thanks,
    Gregor

    The range operator is in the generated code:
    method IF_EX_CRM_RF_SEARCH_EEW~EXTEND_RF_QUERY.
    INCLUDE crm_object_names_con.
    DATA: lv_fieldname       TYPE name_komp,
           ls_qupart          LIKE LINE  OF ct_quparts,
           ls_qupart_and      LIKE LINE  OF ct_quparts,
           ls_range_value     TYPE crmt_bsp_range.
    READ TABLE it_range_value INDEX 1
       INTO ls_range_value.
    IF sy-subrc <> 0.
       RETURN.
    ENDIF.
    CHECK NOT ls_range_value-low IS INITIAL.
    CALL METHOD cl_crm_report_qupart=>get_qupart_by_token
       EXPORTING
         iv_token  = 'AND'
       IMPORTING
         ev_qupart = ls_qupart_and-querypart.
    lv_fieldname = flt_val.
    CALL METHOD cl_crm_report_qupart=>get_qupart_by_token
       EXPORTING
         iv_entityname = gc_objectname_reporting-ORDERADM_H
         iv_fieldname  = lv_fieldname
         iv_token      = 'RAN'
         it_rangetab   = it_range_value
       IMPORTING
         ev_qupart     = ls_qupart-querypart.
    APPEND ls_qupart     TO ct_quparts.
    APPEND ls_qupart_and TO ct_quparts.
    endmethod.
    I've put a break in the code which is not being triggered so something may be up with the BADI implementation.

  • Query object

    Hi Experts,
    I am really stuck on this issue now.
    I am trying to get an attribute of BuilMarketing object(Industry attribute) on my lead screen corresponding to the prospect selected.
    I am using query object for this.I am writing this code in the event handler EH_ONSEL_PROSPECT(I have redefined it).I am writing such code for the first time and i m really stuck.I am getting syntax error:
    Method "GET_PROPERTY_AS_VALUE" is unknown or PROTECTED or PRIVATE.     
    Is my approach correct.
    Please help me!!!     
    method EH_ONSEL_PROSPECT.
    CALL METHOD SUPER->EH_ONSEL_PROSPECT
      EXPORTING
        HTMLB_EVENT    = HTMLB_EVENT
       HTMLB_EVENT_EX = HTMLB_EVENT_EX
    DATA : industry(4) type c,
           query_service      TYPE REF TO  cl_crm_bol_dquery_service,
           query_result        TYPE REF TO if_bol_entity_col,
           lr_builheader       TYPE REF TO cl_crm_bol_entity,
           lv_builbc           TYPE REF TO if_bol_entity_col,
           lr_partnerno        TYPE string.
    query_service = cl_crm_bol_dquery_service=>get_instance( 'BuilHeaderAdvancedSearch' ).
      IF query_service IS BOUND.
        CALL METHOD query_service->add_selection_param
          EXPORTING
            iv_attr_name = 'PARTNER'
            iv_sign      = 'I'
            iv_option    = 'EQ'
            iv_low       = lr_partnerno.
        query_result = query_service->get_query_result( ).
        lr_builheader = query_result->get_first( ).
        endif.
    CHECK lr_builheader IS BOUND.
        lv_builbc = lr_builheader->get_related_entities( iv_relation_name = 'BuilMarketingRel').
    lv_builbc->get_property_as_value( EXPORTING iv_attr_name = 'INDUSTRY'
                             IMPORTING ev_result    = industry ).
    call method lv_builbc->set_property (iv_attr_name = 'INDUSTRY' iv_value = ev_result ).
    endmethod.

    the query object implements a lot of interfaces, including "DataSource":
    So best way is retrieve the Query object is by using the MDRoot: this one has a lookup method, which can be used to "load" the query object. afterwards you can assign it to a crosstab,graph,etc...
    regards,
    thomas

  • Ora-00942 when querying object privs

    Hi, I have a OEM 9.2 accessing an Oracle 9.2 instance. When querying object privs I get error 942. All else works OK. I have 07_dictionary_accesibility=true and the OEM user has DBA and select any dictionary privs. oms.nohup does not show anything unusual neither dbsnmp.log . Any ideas?

    there will still be some sys objects that may throw this

Maybe you are looking for