Passing BOUSER variable as a parameter to a DB2 stored procedure

Hi,
We have created a stored procedure in DB2, which accepts five parameters.  We have to pass the userrname of the logged-in user as one of the five parameters. We have created a DeskI report based on this stored procedure and we have used @variable('BOUSER') as the value for the concerned parameter.
But Business Objects passes the string '@variable('BOUSER')' as it is instead of replace the variable with it's value. Does anybody have any idea on passing BO variables as parameters to a report based on stored procedure?

hi,
Create an object called 'user' with the following definition
select:
            username
where:
           username =@Variable('BOUSER')
Use this object 'user' as parameter to the storedprocedure.
Regards,
Vamsee

Similar Messages

  • In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String

    In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .

    Hi Srinath,
    The below blog might be useful
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
    PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
    regards,
    Harish

  • Problem passing Session variable as URL parameter?

    Hi,
    I am trying to create a multiple page entry form using
    coldfusion session. But I am having some problem when passing the
    session variable to url parameter. For test purpose I have created
    the following code:
    <cfif Not IsDefined("SESSION.AE")>
    <!--- If structure undefined, create/initialize it
    --->
    <cfset SESSION.AE = StructNew()>
    <!--- Represent current form srep; start at one --->
    <cfset SESSION.AE.StepNum = 1>
    </cfif>
    <cfif IsDefined("Form.GoBack")>
    <cfset SESSION.AE.StepNum = #url.StepNum# - 1>
    <cfelseif IsDefined("Form.Next")>
    <cfset SESSION.AE.StepNum = #url.StepNum# + 1>
    </cfif>
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    </head>
    <body>
    <form method="post"
    action="/AE/try.cfm?StepNum=#SESSION.AE.StepNum#">
    <input type="submit" name="GoBack" value="Back">
    <input type="submit" name="Next" value="Next">
    </form>
    </body>
    </html>
    When run it I get the following error:
    The value "" cannot be converted to a number
    The error occurred in C:\CFusionMX\wwwroot\AE\try.cfm: line
    11
    9 : <cfset SESSION.AE.StepNum = #url.StepNum# - 1>
    10 : <cfelseif IsDefined("Form.Next")>
    11 : <cfset SESSION.AE.StepNum = #url.StepNum# + 1>
    12 : <!---<cfset SESSION.AE.StepNum = #url.StepNum# +
    1>--->
    13 : </cfif>
    I couldn't figure out where is the problem. Any help is
    really appreciated.
    Thanks in advance.

    You are mixing up your gets and posts aren't you?
    You have your form method set to post which creates form
    variables not
    url variables. So when you try to use the url variable to set
    your
    session it does not exist.
    Change your SESSION.AE.StepNum = #url.StepNum# to
    Session.AE.StepNum =
    form.StepNum, note there is no need for the #'s.
    OR
    change your form method="post" to form method="get"
    Nagelia wrote:
    > Hi,
    >
    > I am trying to create a multiple page entry form using
    coldfusion session. But
    > I am having some problem when passing the session
    counter to url parameter. For
    > test purpose I have created the following code:
    >
    > <cfif Not IsDefined("SESSION.AE")>
    > <!--- If structure undefined, create/initialize it
    --->
    > <cfset SESSION.AE = StructNew()>
    > <!--- Represent current form srep; start at one
    --->
    > <cfset SESSION.AE.StepNum = 1>
    > </cfif>
    > <cfif IsDefined("Form.GoBack")>
    > <cfset SESSION.AE.StepNum = #url.StepNum# - 1>
    > <cfelseif IsDefined("Form.Next")>
    > <cfset SESSION.AE.StepNum = #url.StepNum# + 1>
    > </cfif>
    >
    > <html>
    > <head>
    > <title>Untitled Document</title>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    > </head>
    > <body>
    > <form method="post"
    action="/AE/try.cfm?StepNum=#SESSION.AE.StepNum#">
    > <input type="submit" name="GoBack" value="Back">
    > <input type="submit" name="Next" value="Next">
    > </form>
    > </body>
    > </html>
    >
    > When run it I get the following error:
    >
    > The value "" cannot be converted to a number
    >
    >
    > The error occurred in C:\CFusionMX\wwwroot\AE\try.cfm:
    line 11
    >
    > 9 : <cfset SESSION.AE.StepNum = #url.StepNum# - 1>
    > 10 : <cfelseif IsDefined("Form.Next")>
    > 11 : <cfset SESSION.AE.StepNum = #url.StepNum# +
    1>
    > 12 : <!---<cfset SESSION.AE.StepNum =
    #url.StepNum# + 1>--->
    > 13 : </cfif>
    >
    > I couldn't figure out where is the problem. Any help is
    really appreciated.
    >
    > Thanks in advance.
    >
    >
    >
    >

  • Pass a form parameter to the report stored procedure

    <CFSET myVar= "1">
    <cfquery name = "mydata" datasource = "myDSN">
        execute MySP
       <cfqueryparam value = "#myVar#" CFSQLTYPE = "cf_sql_integer">
      </cfquery>
       <cfreport format = "PDF" template= "MyReport.cfr"
        query = "#mydata#">
       </cfreport>
    I have above code to generate the report using stored procedure and pass parameter.
    I have to use CFSET to set the value of MyVar.
    I would like to know how I can use user input value in  my text control on the form.
    Your help and information is great appreciated,
    Regards,
    Iccsi,

    Hi ,
    Any help from Oracle please....
    Thanks
    Vishnu

  • How to pass the parameter values to the stored procedure from java code?

    I have a stored procedure written in sqlplus as below:
    create procedure spInsertCategory (propertyid number, category varchar2, create_user varchar2, create_date date) AS BEGIN Insert into property (propertyid, category,create_user,create_date) values (propertyid , category, create_user, create_date); END spInsertCategory;
    I am trying to insert a new row into the database using the stored procedure.
    I have called the above procedure in my java code as below:
    CallableStatement sp = null;
    sp = conn.prepareCall("{call spInsertCategory(?, ?, ?, ?)}");
    How should I pass the values [propertyid, category, create_user, create_date) from java to the stored procedure?[i.e., parameters]
    Kindly guide me as I am new to java..

    Java-Queries wrote:
    I have a stored procedure written in sqlplus as below:FYI. sqlplus is a tool from Oracle that provides a user interface to the database. Although it has its own syntax what you posted is actually PL/SQL.

  • How to Pass parameters to Crystal report 10 based on Oracle Stored Procedur

    Hi,
    I use the following code to pass the parameters:
    Rep.Tables[0].ConnectBuffer := Connection_Str;
    Rep.Tables[0].AliasName := 'REP';
    Rep.Connect.Propagate := True;
    Rep.ParamFields.ByName('Lang', '').CurrentValue := IIF(BiDiMode = bdRightToLeft, '2', '1');
    Rep.ParamFields.ByName('SESSION_ID', '').CurrentValue := IntToStr(Session_id);
    Rep.WindowState := wsMaximized;
    Rep.Show;
    The 1st parameter 'Lang' which created from crystal report pass well,
    but the 2nd parameter 'SESSION_ID' which created from Oracle Stored Procedures give the following Error:
    Error: 202 Parameter Name could not be found u2013 ParamFields.ByName
    However in MS SQL Server the above code work fine with the 2 Parameters.
    Any one has solution,

    Hello,
    Click on the businessobjects Tab above and then select Samples and dowload the sample app you for your SDK. There are a few samples for changing/setting Parameters.
    The Parameter collection has all parameters.
    Thank you
    Don

  • Set date as MM/dd/yyyy as in parameter for SQL Server stored procedure

    I have string date in MM/dd/yyyy .
    My requirement is to send date as in parameter to stored procedure in format MM/dd/yyyy .
    CallableStatement cstmt=null;
    cstmt = connection.prepareCall("{......
    How this to be done .I am Using SQL server.
    If i do like below data field is not updated by my code.
    cstmt.setTimestamp
    cstmt.setDate
    But if procedure is executed from SQL Query Anylaxer procedure is updating

    Hi,
    The format that appears by Default for date printing in the List is picked from SU01 parameters or SU3
    You can change the defaults by going into ur system profile.
    Su01 - Change - Go into Defaults tab.
    U can see various details like Start Menu, Logon lamguage, Decimal notation and date format. Choose the format u want and save .
    But the Date Format Is not reflected just by changing the format, you need to Log Off and Log In again to see the changed format in the output.
    also see the link
    http://web.mit.edu/sapr3/docs/webdocs/getstarted/gsSETTINGS.html
    Hope this helps.
    Thanks
    Ruchika

  • Pass context variables to input parameter

    Hello,
    I want to pass context parameters to a service call.
    If you read the context parameters, they are aways declared of type wd_this->element_<context-name>
    If I pass the context paramter to the service call, I get a type mismatch error.
    So how could I pass context parameters to a service call without binding it, because the ui-element is already bound to another context element.
    Regards Christian

    Hello,
    I've solved the problem.
    The parameter of the service call was a table parameter.
    I've forgotten to check the table-operation checkbox at the wizard.
    Regards
    Christian

  • Pass BLOB as parameter to Packaged Stored Procedure

    Does JDBC (thin or otherwise) support passing a BLOB as a parameter to a packaged stored procedure in Oracle, or do we have to do an 'insert' statement to get it in?
    All the articles I've seen seem to refer to insert and select, but I want to strictly enforce all access to the database being through a package rather than table level access.
    We've certainly had no difficulty receiving blobs from the resultset returned by our packaged procedures.
    Any help appreciated,
    Thanks
    Jason.

    C5112736 wrote:>
    > And then these 2 formulas 'Formula # 1' and 'Formula # 2' can be used to pass on to the stored procedure.
    Can someone please demonstrate exactly how to use formula results as date parameters to a SQL stored procedure?  Keep in mind, there are two parameters to the stored procedure.
    I have gleaned this much: Use Add Command and insert the procedure with
    EXEC ServerName.dbo.usp_sprocName;1 '{?StringParameter}'
    but if I try to do
    {CALL ServerName.dbo.usp_SprocName({@Formula1},{@Formula2})}
    then it gives the error "No value given for one or more required parameters". 
    Both of the parameters are VARCHAR(50).
    I have finally found this link: [http://msdn.microsoft.com/en-us/library/ms710248(VS.85).aspx|http://msdn.microsoft.com/en-us/library/ms710248(VS.85).aspx]
    This Microsoft site defines the format of the ODBC escape sequences, but I still do not know how to convince Crystal to insert it's parameter results or formula results.
    Pulling what's left of my hair out . . .
    ~ Shaun

  • How to pass bean variable to resourceID for Document Explorer ?

    Hello experts,   I have added  WebCenter document explorer  task flow in my ADF which as  parameter called resourceId.   I want to pass  bean variable to this parameter since  the Content IDs (doc Name or Ids) are  decided dynamically.
    When I provide ${'UCM57Server#dDocName:1379596941565_CONTACT_OPTREGI'}  as  resourceId  in the expression, it is working very fine.    But   samething  if I assign to a  bean variable and assign  bean variable  as  ${sessionScope.MyBean.docName},   it is  evaluating  the  bean variable  as ${'UCM57Server#dDocName:1379596941565_CONTACT_OPTREGI'}   and then throws  below exception :
    [2013-10-02T14:34:50.369-04:00] [DefaultServer] [WARNING] [WCS-07219] [oracle.webcenter.doclib.internal.view.backing.ContentProvider] [tid: [ACTIVE].ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: anonymous] [ecid: d50192415c689920:-7d97126c:1417a5d6a49:-8000-000000000000008a,0] [APP: CreateContactWSProxy] Invalid parameter combination: the connection name specified by resourceId = ${'UCM57Server#dDocName:1379596941565_CONTACT_OPTREGI'} is not the same as specified in parameter connectionName = UCM57Server.
    Bean variable is defined as :
    private String docName="${'UCM57Server#dDocName:1379596941565_CONTACT_OPTREGI'} ";
    Please provide me some guidance to pass  value to  resourceId  dynamically  through bean variable.
    thank you.

    Document explorer is not the way to go in order to view multiple documents of your choice, the Resource ID field is just a starting path. Check this link for all parameters about Documents Explorer
    If you want to view multiple documents, you should use Content Presenter and specify the query that these documents falls under. Check this link for add Documents Task Flows

  • Pass the variable from timeline to one of my classes !?

    Hello !
    The title says it all.
    I need to pass a boolean variable initially set to false to one of my classes called "EasyGame".
    It is than changed to true when one of the function in this class is runned.
    I tried some different ways but had no luck.
    Anyone have an idea ?

    If you instantiate the class in the timeline, you can just call a method in the class - passing the variable as a parameter.
    easyGame.setTimelineVar(myVar);
    And have another method that lets you retrieve the value:
    myVar = easyGame.getTimelineVar();

  • Passing Multi-Value Parameter to a Stored Procedure

    Has anyone experienced passing a Parameter (MultiValue) to a Stored Procedure? I am aware that Crystal Passes the Param as an Array. How would you go about handling this within a Stored Procedure???

    Hi Daniel
    Try as below:
    1. Create a Crystal report, and add a multi-value parameter.
    2. Since the multi-value parameter is treated as an array, create a formula that uses the JOIN function. Create a formula as below:
    //Formula: @JoinFormula
    Join ({?Multi-value parameter array},";")
    ====================
    NOTE:
    In the formula above, a semi-colon (";") is the delimiter.
    ====================
    3. Within the main report, create a subreport based on the stored procedure, and include the parameter to be populated with the multi-value list.
    4. Link the Join formula in the main report to the stored procedure parameter in the subreport.
    Doing so passes a multi-value parameter to the stored procedure.
    Hope this helps!!!!
    Regards
    Sourashree

  • CR XI - Pass a Multi-value Parameter to a Stored Procedure

    Hello,
    Here is my problem !
    My Main Report accept a Multi-value Parameter "myParameter".
    I create a formula "lstParameter" (Join({?myParameter},',')  linked to my SubReport (string static parameter based on a Stored Procedure  which returns a RefCursor (ORACLE)).
    When I launch the Main Report, he is blank...but if I open the subreport in the overview i can see the result...
    it seems like the MainReport don't call the SubReport, or something like that...
    I hope you can help me !
    Thanks
    Anthony
    Edited by: anthony.44 on Jan 12, 2012 4:53 PM
    Edited by: anthony.44 on Jan 13, 2012 9:51 AM

    hello,
    I resolve my problem....just inside into the detail of the Master report a result of a query (ex: select sysdate from dual)...and the sub report is called correctly

  • Executing a Variable in a Stored Procedure containing an Update Statement

    Hi,
    I have created a Stored Procedure, it has one input parameter. Inside the Stored Procedure there are 5 other variables are declared, based on the input parameter 4 of these variables are populated.
    Fifth variable is a a concatenation of text and some of these variables and creates a dynamic Update Statement. Once it is created I want to execute this variable but it is not executing.
    Could someone please help me in knowing how to execute a variable within a stored procedure that contains an update statement.
    Thanks for your help.
    Thanks
    Vineesh
    vineesh1701

    If you have set up the variable so that it contains a valid sql update, it should work.  For example, see below, which does do an update
    use tempdb
    go
    Create Table #Test(i int);
    Insert #Test(i) Values(1);
    go
    Create Procedure TestProc As
    Begin
    Declare @SQL nvarchar(250);
    Set @SQL = 'Update #Test Set i = 2';
    --Print @SQL;
    Exec sp_executesql @SQL;
    End
    go
    Exec TestProc
    -- Test Result
    Select * From #Test;
    go
    Drop Procedure TestProc;
    go
    Drop Table #Test;
    One thing I would recommend while testing is that you print out or select the variable that contains the dynamic sql.  (Like the above code where I have a print statement.  That lets you see exactly what you are executing and if there is any problem
    with the update command. 
    As Naomi said, to get anything more than general help, you will probably have to show us your code and the parameter values you are passing when you execute the stored proc.
    Tom

  • HELP: Can't Pass Parameters w/Stored Procedure as Data Connection

    I'm working on using an existing employment application in PDF format, and I want the form fields to be prepopulated with the user's specific data.
    I'd like is so that when a user clicks a link (like www.mysite.com/empapp/empapp.pdf?UserID=5), a dynamic PDF document will open up and that user's data will be populated inside of the form fields by using that user's "UserID" variable/parameter that was passed in the querystring.
    I've tried a stored procedure that contains the following select statement:
    SELECT * FROM tblEmpApp WHERE UserID = @UserID
    I've also tried entering this select statement manually into the box instead of using a stored procedure without success. When I try to use the stored procedure, I receive this error:
    Stored procedure "spEmpApp" has non-optional parameters.
    How can I set the PDF doc up to populate the form fields based on that passed parameter in the querystring???
    ******************PLEASE HELP!!!******************

    had this same issue.  following works for me.
    -create a dataconnection to the db with a random query to the table.
    -just clone the dataconnection
         oDConn = xfa.sourceSet.DataConnection.clone(1);
    -change the query attribute to the stored procedure
         oDConn.resolveNode("#command").query.select.value = "exec spEmpApp 'parameter'"
    -open the cloned data connection
         oDconn.open();

Maybe you are looking for

  • Solution Manager - EarlyWatch Alert shows red flag for managed system.

    Hi Guys, I tried to fix EarlyWatch alert report for Managed systems of QA and Dev which showed red flag on SolMan in DSWP. While trying to generate BACK RFC Destination to SolMan for QA and Dev, it messed up the EarlyWatch alert reports of Prod which

  • Report with subreports. Web Service/XML problem. Please help!

    Hi, I have a composite report (main report with 9 subreports). The report uses web service as datasorce and is provided with single xml file containing the schema and all the tables for the main reports and its subreports. The problem I encounter is

  • Adding check on the conversion of planned order to purchase order

    Hi all, i have the next requirement: during the conversion of flanned orders to purchase orders with the transaction MD04, i have to add a control that stops the conversion if the value of the storage location is missed. There are user exit or BadIs

  • Error report from validation

    Hi, I used validation in the transformation and pointed to PASS and FAIL. The fail should generate an error report, but where will i find the error report? Is it in the management console? Appreciate your help. Thanks, Arun

  • Add Image to Jasper Report with Struts 2 and Hibernate

    Hi I want to add image to jasper report[pdf] in the environment of Struts 2 framework and hibernate. I am trying this for last couple of days, but i am unable to get the work done. if any body know the steps to add image to jasper reports, please hel