Sub Query Error When Passing Dynamic Parameter.

Dear All, I need help for below query problem.
I have try below query run no problem when pass a static Parameter into the query but it throw error once i have add in the dynamic parameter:-
--Sales BatchNum Transaction
SELECT T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum], ISNULL(T4.[AvgPrice],0) AS 'Avg Price', SUM(T0.[Quantity]) AS 'Sales Quantity',
(SELECT [Quantity] FROM [OIBT] T1 WHERE T1.[ItemCode] = T0.[ItemCode] AND T1.[WhsCode] = T0.[WhsCode] AND T1.[BatchNum]=T0.[BatchNum]) AS 'Stock OnHand'
FROM [IBT1] T0 INNER JOIN [OITM] T2 ON T0.[ItemCode] = T2.[ItemCode]
                  INNER JOIN [OITB] T3 ON T2.[ItmsGrpCod] = T3.[ItmsGrpCod]
                  INNER JOIN [OITW] T4 ON T0.[ItemCode] = T4.[ItemCode] AND T0.[WhsCode] = T4.[WhsCode]
WHERE T0.[BaseType] = [%0] AND T0.[DocDate] BETWEEN [%1] AND [%2] AND T3.[ItmsGrpNam] = [%3]
GROUP BY T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum], T4.[AvgPrice]
--ORDER BY T0.[ItemCode]
UNION ALL
--No Sales Batch Transaction
SELECT T4.[ItemCode], T4.[ItemName],T4.[WhsCode], T4.[BatchNum], ISNULL(T7.[AvgPrice],0) AS 'Avg Price', 0 AS 'Sales Quantity' ,SUM(T4.[Quantity])
FROM [OIBT] T4 INNER JOIN [OITM] T5 ON T4.[ItemCode] = T5.[ItemCode]
                  INNER JOIN [OITB] T6 ON T5.[ItmsGrpCod] = T6.[ItmsGrpCod]
                  INNER JOIN [OITW] T7 ON T4.[ItemCode] = T7.[ItemCode] AND T4.[WhsCode] = T7.[WhsCode]
WHERE NOT EXISTS
( SELECT T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum], ISNULL(T5.[AvgPrice],0) AS 'Avg Price', SUM(T0.[Quantity]) AS 'Sales Quantity'
  FROM [IBT1] T0 INNER JOIN [OITM] T2 ON T0.[ItemCode] = T2.[ItemCode]
                    INNER JOIN [OITB] T3 ON T2.[ItmsGrpCod] = T3.[ItmsGrpCod]
                     INNER JOIN [OITW] T5 ON T0.[ItemCode] = T5.[ItemCode] AND T0.[WhsCode] = T5.[WhsCode]
  WHERE T0.[BaseType] = [%1] AND T0.[DocDate] BETWEEN [%1] AND [%2] AND T4.[ItemCode]=T0.[ItemCode] AND T4.[WhsCode]=T0.[WhsCode] AND T4.[BatchNum]=t0.[BatchNum] AND T3.[ItmsGrpNam] = [%3]
  GROUP BY T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum],T5.[AvgPrice]
AND T6.[ItmsGrpNam] = [%3]
GROUP BY T4.[ItemCode], T4.[ItemName], T4.[WhsCode], T4.[BatchNum], T7.[AvgPrice]
HAVING SUM(T4.[Quantity]) > 0
ORDER BY 1, 2, 3, 5 DESC
I think SAP Query Manager can support the sub-query, kindly advise how to solve or other alternative way to solve this issue.
Thanks a lot.

Dear  Thanga Raj K,
From your solution i can get my expected result, only within your solution you miss out the @ in line 32 for ToDate variable.
After i have added it, it working perfectly.
Thanks once again.
For other user References code(Corrected):-
Declare @basetype as int
Declare @FromDate as Datetime
Declare @ToDate as Datetime
Declare @ItemGroup as nvarchar(30)
set @basetype = (select max(s0.BaseType) from IBT1 S0 where s0.BaseType = '[%0]')
set @FromDate = (select min(S1.DocDate) from IBT1 S1 where S1.DocDate >= '[%1]')
set @ToDate = (select max(S2.DocDate) from IBT1 S2 where S2.DocDate <= '[%2]')
set @ItemGroup = (select max(S3.ItmsGrpNam) from OITB s3 where S3.ItmsGrpNam = '[%3]')
--Sales BatchNum Transaction
SELECT T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum, ISNULL(T4.AvgPrice,0) AS 'Avg Price', SUM(T0.Quantity) AS 'Sales Quantity',
(SELECT Quantity FROM OIBT T1 WHERE T1.ItemCode = T0.ItemCode AND T1.WhsCode = T0.WhsCode AND T1.BatchNum=T0.BatchNum) AS 'Stock OnHand'
FROM IBT1 T0 INNER JOIN OITM T2 ON T0.ItemCode = T2.ItemCode
INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
INNER JOIN OITW T4 ON T0.ItemCode = T4.ItemCode AND T0.WhsCode = T4.WhsCode
WHERE T0.BaseType = @basetype AND T0.DocDate BETWEEN @FromDate AND @ToDate AND T3.ItmsGrpNam = @ItemGroup
GROUP BY T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum, T4.AvgPrice
--ORDER BY T0.ItemCode
UNION ALL
--No Sales Batch Transaction
SELECT T4.ItemCode, T4.ItemName,T4.WhsCode, T4.BatchNum, ISNULL(T7.AvgPrice,0) AS 'Avg Price', 0 AS 'Sales Quantity' ,SUM(T4.Quantity)
FROM OIBT T4 INNER JOIN OITM T5 ON T4.ItemCode = T5.ItemCode
INNER JOIN OITB T6 ON T5.ItmsGrpCod = T6.ItmsGrpCod
INNER JOIN OITW T7 ON T4.ItemCode = T7.ItemCode AND T4.WhsCode = T7.WhsCode
WHERE NOT EXISTS
(SELECT T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum, ISNULL(T5.AvgPrice,0) AS 'Avg Price', SUM(T0.Quantity) AS 'Sales Quantity'
FROM IBT1 T0 INNER JOIN OITM T2 ON T0.ItemCode = T2.ItemCode
INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
INNER JOIN OITW T5 ON T0.ItemCode = T5.ItemCode AND T0.WhsCode = T5.WhsCode
WHERE T0.BaseType = @basetype AND T0.DocDate BETWEEN @FromDate AND @ToDate AND T4.ItemCode=T0.ItemCode AND T4.WhsCode=T0.WhsCode AND T4.BatchNum=t0.BatchNum AND T3.ItmsGrpNam = @ItemGroup
GROUP BY T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum,T5.AvgPrice
AND T6.ItmsGrpNam = @ItemGroup
GROUP BY T4.ItemCode, T4.ItemName, T4.WhsCode, T4.BatchNum, T7.AvgPrice
HAVING SUM(T4.Quantity) > 0
ORDER BY 1, 2, 3, 5 DESC

Similar Messages

  • Error when passing URL from OLAP Universe to WebI

    Hi Experts,
    I am getting 'The Supplier XML is not valid' WebI error when passing a URL from OLAP Universe.
    URL example:
    '<a href="http://www.sap.com">web link</a>'
    I follow Universe Designer Guide:
    - typing above URL into Dimension Select statement
    - selecting Read As Hyperlink in Object Format.
    When I drop this dimension into Result Objects panel in WebI Query and run refresh  'The Supplier XML is not valid' pops up.
    What i am trying to achive is to create a pre-formatted as Hyperlink object (dimension) in WebI to make it available for a user to design ad-hoc reports.
    Please help
    Thanks

    Hi,
    Refer the below forum link for more information:
    Universe object format in Web Intelligence
    I guess you can do some changes in the format of Universe object and use it in Webi.
    -Noor.

  • Pass Dynamic Parameter to Agent

    Hi All,
    I am trying to send the report/analyses by mail to my leaders in Oracle Business Intelligence 11.1.1.5.0.
    My report has Dashboard prompt for Region like "North" , "South", "East" and "West".
    I am able to send the report for all region but not able to send 4 reports for each region .
    How can i do it in Oracle Business Intelligence 11.1.1.5.0.?
    Do i need to use OBIEE Publisher for passing dynamic parameter .
    Thanks
    Nawneet

    The following kludge works for me:
    public ActionForward execute(ActionMapping mapping, ActionForm actionForm,
        HttpServletRequest request, HttpServletResponse response )
        throws IOException, ServletException {
        // select the view
        ActionForward actionForward = mapping.findForward("foo.bar");
        ActionForward newActionForward = new ActionForward(actionForward);
        newActionForward.setPath(actionForward.getPath() + "?id=" + id);
        return newActionForward;
      }

  • Error while passing date parameter to the XML data definition

    Hi All,
    I have developed a BI publisher report using XML data definition & RTF template.
    This data definition contains a SQL query in it's CDATA section and runs as a concurrent program(without RDF) . We are looking to pass a date parameter to the SQL query and its not accepting the date parameter. However, when we hardcode SYSDATE in the SQL query in place of the parameter, the report runs fine. In the log file it shows that the parameter is being treated in American date style and we are using DD-MON-RRRR format. I have tried to convert the date format however still the error exists.
    What we did ?
    Created a XML data definition which contains the SQL query in its CDATA section & p_rundate (DATE) parameter.
    Registerd the XML data definition as concurrent program with EXECUTABLE= XDODTEXE and Output format as XML with p_date as a date parameter.
    Looking for any available solution for the same.
    Thanks.

    Hi All,
    I have developed a BI publisher report using XML data definition & RTF template.
    This data definition contains a SQL query in it's CDATA section and runs as a concurrent program(without RDF) . We are looking to pass a date parameter to the SQL query and its not accepting the date parameter. However, when we hardcode SYSDATE in the SQL query in place of the parameter, the report runs fine. In the log file it shows that the parameter is being treated in American date style and we are using DD-MON-RRRR format. I have tried to convert the date format however still the error exists.
    What we did ?
    Created a XML data definition which contains the SQL query in its CDATA section & p_rundate (DATE) parameter.
    Registerd the XML data definition as concurrent program with EXECUTABLE= XDODTEXE and Output format as XML with p_date as a date parameter.
    Looking for any available solution for the same.
    Thanks.

  • How to pass dynamic parameter to a database function in OBIEE

    Hi,
    I have a requirement like this. I have to create one report in OBIEE which was in Discoverer. Now in discoverer report there are some calculated item in the worksheet based on database pkg.functions. The parameter which user gives at run time that parameters are then passed to the discoverer calculated items dynamically. But I am not able to do this in OBIEE answers.
    Can anyone tell me step by step how I can able to pass the user selected parameter values in OBIEE answer level.
    The example:
    GET_COMM_VALUE_PTD("AFE Cost & Commitment".Afe Id,:"Period Name(AFE)","AFE Cost & Commitment".Data Sel,"AFE Cost & Commitment".Org Id)
    GET_COMM_VALUE_PTD --- Function database
    ("AFE Cost & Commitment".Afe Id,:"Period Name(AFE)","AFE Cost & Commitment".Data Sel,"AFE Cost & Commitment".Org Id --- Parameters... :"Period Name(AFE)" is the dynamic parameter selected run time by user.
    Please help.
    Thanks
    Titas

    Hi,
    I already did that. But the existing discoverer re value report is showing correct value but the OBIEE report with EVALUATE function shows incorrect value.
    The requirement is to create a OBIEE Dashboard from a Discoverer existing report. Now in discoverer report theere are several calculated items in worksheet level where database custom function is used and user selected parameter value is passed run time in that function. But when that is created in OBIEE with EVALUATE function in RPD, the report shows incorrect data. Could not understand how to pass the parameter value runtime.
    Below is the discoverer 'Show SQL' query and EVALUATE function syntax which has been used.
    SELECT APPS.XXBG_PL_PROJ_ANALYSIS_AFE_PKG.GET_COMM_VALUE_PTD(XXBG_PL_PROJ_AFE_V.AFE_ID,
    :"Period Name(AFE)",
    XXBG_PL_PROJ_AFE_V.DATA_SEL,
    XXBG_PL_PROJ_AFE_V.ORG_ID),
    XXBG_PL_PROJ_AFE_V.AFE_DESC,
    XXBG_PL_PROJ_AFE_V.AFE_NUMBER,
    XXBG_PL_PROJ_AFE_V.APPROVED_AFE_AMOUNT
    FROM APPS.PA_PERIODS_ALL PA_PERIODS_ALL,
    APPS.XXBG_PL_PROJ_AFE_V XXBG_PL_PROJ_AFE_V
    WHERE ((XXBG_PL_PROJ_AFE_V.ORG_ID = PA_PERIODS_ALL.ORG_ID))
    AND (XXBG_PL_PROJ_AFE_V.DATA_SEL = :"Data Selection(AFE)")
    AND (PA_PERIODS_ALL.PERIOD_NAME = :"Period Name(AFE)")
    AND (XXBG_PL_PROJ_AFE_V.AFE_NUMBER = :"AFE Number(AFE)")
    AND (XXBG_PL_PROJ_AFE_V.OPERATING_UNIT = :"Operating Unit(AFE)")
    The EVALUATE function syntax is as below:
    EVALUATE('XXBG_PL_PROJ_ANALYSIS_AFE_PKG.GET_COMM_VALUE_PTD(%1,%2,%3,%4)' AS FLOAT , "BG PL Project Analysis Report_1"."AFE Cost & Commitment"."AFE Cost & Commitment.Afe Id", "BG PL Project Analysis Report_1"."Periods 1"."Periods 1.Period Name", "BG PL Project Analysis Report_1"."AFE Cost & Commitment"."AFE Cost & Commitment.Data Sel", "BG PL Project Analysis Report_1"."AFE Cost & Commitment"."AFE Cost & Commitment.Org Id")
    The PERIOD needs to be passed at run time which user will select.
    Please help to solve the issue.

  • Error when passing Date to ViewObject

    I am capturing Date and 1 string on form and passing as bind variables to a query in Vo.
    I get error oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation.
    The Vo executes fine if the query has only date parameter as a bind variable
    but it fails when there are 2 or more bind variables along with date as a bind variable.
    I am capturing the date in Co as -
    String runDate = pageContext.getParameter("Rundate");
    And executing VO in AM as -
    vo.setWhereClauseParams(null);
    vo.setWhereClauseParam(0,runDate);
    vo.setWhereClauseParam(1,interface_code);
    vo.executeQuery();
    and VO query is
    select a, b, c
    from table where interface_id = (select interface_id from table where interface_code = :2) and
    (payroll_id like 'XX' or payroll_id = 'HEADER') and output_rec_type in (select distinct output_rec_type from table
    where interface_id=(select interface_id from table where interface_code = :2) and payroll_id like 'XX') and
    run_date = TO_DATE((to_char(trunc(to_date(:1)),'DD-MON-YYYY') ),'DD-MON-YYYY')
    The strange thing is that , the VO executes fine if I hard code value for bind variable :2 ,but if fails otherwise.
    Are there any limitations in using date as bind variable or I am doing something wrong way.
    Thanks in Advance,
    Tanveer

    By the way instead of using date format directly in query, u can pass java date object in bind variables, it will make your code safe, even if user enters date in some other format by changing his user level preference.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Error while passing Application Parameter in Transaction iView editor

    Dear all
    I am trying to pass some application parameters to one of the transaction iViews. Without passing any parameter in 'Application Parameters' field of the iView editor the iView can be previewed/displayed fine. But when I am trying to pass the parameters as follows <Screen_Parameter1>=<ABC>&<...>=<...> the preview is coming up with a Portal runtime error saying that the <Screen_Parameter1> is an invalid terminal property of the root context_
    Can anybody help me out with this?
    MAQ

    In any application parameter field u need pass screen_field
    u need to find the screen_field value first .
    login to backend ECC server , give u r required Tcode .
    click in  required field , press f1 -> click on Technical setting icon on top .
    in that screen , screen_field is the last field .
    copy  this screen_field value
    place ths screen _field value in application parameter field .
    example : rs38-programm=ztest
    here re38-programm is the screen field
      ztest is it's value .
    & this is used for the separator between 2 values

  • Tag Query error when assigning mode in Link Editor

    Hi,
    I am receiving the following error when I run a transaction that contains a Tag query.  In my transaction I have set the tag query mode to be defined by a local property via the link editor.  Then when I execute the transaction I get the following error:
    "[ERROR] [TAG_QUERY_WRITE_TAG]com.sap.xmii.Illuminator.logging.LHException: Mode parameter was not found or is malformed"
    I am on version 12.1.8 Build(43).
    I import the project into MII 12.1.4 Build(53) and the transaction works as expected.
    In the new verson of MII is there a bug utilizing the link editor to set mode?  Or is there a specific way it wants the mode linked. (e.g. specific case)
    Additional details:
    I am trying to use the CurrentWrite mode.  I have tried setting Current mode via the link editor and that isn't working either. 
    Any suggestions?
    Thanks,
    Justin

    Hi Mike,
    Please correct me if I understand the logic incorrectly.  But here is what I am thinking....
    I have configured my transaction to have this flow:
    String_List_To_XML_Sequence --> Repeater_TagValues  -->  TAG_QUERY_WRITE_TAG
    The String_List_To_XML_Sequence would contain String_List_To_XML_Parser_TagValues & String_List_To_XML_Parser_TagNames.
    With this flow the logic would say that I will be running a seperate tag query for each tag value.  So if I have 100 tag values that I want to send, I will run 100 tag queries.  This doesn't seem the most efficient.  Also if this is how you were thinking I would configure the transaction then I could use the following links:
    Target Xpath: TAG_QUERY_WRITE_TAG.TagValue.1
    Expression: String_List_To_XML_Parser_TagValues.Output{/Rowsets/Rowset/Row[#Repeater_TagInput.CurrentItem#]/Item}
    Target Xpath: TAG_QUERY_WRITE_TAG.TagName.1
    Expression: String_List_To_XML_Parser_TagNames.Output{/Rowsets/Rowset/Row[#Repeater_TagInput.CurrentItem#]/Item}
    With this configuration updating 10 tags takes 2 seconds:
    [INFO] Statistics [Load = 35 ms msec, Parse = 35 ms, Execution = 2015 ms, Total = 2067 ms]
    With my old configuration updating 10 tags took 700 ms. (original transaction on 12.1.4 Build (53)
    [INFO] Statistics [Load = 11.137 msec, Parse = 224.113 msec, Execution = 451.78 msec, Total = 736.62 msec]
    Please let me know if I interpreted your thoughts incorrectly.
    If there is a way to utilize only 1 Tag Query, then I am not sure how the transaction flow should be configured.
    Thanks for your time,
    Justin
    Edited by: Justin M Brown on Jul 14, 2011 7:29 PM
    Edited by: Justin M Brown on Jul 14, 2011 7:33 PM

  • Pass dynamic parameter to Struts' forward

    In my application, when a user modifies a particular record from the database, after they edit it and save it, I want to show them the modified record.
    I'm using struts, however, I don't know how to pass the recordID to the struts forward after it has been saved.
    Here is my struts-config.xml
    <action path="/saveEquipmentTemplate"
             type="cafe.struts.actions.SaveEquipmentTemplateAction"
             name="equipmentTemplateForm"
             input="saveequipmenttemplate.input"
             scope="request">
             <forward name="saveequipmenttemplate.success"
             redirect="true"
             path="/showEquipmentTemplate.do" />
    </action>What I would like is something like this:
    <forward name="saveequipmenttemplate.success"
             redirect="true"
             path="/showEquipmentTemplate.do?recordID=XXX" />Where XXX is the recordID that was just modified.
    To recap, how do I pass a dynamic parameter to an action forward in struts?

    The following kludge works for me:
    public ActionForward execute(ActionMapping mapping, ActionForm actionForm,
        HttpServletRequest request, HttpServletResponse response )
        throws IOException, ServletException {
        // select the view
        ActionForward actionForward = mapping.findForward("foo.bar");
        ActionForward newActionForward = new ActionForward(actionForward);
        newActionForward.setPath(actionForward.getPath() + "?id=" + id);
        return newActionForward;
      }

  • Error when passing parameters in a link

    Hi:
    i have a report and a form. i've created a link that will point to the form from the report. So i've associated the link to a field of the report and edited it so that a key field in the form will be equal to a value passed from the report's key field. The fact is that passing static values works properly, but when passing parameters from a column it raises an error:
    Error: Unable to parse query (WWV-10200)
    ORA-06550: line 1, column 37:
    PLS-00201: identifier 'NO' must be declared
    ORA-06550: line 1, column 9:
    PL/SQL: Statement ignored (WWV-11230)
    Failed to parse as PORTAL - begin wwv_rptclip.g_row_object :=
    NO(wwv_rptclip.g_row_object) ; end; (WWV-08300)
    Does anybody know how to solve this problem? or why is the error raised?
    Thx.
    Regards. Urko.

    Also, is that a function NO you're trying to use? I'm not sure what that is, so it's possible when Portal tries to parse the sql string and execute it, it's not a recognizable function in the Oracle language or the appropriate grants on that function have not been made to the schema executing the report/form

  • Why an "ORA-01006: bind variable does not exist" error when no dynamic SQL?

    Hi all,
    While running PL/SQL in SQL Developer 3.2.09, I got the following error after adding a section of code. Note that nothing I'm doing has anything to do with dynamic SQL (which is what 01006 is supposedly about).
    Error report:
    ORA-01006: bind variable does not exist
    01006. 00000 - "bind variable does not exist"
    *Cause:   
    *Action:
    After commenting out the new chunk of code that caused the error, the error persisted.
    After deleting the new code, the error went away.
    What the heck!?!? If you have any ideas, please lay 'em on me.
    Thanks so much,
    Kim
    P.S. It's a few hundred lines of code, so I didn't append it to this post and I don't see how to attach a file.

    Let's review a few facts:
    1. You post a question in the sql developer forum that has no apparent relation to sql developer. You could confirm this by doing the test using sql*plus or some other tool.
    2. You provide NO information about what database you are even using. The only clue is an ORA -xxx message that means SOME version of Oracle is involved.
    3. You provide NO information about what the four digit version of Oracle DB is being used.
    4. You provide NO information about what the code in general or what that specific section of the code is even doing. The code could be doing literally anything that Oracle is capable of doing.
    That's a bit like calling a mechanic you don't know, telling them your car is making a funny noise and asking them what the problem with your car is.
    >
    While running PL/SQL in SQL Developer 3.2.09, I got the following error after adding a section of code. Note that nothing I'm doing has anything to do with dynamic SQL (which is what 01006 is supposedly about).
    Error report:
    ORA-01006: bind variable does not exist
    01006. 00000 - "bind variable does not exist"
    *Cause:
    *Action:
    The error gives no indication of where the error occurred in the code.
    >
    Your first clue that your troubleshooting method is seriously flawed is when you make statements that aren't supported by any evidence at all but appear to be nothing but your opinion.
    Your second clue is when those statements appear to directly contradict what Oracle is telling you.
    I'm talking about these two statements you make; which you state as if they were universal truths
    >
    nothing I'm doing has anything to do with dynamic SQL
    (which is what 01006 is supposedly about).
    >
    If thoe were true then your 'unstated' conclusion appears to be that Oracle is wrong in saying 'bind variable does not exist'
    Sorry - but I would place my money on Oracle.
    I'm sure the above may sound harsh - it is intended to be. My four major rules (there are more) when troubleshooting Oracle problems.
    1. Assume that Oracle is CORRECT when it tells you there is a problem.
    2. Assume that you are WRONG if your opinion conflicts with what Oracle is telling you - see rule #1.
    3. Don't make ANY other assumptions. You can form hypotheses but don't state them as facts until they are proven.
    4. Your 'opinion' is only useful to the extent that it can help you form meaningful hypotheses - see rule #3.
    >
    To reiterate, there is no dynamic SQL in the code.
    >
    To reiterate - if, as you state, that error relates to dynamic SQL and bind variables then it can not be disputed that:
    ORACLE DOESN'T AGREE WITH YOU!
    So let's try it my way and hypothesize that Oracle is correct (see rule #1 above).
    Then by definition this statement by Oracle is correct
    >
    ORA-01006: bind variable does not exist
    >
    And that should immediately raise this question:
    1. where might there be a bind variable that does not exist?
    which leads to a prerequisite question:
    2. where are ALL of the bind variables that might be being used?
    Question #2 is where you need to start your search. Here are at least five possibilities (there are more)
    1. your code - this should be easiest to check and you state that your 'anonymous' block does not have any.
    2. a table trigger - triggers that use the :NEW, :OLD or :PARENT pseudocolumns. Those psuedocolumns are BIND variables and the trigger code that uses them is, by definition, dynamic sql.
    3. a pl/sql package/function/procedure - any of these might be being called from trigger code or a view that is involved in the transaction. Any of these could take a parameter and/or use bind variables and cause your problem if that bind variable does 'not exist'.
    4. a functional index - can also trigger code from #3 above
    5. an audit trigger that logs the audit activity that your user or your code is performing. This code could be trying to use a SYS_CONTEXT environment variable that has not been created and cause a 'bind variable does not exist' error.
    See rule #1 - Oracle is CORRECT. Until you have identified and examined ALL of the code (not just your anonymous block) being executed and ruled it out you should continue with the hypotheses that Oracle is CORRECT.
    In the (extremely) unlikely event that you can show that Oracle is NOT correct you should file a SOR with Oracle.

  • Passing Dynamic Parameter to URL

    Hi All,
    I have a Webdynpro Application, where I am calling a separate iView through a URL (Quick link to that iView) using a LinkToAction UI element.
    Now, we need to pass a parameter (say Part Number) to the external iView through our webdynpro application.
    The external iView when called should be filled with a value by default. This value has to be retreived on some parameter from the main application.
    Can anybody suggest how to achieve this? We are presently using a common URL, so when the external window opens the iView will be blank. But now we need that when the user navigates to the external window, it should appear with the corresponding value.
    How can we make the URL to pass dynamic parameters?
    Any suggestions on this will be appreciated.
    Thanks,
    Becky.

    Hi Becky,
    A Web Dynpro application can get URL parameters passed to the iView with the following code:
    WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter();
    You can send URL parameters to a Web Dynpro page in the following ways:
    ●      Add to the URL a parameter called DynamicParameter, whose value is a set of key-value pairs to send to the page.
    The following is the format for the DynamicParameter parameter:
    DynamicParameter="param1=value1&param2=value2&"&
    The value ("param1=value1&param2=value2&") must be URL encoded.
    ●      Add to the URL parameters that start with sap-.
    ●      Add parameters to the businessParameters parameter of the navigateAbsolute() or navigateRelative() method, as described in Absolute Navigation and Relative Navigation.
    iView Parameters
    The following are the URL parameters that get passed to each iView on the page, and then to the underlying Web Dynpro application:
    ·        The static parameters defined in the Application Parameters property for each iView. The property value is a set of key-value pairs in the following format:
    param1=value1&param2=value2&
    ·        The parameters passed to the page (those defined in the DynamicParameterparameter as well as all parameters starting with sap-).
    For isolated iViews in a Web Dynpro page, only the parameters specified in the Parameters to Pass from Page Request property for each iView are passed to that iView.
    The property value is a list of parameter names, separated by commas, as follows:
    param1,param2,param3
    To specify all parameters, enter an asterisk (*).
    We did same for one of the requirement in our project let us know if you have any issues.
    Regards
    Jeetendra

  • Getting error when using the "/parameter" switch in command line run

    Has anyone experienced this problem before?
    My report queries over 100,000 records from a view. When the report is run from the command line every thing works fine.
    But when I add a condition using a "parameter", although the report still runs fine from the destop, when launched from the command line it errs.
    "Oracle Discoverer Desktop has encountered a problem and needs to close. ..."
    "The instruction at "0x0044397c" referenced memory at "0x0000004e". The memory cound not be "read"...."
    I'm guessing its a memory issue with my PC. I've tested using a parameter with other reports using fewer records and it doesn't err from the command line.
    I can work around the issue by not using a parameter but then I have 20 versions of the same report each with a different condition.
    Any suggestions would be appreciated.
    Lise McGillis

    Hi Michael,
    I'm using an DELL Intel Pentium 4 CPU 3.00 GHz with 1 GB of RAM. We use Microsoft Windows XP Prof version 2002.
    As for Discoverer we are using 10G, Desktop Client 10.1.2.48.18 - 1047500 KB available memory , 2099744 KB Free disk space.
    I'm not sure I have acess to a computer with more RAM but I'm looking into it.
    What I'm frustrated by is the fact that the parameter works fine when run directly from the desktop but when passed from the command line it bombs... but only when dealing with mega records.
    Lise.

  • Passing dynamic parameter to stored procedure from CR formula?

    Dear all,
    I need to insert in some textboxes the right string based on the desired Language Code.
    I crated a stored procedure in my db.
    CREATE PROCEDURE MY_GET_TRANSLATION
         @TextID nvarchar(8),
         @LangCode int
    This parameters are used as keys to get the Trans field.
    I created a workshop formula: GetTranslation
    Please, can someone suggest the correct statement to call my MY_GET_TRANSLATION  stored procedure passing parameters?
    I would like to call the GetTranslation formula from all my textboxes, passing the specific TextID value
    and visualized the right translated string.
    For example:
    in my TEXT1 textbox, I would like to call the GetTranslation formula passing the parameters
    TextID = "T000001"
    and
    LangCode = 13    (Italian language)
    How can pass dynamic parameters to a formula?
    How can pass dynamic parameters to a stored procedure from a CR formula?
    Regards
        Emanuele

    Dear Jason,
    I'm trying to modify a SAP B1 CR marketing report.
    This CR marketing document is called by SAP B1 automatically passing the Document Number and Document Type.
    The report uses the right SAP B1 tables to read the information of the header and rows of the document.
    The language of the document is contained in a field of the header table
    {MyMarketingDocTable.LanguageID}
    I created a user table named "MyTranslationTable" where I added some strings in different langiages.
    For example:
    TexiID            TextString              LangID
    T00001          Delivery                          8      
    T00001          Consegna                     13       (Italian translation)
    T00002          Invoice                           8
    T00002          Fattura                         13       (Italian translation)
    In the header of the report I'd like, for example, to visualise the string "Consegna" if my document is a delivery in italian language.
    I'd like to implement this method to translate all the textboxes (header, comments, etc.) based on the languageID of my document.
    For each textboxes, in the CR designer statically I know what TextID I want to visualized but dinamically I need to pass to my stored procedure the right language. I'd like my report automatically gets the language at run-time. I don't want that when I press the Print-preview button in SAP B1, the report asks to prompt the languageID.
    It already read the DocNum and DocType and it already filter the SAP B1 tables basing on the DocNum and DocType of the document. In this way it reads the right row in the SAP B1 table and in this way I can read all the fields of this row (also the languageID of the actual document).
    Regards
        Emanuele
    Edited by: Emanuele Croci on Dec 3, 2010 9:03 AM

  • How to skip the spaces, ' etc when passing the parameter to srw.run_report?

    Hi, I have got problem with passing parameter to srw.run_report. It seems it doesn't take the special symbols such as space, ', etc.. the statement is like:
    srw.run_report('report=test1 p_name='&#0124; &#0124;:p_title);
    if :p_title is "JOE", there is no problem to pass it, but if the :p_title is "JOE LI", then the value of the parameter can be passed to p_name.
    Does any one know how to skip those special symbols in the string when passing it to srw.run_report. Thank you very much.
    Joe

    Hi,
    Try this :
    srw.run_report('report=test1 p_name='&#0124; &#0124;
    chr(34)&#0124; &#0124;:p_title&#0124; &#0124;chr(34)
    );

Maybe you are looking for