Passing Parameter before execute-query?

I want to do the following scenario, please I need help so I can do this.
On Execute query i want a parameter to be passed.
For Example
I have a table of employees, and if any user executes query on employees form then before execution of query, form must first asks to give it a department name then it executes the query and of course we will get the result of that specific department.
I hope i have made clear what i am looking to do. but i need help here.
Thanks in advance.
Maz

Several ways
May be the easiest:
. define a non-DB Item (of apropriate type) ahead of your block to be queried,
may be in a new non-DB-block (depends on lyout of forms
. check on pre-query if there's a value given and abort if empty
. define in the where clause of the block: emp.columns = :<block.crit_item>
where crit item is the above mentioned non-DB-Item.
More effort for the following alternative:
. define a window
. define a content canvas (for the new window)
. define a non-DB-block with a non-DB-Item
. set focus to that item on KEY-EYEQRY (assumes that key-Exeqry is called in your query process) and ask user to enter the value
. redo query (KEY-EXEQRY on that block or add a button), this includes to set focus back to your daa block and do exe-qry there
. set where claus in analogy to above.

Similar Messages

  • How to pass parameter to the Query String of the Named Queries'SQL

    Firstly to say sorry,I'm a beginner and my English is very little.
    Now I want to know
    How to pass parameter to the Query String of the Named Queries'SQL in the Map editor.
    Thanks.

    benzi,
    Not sure if this is on target for your question, but see #5 in the link below for some web screencasts that show how to pass an input text form field value to the bind variable of a view object. If you're looking for something different, maybe provide some more details such as what you are trying to accomplish and what technology stack you are using - for example, ADF BC, JSF, etc.
    http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html
    Also see section 5.9 and chapter 18 in the developer's guide.
    thanks

  • 'Driver]Parameter missing' Error while trying to pass parameter to MS query & Return Data to Microsoft Excel

    I am trying to set up a parameter query using ODBC-Microsoft Query
    to BMC Remedy The ODBC connection is "AR System ODBC Data Source".
    I want to pass a parameter to modified date field and get all the remedy tickets for which the modified date is<= to the passed parameter date.
    So in MS query, SQL- 
    the query looks like
     WHERE ("Trouble Ticket"."Create Date">={ts '2014-10-01 00:00:00'}) AND ("Trouble Ticket"."Modified-date"<=?)
    I am getting the data fetched from database in the MS query window, but unfortunately
    When I click File-Return Data to Microsoft Excel, its showing an error: Driver]Parameter missing
    I set the connection properties- parameter-Prompt for value using the following string.
    Please help

    Hi,
    Based on the error message, I recommend we try the suggestion: Replace all "..."  with [...]
    http://www.pcreview.co.uk/forums/error-parameter-query-odbc-remedy-bmc-software-com-t3232964.html
    Then, if you want to connect the Remedy's oracle database, please see the thread:
    http://www.tek-tips.com/viewthread.cfm?qid=1123112
    We may try the workaround: Write an Excel macro which connects to the database and fetch the data based on the SQL query.
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    If you have further question about write macro, I recommend you post the question to the MSDN forum for Excel
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Passing parameter to a query in Discoverer Admiin custome folder.

    I am developing a report in which I need to paa in the request Id as parameter to display the user the data corresponding to that request Id. However the query is very complex and If I am enetering the request Id in Discoverer Desktop se as Condition for the workbook created the report takes a lot of time to generate. Is there any mechanism through which I can pass the parameter directly to the Custome folder query. As this will reduce my computation time since all the joins will be done only for the rows with that given request Id rather than for all the rows which is happenning correctly.
    Thanks.

    Hi,
    Well there is no straight forward way to do that.
    There is a work around to get that functionality by using outer tables or context.
    Take a look at the following posts:
    Re: Parameters in SubQuery
    Re: Parameters in Discoverer Administration
    Re: Passing multiple parameters into Custom Folder...

  • Pass parameter to Bex Query via Query String

    Hello,
    I am trying to pass a parameter into a Bex Query from a 7.0 portal. I created a Bex query iView and I have tried various permutations with the Bex Query String property of the iview but nothing seems to work. The query runs but the parameter is not passed in.
    For example I have tried: cmd=ldoc&TEMPLATE=Z_TEMPLATE&QUERY=Z_QUERY&Z_QUERY_VARIABLE=12345678 and several other variations of doing this.
    Thanks,
    Bert

    Hi Satish,
    I had already tried that but it did not work.
    Thanks,
    Bert

  • Passing Parameter to SQL-Query

    Hello ,
    i have an SQL Query as Data Source of my Crystal Report . I d like to pass the parameter to my SQL-Query.
    Parameter ?city
    Query1
    select
    Order ID,
    City,      -- How to pass my ?city here
    Amount
    from Orders,
    thanx ..

    You can do this by using the 'Add Command' feature.
    Click Add Command -> Create your ?City Parameter -> type SQL statement:
    select
    Order ID
    where City='{?City}'
    Make sure you add single quotes around your parameter.
    Regards,
    Zack H.

  • Changing sql-statement before executing query

    I want to change the sql-statement of a query just before it is executed.
    I have tried it with a query redirector/sessionevent listener, but I could get it to work.
    Do you have any examples.
    I want to change the tablename in a sql-statement like this:
    before
    select id from emp
    after
    select id from emp_v
    Any examples out there to do this?

    ... I am using SAP NetWeaver BI 7.0
    Monique

  • How to pass paramets to executable jar file

    hello,
    i have made a executable jar file. i want to pass a text file to the MAIN class of that executable jar at runtime, what can i do ?
    kindly please help.
    regards,
    mohamed asif

    I was not thinking of changing the manifest, but of how you invoke the main class.
    Consider the following three files:
    File: test.txtThis is
    a text fileFile: manifestmain-class: JarTestFile: JarTest.javaimport java.io.*;
    public class JarTest {
        public static void main(String args[]) throws IOException {
            BufferedReader in;
            if(args.length == 0) {
                in = new BufferedReader(new InputStreamReader(System.in));
            } else {
                in = new BufferedReader(new FileReader(args[0]));
            System.out.printf("The first line is: %s%n", in.readLine());
    }Compile and run like the following:pbrockway@linuxdeskd6off:~/Desktop$ javac -cp . JarTest.java
    pbrockway@linuxdeskd6off:~/Desktop$ jar cmf manifest test.jar JarTest.class
    pbrockway@linuxdeskd6off:~/Desktop$ java -jar test.jar test.txt
    The first line is: This is
    pbrockway@linuxdeskd6off:~/Desktop$ java -jar test.jar <test.txt
    The first line is: This is
    pbrockway@linuxdeskd6off:~/Desktop$ cat test.txt | java -jar test.jar
    The first line is: This is
    pbrockway@linuxdeskd6off:~/Desktop$In each case the contents of the text file are available to
    the main() method.

  • Passing parameter to Lov query

    I want to display a Lov having a runtime parameterised query .
    like :
    select * from dept where deptno=? .where deptno will be taken from form field .
    How to resolve .
    for further details:[email protected]
    some help me

    Hi,
    You can get value from url paramtetre by
    String xx=pageContext.getParameter(<url param name>);
    and then set it as session variable by
    pageContext.putSessionValue(<param name>,xx);
    to set session variable in you base page controller.
    To retrieve the value you can use
    String xx=pageContext.getSessionValue(<param name>);
    on your lov page.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to pass parameters to Xacute Query

    hai all,
               Can we pass parametes to Xacute Query using java script with out using any applet in the page..
    Thanks,
    Vidhya

    Hi Vidhya,
    use this function
    service.useService(http://"hostname"/Lighthammer/Illuminator?QueryTemplate=Querytemplatpath&Content-Type=text/xml&Param.1=Param",_"Service1");
    Hope That helps,
    Regards,
    Musarrat
    Edited by: Musarrat Husain on Mar 4, 2008 2:22 PM

  • Issue on How to mimic Deski document from CMS to local machine, pass parameter, execute and save in a mutiple report format then store in a network drive.

    Post Author: usaitconsultant
    CA Forum: JAVA
    Would you know if there's a way to mimic Deski
    document from BOXI server(CMS) to local machine, pass parameter, execute and
    save in a mutiple report format then store in a local drive or network
    drive? Most examples and tutorials in BO XI R2 I've seen are scheduling while drilling report is for web intelligence only and not desktop intelligence.  Please let me know your ideas. I would really appreciate your help. Thanks.

    Post Author: usaitconsultant
    CA Forum: JAVA
    Hi Ted,
    Thanks for the reply.The file is not available in the server. Though, I checked CMS and I found an instance in history tab and the status is failed with error below. 
                Error Message:
                A variable prevented the data provider Query 1 with BANRRD30 from being refreshed. (DMA0008).When I checked my codes, I found out that the object Im using is for web intelligence data provider. However, I cannot find any documentation and example for passing parameter values in desktop intelligence data provider. Any idea on this? You think this is not suported by Report Engine SDK?Thanks.    

  • How to pass a parameter into execute sql task and later use it into dataflow task?

    i am in a situation, where i have a logging table in which i have a primary key called ETL_log_ID which is an identity column and acts as a foreign key for various fact table and dimension tables which are populated using SSIS packages. Now i wanna use the
    ETL_log_ID as a parameter in the execute sql task which populates the log table and pass the same value in the data flow task which populates the facts and dimension. Can you let me know how to pass the parameter in a step by step procedure.
    Thanks,
    Nikhil
      

    Nikhil,
    You can check the following :
    http://www.programmersedge.com/post/2013/03/05/ssis-execute-sql-task-mapping-parameters-and-result-sets.aspx
    http://stackoverflow.com/questions/7610491/how-to-pass-variable-as-a-parameter-in-execute-sql-task-ssis
    Regarding the usage in Dataflow task, Can you elaborate on that a little?
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • CANT execute query with parameter on user defined tables using query genera

    Dear All,
    I have problem when executing query with parameter on user defined tables using query generator.
    It seems SBO cannot accept parameter to query user defined tables.
    I've tried these:
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = [%0] --- this FAIL
    I try to pass the value directly without using parameter and It works
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = 2 --- this SUCCESS
    This one works
    SELECT * FROM RDOC T0 WHERE T0.width =[%0]  --- this SUCCESS
    and this one works too
    SELECT * FROM RDOC T0 WHERE T0.width = 595  --- this SUCCESS
    Is there anyone can help me ....???
    Thanks,
    Alfa

    I  generated this code using query wizard ....
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = (N'2' )
    and replaced the (N'2' ) with [%0]
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = [%0]
    and It worked ......
    Thanks 4 all .....

  • Executing query with arguments- issue when  parameter value contains '&'

    My application inserts 'First name', last name' and last upd date to the table. it inserts all the data properly. Next level I access the information along with other tables using same arguments. But it is not fetching any data. I noticed it happens whenever the '&' is included in the parameter (first name). eg:
    'Margaret & John'. From the logs I noticed that first name it is not taking what I passed. It just stripping the first name from '&' onwards and taking only 'Margaret'. Here is the example from the log. You could notice only 'Margaret' instead of 'Margaret & John' in place of first argument.
    <2007-03-29 11:35:51,425> <DEBUG> <default.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.DBInteraction executeOutboundRead> Executing query with arguments [Margaret , Cohen, 2007-03-29T11:35:51-06:00]
    Appreciate your help if you could give me a hint how to resolve this issue
    Thanks
    Reddy

    Hi Reddy,
    from the log it looks like the DbAdapter received the value as 'Margaret '. Because parameter binding is used by default, the database shouldn't try to interpret the & as it is inside a bind variable.
    Could it be that the & is getting dropped somewhere else? Marc was suggesting you put that value inside a CDATA section or escape it. He probably showed that but when he hit Post Message it displayed the escaped & as &. I think we should find out where that & got dropped though. Normally BPEL will preserve it.
    Thanks
    Steve

  • Dynamically select Key Figures before executing web-based query

    Hi,
    I want to select(through checkbox) the Key Figures to be presented in a query before executing the query. The query is web-based.
    Has anybody an idea how to achieve this?
    Kind regards,
    Ton van Velzen

    You will need 2 templates.
    First one use the Checkbox item to list all the keyfigure structure elements, read the user selections using JavaScript, form the URL with the Filters for the key Figures and call the second template which will display the data.
    See the attached for passing filter values to BW Web templates.
    http://help.sap.com/saphelp_nw04/helpdata/en/59/edfe395dd76846e10000000a114084/content.htm

Maybe you are looking for

  • Importing iCal dates into Address book

    I have a calendar in iCal that stored severyone's brithday and I would like now to import these dates into my address book.  Is there any way? Thanks

  • Error in EPMContextMember function output

    Hi all, I am getting an unexpected behavior for the EPMContextMember function for only one Dimension Member. When the function is called with the context name parameter = FALSE or missing inside a report for a particular member, instead of getting th

  • Connecting agent gives HTTP error 12044L

    Trying to setup the agent fails on some machines for me. The machines where it fails are running in Azure in a VNET and are domain joined. Error in eventlog : HTTP operation failed with error "12044L" (12044L).  The query will be retried later. URL f

  • Browse to create a new file

    Hi, I am writing AIR 1.5 app, which emulates Excel 2007. Silly question: if I need to browse to create a new file (on local disk), how do I do it ? I tried File.browse, browseForOpen, browseForSave...  they all require for file to exist already. So w

  • Front video camera is not working on my iPad4.

    Just recently noticed my front video camera not working when I tried to facetime with a friend.  They cannot see me, and a blank square comes up as our picture.  When I open facetime the screen is just black.  If I open the camera, then switch to vid