Error in query with setWuereClauseParam

Hi!
I have a ViewObject that contains this query:
SELECT *
FROM ENTIDADES Entidades
WHERE (EXISTS (select null    
                    from accesos_entidad accEnt    
                    where ? = accEnt.entidad_id   
                    and accEnt.entidad_id_habilitada = Entidades.entidad_id    
                    and accEnt.tipo_entidad='CLIENTE'
          )In an Action class i do:
ViewObject vo= getAppMod().findViewObject("EntiVO");
vo.setWhereClauseParam(0,"2");
vo.executeQuery();but i have an error "Missing IN or OUT parameter at index:: 1"
why???
please help..
Thanks!!!!

i did an expert mode view like this:
select empno
, ename
from emp
where exists
select 'x'
from emp_reports
where report_year=?)
and used it in a data forward action like this:
public void onSetCurrentRowWithKey( DataActionContext ctx )
     System.out.println("onSetCurrentRowWithKey-Start");
     // do this event
     invokeEventAction( ctx );
    DCBindingContainer bc = ctx.getBindingContainer();
    DCIteratorBinding iter = bc.findIteratorBinding("ViewEmpReportsDueView1Iterator");
    Row parent = iter.getCurrentRow();
    ViewEmpReportsDueViewRow empRptDueRow = (ViewEmpReportsDueViewRow) parent;
     String strReportYear = empRptDueRow.getReportYear();
     AppModule am = (AppModule) getApplicationModule("AppModuleDataControl", ctx );
     ViewObject vo = am.findViewObject("EmpReportLookupExpertView1");
     vo.setWhereClauseParam(0, strReportYear );
     vo.executeQuery();
     Row r = vo.first();
     if (r!=null) {
        System.out.println( r.getAttribute("Empno") );
     System.out.println("onSetCurrentRowWithKey-End");
and it worked ok - no errors.

Similar Messages

  • Error in query with COUNT expression and Group By Clause

    Hi
    I have this query that when run gives me the following error:
    SQL command not properly ended:
    The code is as below:
    SELECT
              st_enrollment.student_id ,
              ce_family_member.last_name ,
              st_enrollment.grade_level ,
              ce_family_member.DATE_OF_BIRTH ,
              ce_family_member.GENDER,
              at_hourly_attendance_records.ABSENCE_REASON_CODE,
              at_hourly_attendance_records.CALENDAR_DATE,
              COUNT(st_enrollment.student_id) AS days_absent
              FROM
                      at_hourly_attendance_records,
                      ce_family_member,
                      st_enrollment
              WHERE
              st_enrollment.student_id = at_hourly_attendance_records.student_id
             AND ce_family_member.student_id = st_enrollment.student_id
                AND st_enrollment.school_id = 705
                AND st_enrollment.school_year = 2006
                AND st_enrollment.district_number = 1000
                AND at_hourly_attendance_records.ATTENDANCE_STATUS = 'A'
                AND at_hourly_attendance_records.CALENDAR_DATE < '16-MAR-06'
              GROUP BY st_enrollment.student_id,
                       ce_family_member.last_name
                         st_enrollment.grade_level ,
                         ce_family_member.DATE_OF_BIRTH ,
                         ce_family_member.GENDER,
                         at_hourly_attendance_records.ABSENCE_REASON_CODE,
                         at_hourly_attendance_records.CALENDAR_DATE;
           All suggestions are gratefully acknowledgment, Thanks in advance

    Thanks a lot. In fact I discovered it myself and I am immensely grateful to you for pointing the error..

  • Error in query with COUNT expression

    Hi
    I have a query that returns an error as follows:
    "Column Ambiguously defined"
    the code is as follows:
    SELECT
              ce_family_member.student_id ,
              ce_family_member.last_name ,
              st_enrollment.grade_level ,
              ce_family_member.DATE_OF_BIRTH ,
              ce_family_member.GENDER,
              at_hourly_attendance_records.ABSENCE_REASON_CODE,
              at_hourly_attendance_records.CALENDAR_DATE,
              COUNT(at_hourly_attendance_records.student_id) AS days_absent
              FROM
                      at_hourly_attendance_records,
                      ce_family_member,
                      st_enrollment
              WHERE
              st_enrollment.student_id = at_hourly_attendance_records.student_id
             AND ce_family_member.student_id = st_enrollment.student_id
                AND st_enrollment.school_id = 705
                AND st_enrollment.school_year = 2006
                AND st_enrollment.district_number = 1000
                AND at_hourly_attendance_records.ATTENDANCE_STATUS = 'A'
                AND at_hourly_attendance_records.CALENDAR_DATE < '16-MAR-06'
              GROUP BY student_id; All help is highly appreciated. Thanks very much in advance

    Hi
    I followed your suggestion. But I still get an error as follows:
    Not a Group By Expression. And it points to the second line (ce_family_member)
    SELECT
              st_enrollment.student_id ,
              ce_family_member.last_name ,
              st_enrollment.grade_level ,
              ce_family_member.DATE_OF_BIRTH ,
              ce_family_member.GENDER,
              at_hourly_attendance_records.ABSENCE_REASON_CODE,
              at_hourly_attendance_records.CALENDAR_DATE,
              COUNT(st_enrollment.student_id) AS days_absent
              FROM
                      at_hourly_attendance_records,
                      ce_family_member,
                      st_enrollment
              WHERE
              st_enrollment.student_id = at_hourly_attendance_records.student_id
             AND ce_family_member.student_id = st_enrollment.student_id
                AND st_enrollment.school_id = 705
                AND st_enrollment.school_year = 2006
                AND st_enrollment.district_number = 1000
                AND at_hourly_attendance_records.ATTENDANCE_STATUS = 'A'
                AND at_hourly_attendance_records.CALENDAR_DATE < '16-MAR-06'
              GROUP BY st_enrollment.student_id; Thanks a lot for your kind suggestions

  • A Query with LOB's requires OCI8 mode, but OCI7 mode is used

    Hello all,
    I am using Oracle 10g. We have two tables and in that, in one table i have a Long Raw Column and in the other table i have a BLOB field. When i use the select query to fetch the details from the table with Long Raw field it is working fine and at the same time if i use the select query on the table with the BLOB field it is giving me an error
    'A query with LOB's requires OCI8 mode, but OCI7 mode is used.'
    Please help.
    Thanks.
    Vinodh. S

    Hi Oleg,
    I think your client machine is not setup to connect to the Database. Run the Oracle Net8 Assistant or the Net8 Easy Config to connect to the Database.
    This should work.
    Samuel.
    PS: I need someone to answer my question, please

  • Error while trying to Execute the Query with Customer Exit

    Hi Experts,
           I am having a Query with Customer Exit, it is working fine for all the Employess, except for one. When i try to remove the Customer Exit it is working for her too. Below is the error i am getting.
    system error in program SAPLLRK0 and form RSRDR; CHECK_NAV_INIT_BACK
    Thanks,
    Kris.

    Hello Kris,
    Are you working with multiprovider? Please check if OSS notes 813454,840080 or 578948 are applicable in your case.
    Regards,
    Praveen

  • Error in query " Value '' of characteristic  is not a number with  spaces "

    Hi Gurus,
    I am facing an error in a query with the description:
    Error
    Value '' of characteristic  is not a number with  spaces
    System error in program SAPLRRK0 and form RSRDR;SRRK0F30-01-
    Description
    This error is occuring in Production system only, the report is running fine in Development environment.
    The error is also visible when I execute it in RSRT, I am not able to find the cause of error through RSRT.
    Can anyone please help me with the possible solutions.
    Thanks & Regards,
    Shreyas

    Hi Juergen,
    thanks for the input, I tried to run the report after loading the master data but still there was no improvement.
    I am not sure why this kind of problem is rising, some of the similar reports on same infoprovider are running fine.
    Please let me know if you know anything about the cause of error.
    Thanks & Regards,
    Shreyas

  • An error occurred querying a data source - with REST services

    Hi,
    I have a SharePoint 2013 form library library with an info-path form. I need to get the logged in user's 'Display Name' on my form load automatically.
    I used REST service to fetch the current user details. In the preview mode of the form, its showing the right name. But when I publish this form to library I am getting the following error.
    REST Service --> http://site url/_api/SP.UserProfiles.PeopleManager/GetMyProperties
    Please help me to resolve this issue.
    Thanks in advance for your time and reply :)

    Hi,
    According to your post, my understanding is that an error occurred querying a data source with REST services.
    It is defiantly permission issue with GetUserProfileByName service
    and could be many reasons of this problem. You first try with UDCX file and make sure that UPS is running.
    Here are some similar threads for your reference:
    http://social.technet.microsoft.com/Forums/en-US/b8c668ea-7511-4657-a1a8-08fb4a6bd53d/info-path-an-error-occurred-querying-a-data-source?forum=sharepointcustomizationprevious
    http://social.technet.microsoft.com/Forums/en-US/46866ac2-da09-4340-a86a-af72cbb2c8d7/info-path-an-error-occurred-querying-a-data-source-?forum=sharepointcustomization
    http://blogs.msdn.com/b/russmax/archive/2012/08/17/want-to-call-sharepoint-2010-web-services-within-browser-based-infopath-2010-forms.aspx
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Error when opening a BW query with Crystal Reports

    Hi all,
    I am having problems when opening a BW query with Crystal Reports, the strange thing is that it only happens with
    the bo user I have created. If I use a user that already exists and that has SAP_ALL authorization it works.
    I don't know if this could be an authorizations issue, but I have created a role with all the authorizations stated in the manual.
    The error I am getting is the following:
    "An error occurred while generating a new report template. Error in UNKNOWN.RPT file"
    Does anyone know what this could be?
    Thanks

    Well,
    I cannot access the system now. But I think it is not an issue of authorization, because I assigned all the good user's role to the bo user,
    and even with that, it still don't work.
    Thanks

  • Internal Error while executing a query with varaints in BEX

    HI All,
    I am executing a query which has 4 variants. when I use the first 3 variants the query is working fine.....but when I try to execute the same query for the 4th variant....the system is giving an error message called Internal Error.....
    when I executed the same query with same variant...in RSRT transaction code...I was able to see the results....
    The error messages that I am getting as follows...
    <Internal Error> receiving from the BW Server Failed. BW server raised exception SYSTEM_FAILURE. DO you want to see more information...
    when I selected YES....I got the following message
    Error in a ABAP statement when processing an Internal Table.table.
    Error Group
    RFC_ERROR_SYSTEM_FAILURE
    when clicked on the OK button the following message is displayed....
    <Internal Error> Can not determine text elements for the current query.
    Can any one explain me what went wrong...is there any thing that I need to do in the BEX settings...are there any patches that needs to be installed...or any OSS notes available for this sort of errors...?
    Advance in thanks
    Dilse...
    Hash

    Hi Harish,
    Execute the query in RSRT and check whether you have any short dump is in ST22. This would give a clear idea at what might have gone wrong.
    Another thing is to check whether the code for the variable is fine in the user exit.
    Hope this helps.
    Bye
    Dinesh

  • Auth Error in BW while executing a query with Company hierarchy

    Hi All,
    I have an issue in BW Reporting auth objects.. Hope to get resolved here.
    We are using BI 7.0. However We  are still using the Reporting auth objects for fiield level security. We are having a problem while executing a query with company code hierarchy ,which is built on a multiprovider.
    The Background is as below
    Multiprovider: ZM_CD01 with 5 infocubes
    Query: Has 0COMP_CODE as free characteristics with display hierarchy for Japan (Node APSC_012 is fixed value)
    Node APSC_012 has 4070,4076,407A,408A,9830 company code values under it.
    Reporting Auth Objects:
    Z0COMPCODE: (for flat values)
    4070,4076,407A,408A,407M,407P,8236, :
    ZHCOMPCODE: (For tree structure)
    4070,4076,407A,408A,407M,407P,8080, :
    APSC_MGMT_HIER (Nodes: APSC_012,APSC019)
    Both the reporting authorization objects are checked for multi provider ZM_CD01 in RSSM
    While executing the query the following Auth error is received.
    You do not have authorization to read object  "Z0COMPCODE" authorization on '0COMP_CODE'
    When I change the values for Z0COMPCODE to * it works fine. No Auth error.
    Please help me resolve this issue. It is very critical now as the user needs to execute some important reports.
    Thanks in Advance.
    Ramkumar C

    Hi Chandra,
    Try the following:
    1. Go to tcode RSSM
    2. Enter the cube ZM_CD01 (all the other cubes) then click change.
    3. Afterwards, u201Cunchecku201D ALL Authorization Objects under this cube. (Repeate the same for all the cubes)
    4. Click Save.
    This will resolve the issue.
    Rgds,
    Raghu

  • Error during search !!! Associate Search Query with Indexes !!!

    We are trying to implement a simple index with Trex Search .
    We have done the following tasks :
    1. Created my index
    2. Assigned data to the the indexes
    3. Created taxonomies for classification indexes
    4. Created my search query  asociated to the index
    When we  try to search with the iview search , we got this error  :  <i><b>"Error during search occurred - com.sapportals.wcm.WcmException: A received argument has an invalid value (Errorcode 18)"</b></i> .
    We think that something is missing and for that we need to know how can we
    associate the search query with the index ?
    After the step 4), what we have to do in order to get this implementation (search working)
    Please send us  any ideas ..
    THANKS !!!

    Dear Ato
    Check in IMG Path - Enterprise Structure --> Assignment --> Logistis Execution --> Assign warehouse number to plant/storage location.
    Here check whether the warehouse number is assigned to your plant and storage location.
    thanks
    G. Lakshmipathi

  • Query with error "...Invalid Identifier"

    Hi
    I have a query that returns an error as follows:
    ORA-00904: "AT_HOURLY_ATTENDANCE_RECORDS"."ABSENCE_TYPE": invalid identifier
    The code is as follows:
    SELECT
            AT_HOURLY_ATTENDANCE_RECORDS.absence_type AS "value",
            AT_HOURLY_ATTENDANCE_RECORDS.absence_type AS "LABEL",
            '2' AS "SORTORDER"
            FROM AT_HOURLY_ATTENDANCE_RECORDS
            WHERE
           AT_HOURLY_ATTENDANCE_RECORDS.district_number = ('1000')
            AND AT_HOURLY_ATTENDANCE_RECORDS.SCHOOL_ID IN ('705')
            AND AT_HOURLY_ATTENDANCE_RECORDS.SCHOOL_YEAR = '2006'
    ORDER BY SORTORDER,LABELAll suggestions and help are gratefully acknowledged. Thanks in advance

    Hmmm, very similar error with one of your others posts :
    help with query with sub query
    Same cause, same effect ?
    Nicolas.

  • SQL-Query with JDBC returns error ORA-00600

    Hi,
    I try to execute a SQL-Query using JDeveloper 3.2.3 and the Oracle JDBC-Library 8.1.7
    The following statement
    'ResultSet rset=stmt.executeQuery(SQL-String);'
    where stmt is Statement returns a Database-Error
    ORA-00600 with the Arguments [ttcgcshnd-1], [0] [], [], [], [], [], []
    when the SQL-String queries Varchar2 or CHAR-Columns.
    The Query returns correct values for numeric fields.
    The Database-Server is running on Oracle 9i
    Does anybody know, what could be the reason?
    Thanks, Harold

    I found many forums about it also, but I still haven't got solution yet.
    They talk about the cause, and report to oracle group and so on,
    but I still don't know how to solve my problem and how to enable my oracle 9i jdbc driver working.
    Need help please

  • Global query block is causing a DNS server to fail a query with error code Name Error exists in the DNS database for WPAD

    Global query block is causing a DNS server to fail a query with error code Name Error exists in the DNS database for WPAD on a Windows 2008 server.

    The global query block list is a feature that prevents attacks on your network by blocking DNS queries for specific host names.  This feature has caused the DNS server to fail a query with error code NAME ERROR for wpad.contoso.com. even though data
    for this DNS name exisits in the DNS database.  Other queries in all locally authoritative zones for other names that begin with labels in the block list will also fail, but no event will be logged when further queries are blocked until the DNS server
    service on this computer is restarted.

  • Error While query exection with Restriction?

    Hi Expert's,
    I have query with  restrictions as Assignment status- Missing and Upper and for Asset status -Donated,Lost,Stolen and Disposed.
    But query will execute in Bex analyzer/ Execute on the web but when I execute the query through portal it is throwing an error.
    When I did  some trial and error exercise on this query I came to that the issue is related to the restrictions.The query works fine for the restriction  Assignment status as u2018Missingu2019 and Asset status as u2018Lost u2018but for other restrictions the issue is again same.
    1.Is it the issue with the query design?
    2.Is the issue with the software?
    Do I need to rise a OSS? please help me to resovle this issue.
    Points will be definitely assigned.
    Thanks,
    Vasu
    Edited by: vasu vassu on Jul 22, 2010 8:44 AM

    Hi,
    Is this error with only this report or with some other reports as well?
    Some time this occur due to java patch so check if this error is for one or more reports.
    If this is with only this query then execute the query in RSRT and generate the query first. Are you getting any warning/error over there? Try these things it will provide better picture.
    Sometimes removing restriction and charectristics from query saving that and add it agin works. You may try that as well.
    I hope this will help.
    Thanks,
    S

Maybe you are looking for