Confusion over Native Query Result List

I have this confusion over the field object of a resultList of a Native query. This is because it has contradicted the idea of the books for me.
This is a pure example
@SqlResultSetMapping(name="LoanCapitalization.reportMapping",
columns={
    @ColumnResult(name="policy_number"),
    @ColumnResult(name="policy_holder"),
    @ColumnResult(name="amount"),
    @ColumnResult(name="outstanding_loan"),
    @ColumnResult(name="interest"),
    @ColumnResult(name="amount_to_date"),
    @ColumnResult(name="effective_date"),
    @ColumnResult(name="sub_system_code")
@NamedNativeQuery(name="LoanCapitalization.aggregateStatement", query="SELECT   l.policy_number, l.last_name || ' ' || l.first_name as " +
        "policy_holder, l.amount, c.out_principal_bf as outstanding_loan, c.out_interest_bf as interest, " +
        "SUM (r.repayment_amount) as amount_to_date, c.effective_date, l.sub_system_code FROM loan l JOIN v_latest_capitalization c " +
        "ON l.loan_id = c.loan_id JOIN loan_repayment r ON l.loan_id = r.loan_id WHERE " +
        "c.effective_date BETWEEN ?1 AND ?2 GROUP BY l.policy_number, l.last_name, l.first_name, l.amount, " +
        "c.out_principal_bf, c.out_interest_bf, c.effective_date, l.sub_system_code order by l.sub_system_code, l.last_name",
        resultSetMapping="LoanCapitalization.reportMapping")and
Query query = entityManager.createNamedQuery("LoanCapitalization.aggregateStatement");
        AggregateStatementLoanBalanceReportData data = null;
        List<AggregateStatementLoanBalanceReportData> returnList = new ArrayList<AggregateStatementLoanBalanceReportData>();
        query.setParameter(1, reportCriteria.getFromDate());
        query.setParameter(2, reportCriteria.getToDate());
        List<Object[]> resultList = query.getResultList();
        System.out.println("resultList.size() >>>>>>>>>> " + resultList.size());
        for (Object[] obj : resultList){
            data = new AggregateStatementLoanBalanceReportData();
            System.out.println("(String)obj[1] >>>>>>>>>> " + (String)obj[1]);
            System.out.println("(String)obj[2] >>>>>>>>>> " + (String)obj[2]);
            System.out.println("(String)obj[3] >>>>>>>>>> " + (String)obj[3]);
            System.out.println("(String)obj[4] >>>>>>>>>> " + (String)obj[4]);
            System.out.println("(String)obj[5] >>>>>>>>>> " + (String)obj[5]);
            System.out.println("(String)obj[6] >>>>>>>>>> " + (String)obj[6]);
            data.setPolicyNumber((String)obj[0]);
            data.setName((String)obj[1]);
.......My first shocking surpise is that all the System.out.println() return nulls but
System.out.println("resultList.size() >>>>>>>>>> " + resultList.size()); returned 1.
so can anyone suggest what the problem may be.
Regards,
Michael

I came across your post as I experienced the same problem. As I found no answers I tried different let's say stupid solutions.
The one that solved my problem was to write the name for the @ColumnResult in capitals as I noticed that Oracle transforms the alias column names into capitals. I guess otherwise the mapping doesn't occur correctly.
My example:
@SqlResultSetMappings({
@SqlResultSetMapping(
name = "Customers.searchCustomers",
entities =
@EntityResult(entityClass = Customers.class)
columns =
@ColumnResult(name = "CONTACTDATE"),
@ColumnResult(name = "CONTRACTDATE")
String queryString =
"SELECT c.CUSTOMER_ID, c.LAST_NAME, c.FIRST_NAME, c.OPU, c.CUSTOMER_CORE_ID, " +
"to_char(con.CONTACT_DATE, 'yyyy-dd-mm') AS CONTACTDATE, to_char(contr.CONTRACT_DATE, 'yyyy-dd-mm') AS CONTRACTDATE " +
"FROM CUSTOMERS c " +
"LEFT JOIN CONTACTS con ON con.CUSTOMER_ID = c.CUSTOMER_ID AND con.ACTIVE = '1' " +
"LEFT JOIN CONTRACTS contr ON contr.CUSTOMER_ID = c.CUSTOMER_ID AND contr.ACTIVE = '1' " +
"WHERE c.CAMPAIGN_ID = ?1 AND upper(c.LAST_NAME) LIKE ?2 AND upper(c.FIRST_NAME) LIKE ?3";
query = em.createNativeQuery(queryString,
"Customers.searchCustomers");

Similar Messages

  • Query result list sort order in the Service Manager Portal (2012).

    Hi there,
    I have a setup a user prompt for a request offering in which the values are based on a query results list.  When the user prompt is displayed in the portal the order of the items presented based on my query results list is in reverse
    alphabetical order (Z to A) instead of traditional A to Z.  I can clicked the column header to toggle the sort order, however having to do this is slightly annoying.
    My query results list is based on returning the Department field of a specific criteria of template AD user accounts (which are imported into the CMDB via the AD Connector).
    Where and how is the sort order defined?
    Thanks
    Bryan

    Hi Bryan,
    After a quick test I can see the query results is in a descending order based on the first display column of the query results configuration. In the Request offering wizard I don't see an option for sorting. I don't think it is possible to configure this
    out of the box. 
    But maybe it is possible from a Self Service Portal rendering point of view. Maybe there is a key for it in the settings.xml just like the maximum of query results:
    http://blogs.technet.com/b/servicemanager/archive/2011/11/08/advanced-query-results-customization-for-request-offerings.aspx
    If this is possible I'm also curious to know how! :)
    - Dennis

  • Howto handle persistence API query result list

    Hello.
    I need some advice on how to handle a persistence API query result List since the Object variable returned by the "list.get(i)" method cannot be cast to an EntityClass declared by the EntityClassManager.
    The piece of code below might help you understand my exact problem.
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("SporTakipPU");
    EntityManager em = (EntityManager) emf.createEntityManager();
    Query q1 = em.createQuery( "SELECT d.id, d.date, c.name, c.sirname FROM Log d, Kisi c WHERE d.id = :id AND c.id = :id" );
    q1.setParameter( "id", argument );
    List logList = q1.getResultList();
    Log log = (Log) logList.get(1);
    In this code i cannot cast Object to Log in the last line. Apparently this has something to do with the query.
    Trying to solve this problem i declared two private string variables name and sirname and their set and get methods but this didn't help.
    Thanks...

    Entity Class : ReportView
    ===================
    @Entity
    @Table(name = "dummy")
    public class ReportView implements Serializable {
    @Id
    @Column(name = "id", nullable = false)
    private Integer id;
    // getter , setter
    SessionBean : ReportSessionBean
    ==========================
    public List<ReportView> getReports() {
    Query q = em.createNativeQuery("SELECT ID FROM REPORT", ReportView.class);
    List<ReportView> r=(List<ReportView>)q.getResultList();
    return r;
    JSF / Back Bean : ReportBackBean
    ==========================
    public class ReportBackBean {
    @EJB
    private ReportSessionRemote reportSessionBean;
    /** Creates a new instance of ReportBackBean */
    public ReportBackBean() {
    public List<ReportView> getReports() {
    return reportSessionBean.getReports();
    JSF
    ===
    <f:view>
    <h:dataTable value="#{ReportBackBean.reports}" var="report" border="1">
    <h:column>
    <h:outputText value="#{report.id}"/>
    </h:column>
    </h:dataTable>
    </f:view>
    Regards,
    Telman
    ..

  • Confusion over dbverify output result

    Hello everybody,
    While I am checking dbverify utility command against dmp file I get below result
    $ dbv file=xxx.dmp feedback=100
    DBVERIFY - Verification complete
    Total Pages Examined : 845006
    Total Pages Processed (Data) : 0
    Total Pages Failing (Data) : 0
    Total Pages Processed (Index): 0
    Total Pages Failing (Index): 0
    Total Pages Processed (Other): 0
    Total Pages Processed (Seg) : 0
    Total Pages Failing (Seg) : 0
    Total Pages Empty : 0
    Total Pages Marked Corrupt : 845006
    Total Pages Influx : 117
    Highest block SCN : 0 (0.0)
    But in the Alert log file we are not getting any block corruption error messages such as ora-01578 . So what should I do in this situation.Please advice me.
    Thanx
    Achyot

    Achyot wrote:
    Hello everybody,
    While I am checking dbverify utility command against dmp file I get below result
    $ dbv file=xxx.dmp feedback=100What is dmp file? It is some kind of exp dump or what?
    dbverify is only for checking datafiles.

  • Query Result Filtered using User Roles SCSM 2012 R2 RU2

    Hi,
    I have a Query Result setup in a Request Offering that shows the list of Printers using the Printer CI. We have different sites with printers that start with the site location like MTL. There are no filters in the Query Result. What i did is create a Group
    for each site that has the rule "start with" MTL (other groups have other 3 letter prefix). Then i created a user role for each group and only selected the Printer group for the site and i associated the User Role with our AD Site group called MTL-User.
    i did this for each site. Now when i checked the Request Offering at first, with a user that is part of MTL-User group, it showed only the list of printers that started with MTL. Now today i came to check again and the same user is seeing all the printers
    and not just the ones that start with MTL.
    The User Role i made was based on the Read-Only Operator. I just dont know what the problem is

    Thanks for that link. I had thought of something like that but i found it came to the same thing as just using the filter field that is already available when using a Query Result. I retried using User Roles and figured out that the problem is that my test
    user is only part of the MTL-USER group so when i logged in with him into the portal (cireson Portal btw) i would see the proper result. If i logged in with a actual user that is also part of other groups besides MTL-Users, they see all the printers no matter
    which AD group i define in the User Role. 
    So what i figured was that my group is not getting applied as the filter to the query Result and that the Member section in the User role is only to say who can see the Query result list. But then i have my test user for which this setup works...so im confused
    on what exactly is overriding the results.

  • List of query result in UDF

    Dear all expert,
    I make an UDF and put query to that UDF.  I want to make list of value of that query result is always appear when user click that UDF.
    It's working fine if, the result of query is 2 rows (the list of value is pop up) but if the result only 1 row, the list of value is not show up.
    The purpose to make this UDF and query is to give information to user. So, I need, the list is to show up

    try this
    SELECT T2.DocTotal as 'SPK Value', T0.DocNum 'Payment No', T0.DocDate 'Payment Date', T1.U_Progress, Sum(T1.U_Prog_Val) 'Progress Value', Sum(T1.U_Ret_Val) 'Retensi Value', T0.DpmAmnt 'Down Payment', T0.DocTotal 'Paid', T0.Comments
    FROM OPCH T0 INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OPOR T2 ON T2.DocNum = T1.BaseRef
    WHERE T0.U_SPK = $[$U_SPK.number] and T0.CEECFlag = 'n'
    GROUP BY T2.DocTotal, T0.DocNum, T0.DocDate, T0.Comments, T0.DpmAmnt, T0.DocTotal, T1.U_Progress
    Union All
    SELECT 0,0, 0, '0', 0, 0, 0, 0, '0'
    Edited by: Suraj V on Jul 24, 2009 1:16 PM

  • InfoSet query results confusion...

    HI All,
    We have 2 ODS.  One is Billing and the other is Project Sales.  In the billing ODS we have billing documents that have the billing date (calmonth) and employee.  The projected sales is an ODS that has for each employee for each month, their Projected Sales.
    We have created an InfoSet and linked in the billing ODS the calmonth (in billing) to period field (in Projected Sales) and 0SALESEMPLOYEE (in billing) to PERNR (in Projected) ODS.
    The Projected Sales ODS has exactly 1 entry for each employee for each month.  i.e. employee '12345' for 200501 a projected sales of 10,000.  With the above mapping the query results for projected sales is about 50X more.  In other words, it shows 30 million when it should be 150,000.  I think this has to do with it somehow including results from the billing ODS??
    We've read help about interpreting infoset query results and it's quite confusing.  It speaks of some filter option to exclude query result set, but can't figure it out.
    In addition to the monthly projected sales we want to see for each employee, we want to include all the net sales they had for the same month.  So you can see the mapping we did above.
    Query would look like this:
    Calmonth  Employee  NetSales  ProjSales
    200501    123456    220,000   10,000
    The projected sales is entirely off by millions of dollars and also the net value isn't calculating correctly.  I'm sure out setup is incorrect.
    Can someone help us out please.
    Thanks
    Mike

    Hi Ashish,
    What you explained is exactly what is the case.
    The billing ODS has many, many entries for the for the employee + calmonth combination while the projected sales only has 1.  I've figured out that this is what is happening...multiplying the number of entries in the billing X the Projected Sales.
    Is there a way to avoid this with a particular join in InfoSet? 
    The key for billing ODS has billing number, billing item and fiscal year variant, while the key for projected sales is start period and pernr.  So I don't see how a multiprovider would work because the fields are different...am I incorrect?
    Thanks for your quick reply,
    Mike

  • Is it possible to list out CATALOG ITEMS GROUP in a Query Result of a Request Offering??

    Hi Experts,
    Is it possible to list out  CATALOG ITEMS GROUP as a result of Query Result in Request Offering ?? Because each and every Catalog Items Groups are being created as a SingleTon Child Class of System.CatalogItemGroup. i.e., Each CatalogItemGroup instance
    will have its own singleton class.
    Is it possible to list out all CatalogItemGroup Instances consolidatedly in the QueryResult Window??
    Though the System.CatalogItemGroup class is an Abstract class, I tried to list out the Classinstances via powershell command as below, which lists all catalog group instances, Note: Actually these are instances of SingleTon
    Child Classes
    "Get-SCClassInstance -Class (Get-SCClass -Name System.CatalogItemGroup)"
    But when I configured the QueryResult window with the "System.CatalogItemGroup" class, it doesn't list out any Group instances in the Porta.......
    Am I missing anything, Any suggestions please???
    Thanks and Regards, Narayana Babu

    Thanks Anton, I already tried that too... But it doesn't list out any Group instances in the Portal.
    Since each Catalog Groups are individual Single ton Class instances derived from "System.CatalogItemGroup" class. Therfore If I specify the internal ID of the abstract class "System.CatalogItemGroup" in the tag below, it doesn't list any in the
    Portal.... But if I specify ID of any one of the derived singleton class, it does displays the one instance of that particular class..
    Thanks and Regards, Narayana Babu

  • Capture when finished iterating over query results...

    Hello. I have a flex app that queries a web service. The code
    to iterate over the results is shown below. the query string is
    passed to the connection, and the results are processed inline.
    I want to know when i'm done iterating over the results. How
    do i do this? My current approach seems clumsy. I add an event
    listener to my connection for query complete. When that fires, I
    get the length of the result set. Then in my iterator, i have a
    condition that checks when the record count is equal to the length
    of the result set. i assume there's an easier/better way?
    queryResultIterator2 = new QueryResultIterator(wsconn,
    queryString,
    function (so:SObject):Boolean {
    productCodeAC.addItem(so.Product_Code__c);
    return true;
    thanks
    chris

    Hi Dan
    When i use the cfouput with the group attribute... the query only returns one of the columns from the table for stock spool sizes...
    so the new query results will have 1 part which is good 10 Sol | 31.43 | 1000
    but only 1000 .. when it should return 1000 | 2500 | 5000  based on that wireid
    Thanks

  • Stepping through a query result set, replacing one string with another.

    I want to write a function that replaces the occurance of a string with another different string.  I need it to be a CF fuction that is callable from another CF function.  I want to "hand" this function an SQL statement (a string) like this:   (Please note, don't bother commenting that "there are eaiser ways to write this SQL..., I've made this simple example to get to the point where I need help.  I have to use a "sub_optimal" SQL syntax just to demonstrate the situation)
    Here is the string I want to pass to the function:
    SELECT
      [VERYLONGTABLENAME].FIRST_NAME,
      [VERYLONGTABLENAME].LAST_NAME,
      [VERYLONGTABLENAME].ADDRESSS
    FROM
      LONGTABLENAME [VERYLONGTABLENAME]
    Here is the contents of the ABRV table:
    TBL_NM,  ABRV    <!--- Header row--->
    VERYLONGTABLENAME, VLTN
    SOMEWHATLONGTALBENAME, SLTN
    MYTABLENAME, MTN
    ATABLENAME, ATN
    The function will return the original string, but with the abreviations in place of the long table names, example:
    SELECT
      VLTN.FIRST_NAME,
      VLTN.LAST_NAME,
      VLTN.ADDRESSS
    FROM
      LONGTABLENAME VLTN
    Notice that only the table names surrounded by brackets and that match a value in the ABRV table have been replaced.  The LONGTABLENAME immediately following the FROM is left as is.
    Now, here is my dum amatuer attempt at writing said function:  Please look at the comment lines for where I need help.
          <cffunction name="AbrvTblNms" output="false" access="remote" returntype="string" >
            <cfargument name="txt" type="string" required="true" />
            <cfset var qAbrvs="">  <!--- variable to hold the query results --->
            <cfset var output_str="#txt#">  <!--- I'm creating a local variable so I can manipulate the data handed in by the TXT parameter.  Is this necessary or can I just use the txt parameter? --->
            <cfquery name="qAbrvs" datasource="cfBAA_odbc" result="rsltAbrvs">
                SELECT TBL_NM, ABRV FROM BAA_TBL_ABRV ORDER BY 1
            </cfquery>
         <!--- I'm assuming that at this point the query has run and there are records in the result set --->
        <cfloop index="idx_str" list="#qAbrvs#">      <!--- Is this correct?  I think not. --->
        <cfset output_str = Replace(output_str, "#idx_str#", )  <!--- Is this correct?  I think not. --->
        </cfloop>               <!--- What am I looping on?  What is the index? How do I do the string replacement? --->
            <!--- The chunck below is a parital listing from my Delphi Object Pascal function that does the same thing
                   I need to know how to write this part in CF9
          while not Eof do
            begin
              s := StringReplace(s, '[' +FieldByName('TBL_NM').AsString + ']', FieldByName('ABRV').AsString, [rfReplaceAll]);
              Next;
            end;
            --->
        <cfreturn output_txt>
        </cffunction>
    I'm mainly struggling with syntax here.  I know what I want to happen, I know how to make it happen in another programming language, just not CF9.  Thanks for any help you can provide.

    RedOctober57 wrote:...
    Thanks for any help you can provide.
    One:
    <cfset var output_str="#txt#">  <!--- I'm creating a local
    variable so I can manipulate the data handed in by the TXT parameter.
    Is this necessary or can I just use the txt parameter? --->
    No you do not need to create a local variable that is a copy of the arguments variable as the arguments scope is already local to the function, but you do not properly reference the arguments scope, so you leave yourself open to using a 'txt' variable in another scope.  Thus the better practice would be to reference "arguments.txt" where you need to.
    Two:
    I know what I want to happen, I know how to make it happen in another programming language, just not CF9.
    Then a better start would be to descirbe what you want to happen and give a simple example in the other programming language.  Most of us are muti-lingual and can parse out clear and clean code in just about any syntax.
    Three:
    <cfloop index="idx_str" list="#qAbrvs#">      <!--- Is this correct?  I think not. --->
    I think you want to be looping over your "qAbrvs" record set returned by your earlier query, maybe.
    <cfloop query="qAbrvs">
    Four:
    <cfset output_str = Replace(output_str, "#idx_str#", )  <!--- Is this correct?  I think not. --->
    Continuing on that assumption I would guess you want to replace each instance of the long string with the short string form that record set.
    <cfset output_str = Replace(output_str,qAbrs.TBLNM,qAbrs.ABRV,"ALL")>
    Five:
    </cfloop>               <!--- What am I looping on?  What is the index? How do I do the string replacement? --->
    If this is true, then you are looping over the record set of tablenames and abreviations that you want to replace in the string.

  • Need help on retrieving query result - NPE

    Hi, I could get results with the native query in my TOAD, but I can't get it working in my session EJB. I tried both native query and EJB ql. The query created fine, as soon as I try to retrieve results, it gets stuck.
    My native query looks like this:
    Query query = em.createNativeQuery("select sum(o.amount_reimbursed) from t_expenses o where o.employee_id = '999999911' " +
    "and o.EXPENSE_ID in (select p.expense_id from T_Per_Diem_Xref p where p.expense_Type_Xref_Id=22 " +
    "and p.expense_Id in (select e.expense_Id from T_Expenses e where e.employee_Id='999999911' " +
    "and e.expense_date > to_date('01/01/2011', 'mm/dd/yyyy') and e.expense_date < to_date('12/31/2011', 'mm/dd/yyyy')))") ;
    My EJB query looks like this:
    Query query = em.createQuery("select sum(o.amountReimbursed) from TExpenses o where o.employeeId = ?1 " +
    "and o.expenseId in (select p.expenseId from TPerDiemXref p where p.expenseTypeXrefId=?2 " +
    "and p.expenseId in (select e.expenseId from TExpenses e where e.employeeId=?1 and e.expenseDate>=?3 and e.expenseDate<=?4))");
    query.setParameter(1, employeeId);
    query.setParameter(2, expenseType);
    query.setParameter(3, fDay, TemporalType.TIMESTAMP);
    query.setParameter(4, lDay, TemporalType.TIMESTAMP);
    Either one, I get NPE at the line retrieve result.
    // sumAmt = (Double)query.getSingleResult();
    List list = query.getResultList();
    if (list != null) {
    long longAmt = (Long)list.get(0);
    sumAmt = (Double)list.get(0);
    As you can see, I tried to getSingleResult, or getResultList. also tried to convert the result to Double or Long. None worked.
    Please help and thank you for your time.
    Sophia

    Frank, thank you for your reply. I have this code in my session Facade EJB, and I get the NPE in my backing bean which calls this method. When I debug the code, it appears what really cuases the problem is in this code on the line I try to assign the query result to my variable 'sumAmt = (Double)query.getSingleResult();'. In the debug, when it reaches this line, it starts to give me all kinds of pop-up windows saying couldn't find this file or that file or packages. If I get a stack trace later, I will post it. Right now I am trying to fix something else.
    Thanks, Sophia

  • How to set query result to a single window

    I am using SQL Developer 2.1063, and not happy with the default setting of result window. Everytimes when I run a query, the result appear in a new result window. Over a couple of hour I have tense or hundreds of result tabs in the low window. It is not quite fun to remove them one by one.
    I am sure it can be set so that all result appear in one result window, as I am used to in the old SQ Developer version. But I failed to find it in Prefernces and in Help.

    -K- wrote:
    This is fixed in the available 2.1.1.
    Have fun,
    K. K
    I've just tested on 2.1.1 and i came to the same conclusion as user10369687
    - if you check the box for "Preferences - Database - Worksheet - Automatically Freeze Result Tabs" or click the pin button or run as script (F5) or highlight the sql and run as script (F5) you always get new query result tab.
    The option name suggest that if you check the box the same result tab will be used for different queries which is not true, is the oposite way.
    If the option name is changed than the confusion will be cleared.
    Dani

  • Getting query results from a PL/SQL procedure

    Hi! So, I’m a little stumped and I can’t seem to find the answer to what I believe is probably a simple question…
    So, here goes… I have a big ol’ union query that I use to create a report on a page, it’s about 25k – not over the 32k limit, but fails to be able to compile every time (I always get a 400 – Bad Request error). I’m not sure why this is happening, but I can remove a union statement and it compiles just fine – so it has something to do with the size of the query. ANYWAY – I’ve resolved that I should put this bad boy into the database as a stored procedure and just call it from Apex, my problem is I can’t figure out quite how to do this with variables, etc.…
    Instead of giving you my whole big query, I’ll use the emp table as the concept is the same:
    Say we have a query that creates a report on a page:
    select empno, ename, job, mgr, hiredate, sal, comm, deptno
    from emp
    where job = :P_JOB
    and hiredate >= :P_HIREDATE;
    How would I take this query, create it as a stored procedure on the db, pass the variables from Apex and return the query result set from the stored proc as a report?
    I really appreciate any help on this!
    Best,
    Gilcrest

    Hi Gilcrest,
    You should create the query as a View and use the view name and the WHERE clause in the report's sql source.
    Andy

  • Warning Message in query result as 'Notification Number DBMAN 345'

    Hi ,
    I have a warning message while executing the query
    'Diagnosis
    Currently, it cannot be guaranteed that SIDs and master data exists for all characteristic attributes for the DataStore object to be read.
    There is a restriction on a navigation attribute of the listed characteristic in the query. This filters all characteristic values of the master-data bearing characteristic for which there is not yet master data out of the result.
    For performance reasons, this filtering is unavoidable.
    System Response
    Procedure
    In case of doubt, find other restirctions directly on the characteristic values of the characteristics contained in the DataStore object.
    Procedure for System Administration
      Notification Number DBMAN 345  '
    'i am getting this error because of cutomer exit variables  on navigatioanl attributes of  Omaterial'
    I tried supressing it in  RSRT.. but unable to find the message.
    I tried  debugging and assigning enhancement points in  FM  BAL_LOG_MSG_READ.. As it is standard function module its not suggestable to do..
    can we creat custom FM ?? will it be called if we  write code to supress warning message??
    Please let me know how to use  BADI'S  in order to supress the error message that appearing in query result?
    Thanks All.

    Hi,
    The warning is raised due to the following reasons:
      - you have a selection in the filter of a navigation attribute
      - in your DSO you do not use the option "SIDs Generation upon Activation"
    If the option "SIDs Generation upon Activation" is not flagged,
    you may get char.values for an Infoobject in the system not
    having any SIDs. As a result you may see in the report less data as
    expected.
    For example we have Infoobject A with its Nav.attribute B
      Infoobject A   Nav.attribute B
      12             13   ->> has a SID in the X-table
      11             10
      9              13   ->> has no SID in the X-table
    If you define a selection on B =13 in the query, you only get infoobject
    A with key 12 displayed in the result, since only B =13 has a SID
    in the relevant X-table.
    The warning refers to this behaviour and cannot be avoided unless you:
       - flag the option in the ODS-settings
       - or remove the filter defined on 0MATERIAL__xxxx
    Thanks,
    Venkat

  • Saving query results to a flat file

    Hello Experts!
    We have a very specific issue on our current project and I would like to know if any of you have ever done something similar. We are taking query results from BW (after complex calculations, some based on SY-DATE) and saving them to flat files to transfer to a SQL database structure on the Enterprise Portal. From here, the portal team renders the information into more "static" dashboards that include mouse over features and even limited drilldown (i.e. no matter where a user clicks the report always drills down on profit center)
    There are many reasons why the model is set up as such (mostly training of executive level end users), and even though it doesn't mesh with the idea that BW could do this work on its own, we have to work with what we have.
    We have come up with 3 possible ways to save this data to flat files and hopefully someone can tell us which might be the most effective.
    1.) Information Broadcasting. If we broadcast XML files to the portal, will the portals team be able to read that data into a SQL database? Is there another way to use broadcasting to create and send a flat file to specific location?
    2.) RSCRM_BAPI. This transaction seems to not support texts.
    3.) Open Hub. In order to get the open hub to work, we first have to save all of our query results to direct write data store objects using APD. (calculations based on current date, for example, would require daily full loads to the underlying data providers otherwise.)
    What is the best way to accomplish this? Is information broadcasting capable of doing this?
    Thanks!

    Hi Adam,
    Do you have to use flat files to load the information to a SQL database? (if so maybe someone else has a suggestion on which way would be the best).
    I try to stay away from flat file uploads as there is a lot of manual work involved. May I suggest setting up a connection to your SQL table in the DBCON table and then writing a small abap program to push data into the SQL database (which you can automate).
    1) Use APD to push data into a table within BW.
    2) Go to transaction SM30 > table DBCON and setup a new entry specifying the conncection parameters to your SQL database.
    3) In SE38 Write an ABAP program along the folloing lines (assuming the connection you set in DBCON is named conn1:
    data: con_name like dbcon-con_name
    con_name = 'conn1'.
    exec sql.
      set connection :con_name
    endexec.
    ****have a select statement which reads data from your table which the data is saved from the APD into an internal table**********
    ****loop on the internal table and have a SQL insert statement to insert the records into the SQL table as below******
    exec sql.
    insert into <SQL TABLE> (column names seperated by ,)
    values (column names of the internal table seperated by ,)  if the internal table is named itab the columns have to be specified as :itab-column1
    If you decide to take this approach you may find more info on DBCON and the process in sdn. Good Luck!
    endexec.

Maybe you are looking for

  • How can I install ipad apps on iphone 6 plus?

    How can I install ipad apps on iphone 6 plus?

  • Multiple iDocs in a single file

    Hello, I'm working on some integration to send a purchase order change file into SAP from BizTalk.  Everything works when we send every change as its own iDoc, or when we send all changes for a single PO in a single file, but when we try and include

  • Upgrade to Netweaver causing problem while opening pdf file in the portal

    After an upgrade to Netweaver 4.0, the following code for opening a pdf file constructed from a byte stream passed from an RFC fails. Document doc = new Document(PageSize.A4); javax.servlet.http.HttpServletResponse myResponse = request.getServletResp

  • NEW TO MAC PLEASE HELP

    OK SO I BOUGHT THIS IMAC TODAY WITH 20'screen and i am unable to install anything i download it keeps asking me for a prog to open it with but ive looked everywere and cant find anything. why is it when you download somthin off the net that it does n

  • I have Adobe Creative Suite 5 Master Collection on discs

    My old computer died and I need to install on new Mac - but it has no disc drive.  Can I access the programs without using the discs?