Error while executing Query with Variable.

Hi All,
I have written a query to fetch values from some user tables and sap tables. The query is as below.
select a.docentry,a.u_scname,e.block,e.[City],
e.[Country], e.[State1],
e.[StreetNo], e.[ZipCode],
e.[Building], e.[Cellular],a.[U_WONo], a.[U_DocDate],
a.[UserSign], b.[LineId], b.[U_Des],
b.[u_SDes], b.[U_UoM],
b.[U_Qty], b.[U_Rte],
b.[U_Tamt], a.[U_PrjName], a.[u_WO_PB],
a.[U_WO_UL], a.[U_WO_FC],
a.[U_WO_PYT], a.[U_WO_COP],
a.[U_WO_TRMT], a.[U_WO_DocSub],
a.[U_WO_ADV], a.[U_WO_OCondition],
a.[U_WO_PRPBY], a.[U_WO_RCMBY],e.[CntctPrsn],
(T4.[WhsName]+ '-' + T4.[Street] +'-' + T4.[Block])  as 'Work Address ',
T4.[Building], T4.[City],
T4.[ZipCode], T4.[U_PMCNT],  T4.[WhsName], e.Taxid0
from [@e360_owor] as a join [@e360_wor1] as b
on a.docentry = b.docentry
left outer join
( select c.cardname,d.TaxId0,d.Taxid1, c.block, c.[City],
c.[Country], c.[State1],
c.[StreetNo], c.[ZipCode],
c.[Building], c.[Cellular], c.[CntctPrsn]  from ocrd
as c  join crd7 as d  on  c.cardcode = d.cardcode 
  where d.TaxId0 is not <b>null</b> ) as e
on
a.U_SCName = e.CardName 
left outer join OWHS T4 on T4.[WhsName] = a.[U_Prj]
where
a.U_WONo = '[%0]'
In this code, when the variable is assigned to field U_WONo, then I get an error
Must Specify A Table To Select From. Statement 'Service Contractors' (OCTR) (s)  could nto be prepared.
But when the values for variables are hard coded, the query executes.
I have been working on it from long time, but same error exists. Could anybody help resolve the same...
I am using SAP B1 2007 B, patch level 15.
Thanks in advance,
Regards
Rohan

The error messages may be misleading. With complicated queries with parameter request I frequently saw references to service contract (or something other).
Sometimes SBO does not manage correctly variables in complicated queries and there is a note about the workaround to solve the problem:[Note730960|https://websmp130.sap-ag.de/sap/bc/bsp/spn/sapnotes/index2.htm?numm=730960]

Similar Messages

  • Error when executing query with variables in excel

    When I execute a query in excel, it gives some errors if it has some variables (From Date, To Date etc):
    Error Specify a value for variable From Date
    Error Specify a value for variable To Date
    I need to execute the query and then save a view. I want to do this in excel as I am not able to save a view if I execute in a web browser.

    Hi Sanjeev.
    Of course Excel supports input of variable values.
    What version of BW/BI both backend and frontend are you using?
    Please check if you can execute the query in TA RSRT. You could try to generate the query again here.
    Hope it helps.
    BR
    Stefan

  • Web Analysis Error -- Error while executing query and retrieving data

    Regarding Web Analysis:
    We have a number of reports that we created. yesterday they were all working fine. today we try to open them and most are generating an error.
    The error is:
    Error while executing query and retrieving data.; nested exception is:
    com.hyperion.ap.APException: [1033] Native:
    1013033[Thu Oct 22 09:08:17
    2009]server name/application name/database name/user name/Error91013033)
    ReportWriter exit abnormally
    Does anyone have any insight into what is going on?
    My version information is:
    Hyperion System 9 BI+ Analytic Administration Services 9.3.0.1.1 Build 2
    Web Analysis 9.3.0.0.0.286
    Thanks in advance for your help.
    DaveW

    Hi,
    And also click on check option by opening the query in Query designer,as Mr . Arun suggested.
    And if you get any error in checking, see the long message(detail).
    With rgds,
    Anil Kumar Sharma .P

  • Error while executing query in OLAP server

    Dear all,
    we are using APD to extracted sales data for the last 3 months .this APD was executed perfectly till yesterday.
    in today's run APD got failed with error message as below
    "@5C\QError@     Fiscal year variant Z3 is not maintained for calendar year 9999
    "@5C\QError@     Error while executing query in OLAP server; redesign query.
    Please suggest corrective action .
    I have tried executing manually with less selections on creation date by no success..
    regards,
    puru

    Purushotham wrote:
    Hi Jeeth,
    >
    > in query we have selection for " currency type " and created on "  .we are not using fiscal year variant.
    >
    > in first strep of APD design only we have a problem and also recently there are no changes to this APD .
    >
    > It was executed perfectly on till 4th .
    >
    > Edited by: Purushotham on Feb 6, 2012 12:48 PM
    Dear Purushotham, You can maintain the Fiscal year Variant in OB29. 2 possibilities, #1 : Data for the FYV/Year could be wrong. #2 : Updates for Fiscal Year might not have been done. You can maintaine FY varients up to FY 2XXX in your BW system. This should fix the error. The table T009 must be the same as we get when we do OB29 TCode in BW, so via SPRO do rebuild of table again.
    Edited by: Arun Bala G on Feb 6, 2012 4:05 PM

  • While Executing Query  with out giving any inputs  to selection variables

    Hi,
    While Executing Query   in the Query Designer  with out giving any inputs  to selection variables.  I got an error message  in german Language this is translating of german to English .
    In the reading of the data, mistakes appeared.  Navigation the value is contains possible "New Delhi" of feature 0CITY40 at that
    10. ten place a mistake Notification Number BRAIN 290
    This is very urgent  can you please help me .
    Thanks & regards
    Subba Reddy.

    Double click this error message it will give you more details. Post that.

  • Error while executing query in BEX

    Hi All,
    I am experiencing an issue while executing query on FIAR_C03.
    "Abort No Values could be determined for variable 0P_FVAEX
    Error specify a value for 0P_FVAEX
    Abort system error in program SAPLRRKO and form APPEND_KHANDLE_1-01-
    I had searched SDN forums and found the similar error which is inculded in the below link:
    Bex Variable
    However, the solution specified is only for a particular 3 queries. Also the solution is that the 3 queries(Which are having errors) are replaced by another 3 queries.
    Can anybody help us in this regard.
    Regards
    YJ

    hi JY,
    try 858477 steps for other 'infected' webtemplates ?
    try implement correction in 660514 ?
    (also search other notes with keyword 0P_FVAEX
    e.g 585202)
    hope this helps.

  • ORA-01722: Error while executing query in Query Designer

    Hi All;
    I am getting the below error while executing a query
    ORA-01722: invalid number
    Error reading the data of InfoProvider
    Error while reading data; navigation is possible
    Have anyone encountered this before? How do i resolve this?
    Thanks!
    ~ Arun KK

    Hi,
    Did you checked all the setting required to run this query are present in the Qualtiy system??
    Which means all the characteristics,key figures are in active state.
    Also all the cubes are in active state with no issues with the involved in the dimensions used for the query.
    Also do a check in the query and if you have authorization try to save the same query and execute the saved one again in quality and see if the same error happens again.
    Thanks
    Ajeet

  • Error  while executing query through rsrt

    hello experts,
    I am facing following error while executing one HR query through rsrt.
    "System error in program SAPLRRI2 and form REP_ASSIGN_INITIAL_OPT-01- (see long text) "
    while executing query through rsrt it automatically goes to debug mode, coming out of debug mode i get the screan showing above error message.
    What would be an issue?
    Regards,
    Nirav
    Edited by: Nirav Shah on Apr 21, 2008 8:19 AM

    Hi ramesh,
    I havent kept any execlusion selection. Though i saw long text, it is like this:
    "Diagnosis
    This internal error is an intended termination resulting from a program state that is not permitted.
    Procedure
    Analyze the situation and inform SAP.
    If the termination occurred when you executed a query or Web template, or during interaction in the planning modeler, and if you can reproduce this termination, record a trace (transaction RSTT).
    For more information about recording a trace, see the documentation for the trace tool environment as well as SAP Note 899572.
      Notification Number BRAIN 299 "
    Regards,
    Nirav

  • Error while executing query after migration

    I have migrated a  query to 7. While executing the report following error occurs
    When I attempt to open a query, (I get past the login and query selection screens) I get the following error:
    "Creation of item TEXTELEMENT_xx Failed" (20 or so lines)
    After which the variable entry screen pops up, but no data is displayed when the query returns due to the creation of the elements failing.
    Excel 2007 Office SP2. SAP GUI 710
    Please suggest.
    Regards,
    Raj.

    Hi Raj,
    I also faced this problem with Excel 2007 BI
    I was able to resolve the problem with the following
    This problem is because changes to excel in the 2007
    first try reinstalling the GUI components If it works with the reinstallation then its fine
    if not try Installing FEP 900 (Latest patch for BEX Suite) and GUI 7.10 patch 13
    this definitely solves your problem
    Thank you

  • CX_SY_NO_HANDLER Error While executing query in RSRT T-Code

    Hi Experts,
    I have created a data source extraction using function module.
    Then i have created customer exit variable, dso, infocube and all....
    my variable name is ZWBS_VAR and
            query name is WBS_VAR.
    while executing this query name I'm getting the exception CX_SY_NO_HANDLER.
    If i use WBS_VAR instead of ZWBS_VAR in when condition.. it is not showing that error.
    this is my code i have written in ZXRSRU01 include.
    DATA:it_wbs_elemt TYPE STANDARD TABLE OF /bic/awbsdsogn00,
         wa_wbs_elemt like line of it_wbs_elemt,
         L_S_RANGE TYPE RSR_T_RANGESID with header line,
         LOC_VAR_RANGE like line of i_T_VAR_RANGE,
         ZLOW TYPE C,
         LV_USER LIKE SY-UNAME,
         lv_user1 LIKE /bic/awbsdsogn00-/BIC/WBSE.
    CASE i_vnam.
    *****************************Start of Code for 'ZWBS_VAR' variable******************************
    when 'ZWBS_VAR'.
    lv_user = sy-uname.
    if lv_user CP '/BIC/WBSE'.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = lv_user
    IMPORTING
    output = lv_user1.
    CLEAR wa_wbs_elemt.
    SELECT * FROM /bic/awbsdsogn00 INTO TABLE it_wbs_elemt WHERE /BIC/WBSE = lv_user1.
    READ TABLE it_wbs_elemt INTO wa_wbs_elemt WITH KEY /BIC/WBSE = lv_user1.
    IF sy-subrc = 0.
    l_s_range-low = wa_wbs_elemt-/BIC/WBSE.
    l_s_range-sign = ' I '.
    l_s_range-opt = ' EQ'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    ENDIF.
    ENDCASE.
    IF I_STEP = 3.
    LOOP at i_t_var_range INTO loc_var_range WHERE vnam = 'ZWBS_VAR'.
    CLEAR : l_s_range.
    zlow = loc_var_range-low.
    lv_user = sy-uname.
    CALL FUNCTION 'CONVERSIOn_EXIT_ALPHA_OUTPUT'
    EXPORTING
    input = loc_var_range-low
    IMPORTING
    output = loc_var_range-low.
    IF lv_user NE loc_var_range-low.
    IF lv_user CP '/BIC/WBSE'.
    CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
    EXPORTING
    I_CLASS = 'RSBBS'
    I_TYPE  = 'E'
    I_NUMBER = '000'
    I_MSGV1 = 'You are not authorized for the WBS ELEMENT'
    I_MSGV2 = loc_var_range-low
    I_MSGV3 = 'Enetr your valid WBS ELEMENT'
    I_MSGV4 = lv_user
    EXCEPTIONS
    OTHERS = 02.
    RAISE Again.
    ELSE.
    l_s_range-low = loc_var_range-low.
    l_s_range-sign = loc_var_range-sign.
    l_s_range-opt = loc_var_range-opt.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    ENDIf.
    ENDLOOP.
    ENDIF.
    If you find any errors in this piece of code please let me know..
    Thanks&Regads,
    Sirisha.

    Hey think other way round .
    Filtering the report with the partner(current user executing the report) will suffice your requirement .
    Am I correct ?
    If yes then follow this simple approach .
    Create a variable(mandatory, not ready for input ) of type customer exit on partner infoobject and filter your report with this variable .
    In this way the current user executing the report can see data only related to him .
    Type the below code in cmod .
    WHEN '(give your variable name).
         DATA :lv_bp        TYPE /bi0/oibpartner,
        CHECK i_step EQ '1'.
        lv_bp = sy-uname.
        IF lv_bp IS NOT INITIAL.
          lv_bp = ( sy-uname ) .
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = lv_bp
            IMPORTING
              output = lv_bp.
          l_s_range-sign = 'I'.
          l_s_range-opt  = 'EQ'.
          l_s_range-low  = lv_bp .
          APPEND l_s_range TO e_t_range.
          CLEAR : l_s_range,lv_bp.
        ENDIF.
    If this approach is not flexible in ur case then let me know will change the code what u have written as I can see many errors in that .
    Also I can figure it out that the whole code is ctrl c ctrl v of that sdn document but his requirement was quite different than yours .

  • Error while executing query on portal-SAPMSSY1 method : UNCAUGHT_EXCEPTION

    Hello all,
    I have created a quey and executed it on portal and everything just works fine. The query has few input varaibles at the start like fiscal year and some other inputs. I saved the query in my Portal favorites and then when I try to excute it from there it gives me a runtime BI error.
    Termination message sent ABEND RSBOLAP (000): Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION  MSGV1: SAPMSSY1  MSGV3: UNCAUGHT_EXCEPTION
    I guess it errors out because of the variable input part at the start of query.
    We already have note "950992" in the system so wonder what next now.
    Any inputs appreciated.
    Thanks,
    Kiran

    We are having the same issue too - we are SP13. Our query is built on a Infoset, and the problem comes with 0FISCPER variable, when we try to do a input help (F4) in Bex. this happens only when I use fiscper on queries bulit on INFOSETS, and it works perfectly alright with all other cubes.
    <i>System error in program CL_RSMD_RS_SPECIAL and form
    IF_RSMD_RS~READ_META_DATA-02 (see long text)
        Message no. BRAIN299
    Diagnosis
        This internal error is an intended termination resulting from a program
        state that is not permitted.
    Procedure
        Analyze the situation and inform SAP.
        If the termination occurred when you executed a query or Web template,
        or during interaction in the planning modeler, and if you can reproduce
        this termination, record a trace (transaction RSTT).</i>
        For more information about recording a trace, see the documentation for
        the trace tool environment as well as SAP Note 899572.
    and in portal, it gets to the point of variable screen and then throws a error msg.
    <i>ABEND RSBOLAP (000): Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
      MSGV1: SAPMSSY1
      MSGV3: UNCAUGHT_EXCEPTION</i>
    Message was edited by:
            voodi
    Message was edited by:
            voodi

  • Error while executing query in SQL Developer

    I am getting the following error whenever I login to sql developer.
    SEVERE 56 0 oracle.jdbc Error while registering Oracle JDBC Diagnosability MBean.
    I get below error whenever I execute any query.
    SEVERE 70 53918 oracle.dbtools.worksheet.sqlhistory.SqlHistoryTask oracle.dbtools.worksheet.sqlhistory.db.HistoryDB.readHistory(HistoryDB.java:99)
    I use following versions
    Java(TM) Platform 1.6.0_35
    Oracle IDE 3.2.20.09.87
    Versioning Support 3.2.20.09.87
    I am working on Oracle11gR2.
    Please help me to resolve this and let me know if you need more information.

    Got same issue with :
    Component
    Version
    =========
    =======
    Java(TM) Platform
    1.6.0_41
    Oracle IDE
    3.2.20.09.87
    Versioning Support
    3.2.20.09.87
    Alternate path for SqlHistory directory :
    C:\Users\USER_NAME\AppData\Roaming\SQL Developer
    Best Regards,
    F.L.

  • Error while executing bts_ConfigureBizTalkLogShipping with SQL Server 2012 and BTS 2013

    Hi,
    while configuring the DR site for Log shipping (http://msdn.microsoft.com/en-us/library/aa560961(v=bts.10).aspx)
    exec bts_ConfigureBizTalkLogShipping @nvcDescription = '<MyLogShippingSolution>',
    @nvcMgmtDatabaseName = '<BizTalkServerManagementDatabaseName>',
    @nvcMgmtServerName = '<BizTalkServerManagementDatabaseServer>',
    @SourceServerName = null, -- null indicates that this destination server restores all databases
    @fLinkServers = 1 -- 1 automatically links the server to the management database
    Getting errors while trying to execute the stored procedure "bts_ConfigureBizTalkLogShipping".
    OLE DB provider "SQLNCLI11" for linked server "(null)" returned message "Login timeout expired".
    OLE DB provider "SQLNCLI11" for linked server "(null)" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible.
    Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
    Msg -1, Level 16, State 1, Line 0
    SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
    This is very strange because with the same server name (which I am passing in above query) I am able to connect from SQL Server Studio from DR site.
    Any help would be much appreciated.
    Thanks!
    Regards,
    Gautam
    Thanks! Regards, Gautam

    You need to check the DTC Connectivity between your DC and DR SQL Instance. The Linked Server requires DTC connectivity. Secondly this activity is better done from the SQL Server in question (the DC server in your case).
    You can also manually add the Linked Server. Refer
    http://msdn.microsoft.com/en-IN/library/ms188279(v=sql.105).aspx - Linking Servers and
    http://msdn.microsoft.com/en-IN/library/ff772782(v=sql.105).aspx - Creating Linked Servers.
    After having created the Linked Server(s) you can run the log shipping configuration again BUT using @fLinkServers = 0.
    Regards.

  • SQl Error while executing query in BEx

    Hi All,
    We are executing a Report in Bex 7.0 and we get the selection screen once i give the slections and execute it after running for few mins ( say 3 mins), its giving the below error message.
    Error Sql: 1578
    Error ORA-01578 ORACLe DATA BLOCK Corrupted(file #120, block #21118) ORA.
    Errors occured during parallel process of Query 15;RC:3
    Error while reading data Navigation is not possible.
    I have regenerated the Query in RSRT, but no errors from it.
    Other queries are working fine from BEx in the same BW system.
    Plaese provide any inputs on this.
    Thanks & Regardsm
    Ganesh Thota

    HI,
    Try the below sequence, not sure if it works for you.
    Go to query properties
    In advance tab
    Check the box "Allow external access to this query" and re-execute the query
    this might help
    regards,
    ray

  • Error while executing query ORA-00932

    Hi I have the following query and its giving error please resolve.....
    SELECT DISTINCT acthed,rcptno,depdate,matdate,depamt,intrate,intaccd,intpaid,intpble,paytfreq,instalamt,autrenfg,
    curbalnc,curbdrcr,clrbalnc,clrbdrcr,acstatus,lnachd,lnacno,siflag,siacthed,siactnum,catgcode,lastitcal,
    tdsflag, tdsamt, tdsdate, tdsint,actnum FROM tdmaster WHERE acstatus = 1
    AND fundstat = 'Y' AND acthed = 4016
    AND depdate < to_number(trunc('30-SEP-2011','mm') + 22) //Error here //
    AND ((lastitcal) < '30-SEP-2011' or lastitcal is null)
    ORDER BY depdate ASC;
    Please send the executable query....
    Thanks in advance...

    Hi user11384749,
    If the column depdate have date datatype then you may use to_date function to convert text into date then do addition in it:
    depdate < (to_date('30-SEP-2011','dd-MM-YYYY') + 22)
    this will compare the depdate with 22-OCT-11 date
    I hope this will be your answer
    Regards,
    M.A.Bamboat

Maybe you are looking for

  • Push Notifications and Enterprise

    Hello there, We have been upgraded from woodwing to Adobe DPS last month. We are slowly getting back to the way it was before and know that some features will come in future updates. There is only 1 thing I don't get or could find any documentation f

  • SQL not getting executed

    Hi, My sql below is not getting executed.There are no errors but even after long time it is not producing any thing (error or result). I am getting results till the statement SELECT D.budeptmap_v88_dept_id , but when I right the last statement on top

  • How do I find my iPhone backup in Time Machine?

    I accidentally erased my Sleep Alert information from my iPhone.  My iPhone is backed up into my iMac, which is backed up by Time Machine.  How do Ifind my Sleep Alert information in Time Machine? I use Mavericks, but the search engine has sent me to

  • Passing parameter into stored procedure

    Hi guys, I have a big problem here passing as a parameter in stored procedure. If i pass as a parameter in where clause it is working fine. Whenever i pass the parameter in order by it was not working.. How to implement this issue???? Here i am givin

  • PC to MAC How to/best way to transfer lightroom settings/develop

    I just installed CS6 and LR4 on my new Macbook Retina. I had been using a PC with LR3 and CS5, and I'm wondering how I can keep all the Develop settings, etc in the transfer of my photos. Initially, all I did was a straight copy and paste of the orig