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.

Similar Messages

  • How to pass dynamic values to JDBC Database adapter in PureSQL operation?

    I want to fetch the records from the table via JDBC database adapter with the criteria but I should not hardcode the values inside my query. I am using Execute by PureSQL operation. Values might change in future and it is the reason I should not hardcode the values and instead I should pass it dynamically.
    This is my query:
    SELECT FROM Table0 t0, Table1 t1 WHERE t0.Field1= 'ABC' AND t0.Field2= 'DEF' AND t0.Field3 = 'CBA' AND t1.FLAG IS NULL AND t1.Field1 = t0.Field4*
    The values 'ABC', 'DEF', 'CBA', 'NULL' are not fixed and it can be changed. Hence, I need to pass the values for these fields dynamically. What must be passed in the query and where to pass the User Defined Values during the run time.
    Please can anyone suggest how to resolve this. I am using SOA 11g.
    Thanks in advance.

    Hi,
    Ensure that you use the Adapter Configuration Wizard to do the query modification suggested by Arik. This will allow the schema for the DB Adapter getting created automatically. Also revisit this schema to assure that the data types of the bind parameters (parameters with #) have been correctly populated in the schema.
    You can get some help from this too although this doesn't fully match your use-case.
    Regards,
    Neeraj Sehgal

  • How to pass a parameter to a declared function

    Hello all
    Can anyone help me with the following? I have a function which reads files and then adds the contents to a database. As some of the files are quite big I want to add them one at a time to the database. To do this I am passing a value from another page, if this value matches the filename then only that file will be loaded. I know I cannot use the request object to pass the value, as my function is declared, and I should pass the value as a param. Does anyone have any example code of how I can do this?
    Thanks in advance for any help you can give me
    elliemay

    First, I would use a servlet instead of a JSP page, then I recommend using the "indexOf" method of the String object when you get the files name Array. If "indexOf(request.getParameter(Branch))" equals "-1", the file cannot be processed. Here is a quick example of a servlet doing the work (based on your code) :
    package mypackage1;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ProcessFiles extends HttpServlet
      public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
        File f = null;
        PrintWriter out = null;
        String sBranch = null;
        String sPath = null;
        String[] files = null;
        response.setContentType("text/html; charset=windows-1252");
        out = response.getWriter();
        sBranch = request.getParameter("Branch");
        // Check here if sBranch is not null
        InitDB();
        sPath = dbLookup("TEXT","T1_FILE_PATH");
        // Check here if sPath is not null
        f = new File(sPath);
        files = f.list();
        for (int i = 0; i < files.length; i++)
          // Acting like a filter using the "indexOf" method of the String object on each item
          if (files.length() == 15 && files[i].indexOf(sBranch) != -1)
    ProcessFile(files[i], sPath);
    DeleteFile(files[i]);
    out.println("<html>");
    out.println("<head><title>ProcessFiles</title></head>");
    out.println("<body>");
    out.println("<p>Files loaded</p>");
    out.println("</body></html>");
    out.close();
    private void ProcessFile(String sFileName,String sPathPrefix) throws Exception
    String record = null;
    int RecCtr = 0;
    final String EOR_DELIM = "*END*";
    String sBranch = sFileName.substring(0,3);
    String sRunDate = sFileName.substring(3,11);
    final String InitSQL = "Insert into T1 values ('" + sBranch + "',";
    String sSQL = InitSQL;
    int i;
    ExecSQLCmd("Delete from T1 where Branch='" + sBranch + "'");
    try
    FileReader fr = new FileReader(sPathPrefix + "/" + sFileName);
    BufferedReader br = new BufferedReader(fr);
    record = new String();
    while ((record = br.readLine()) != null)
    if (MyStrEquals(record,EOR_DELIM))
    sSQL=ChopOff(sSQL,1) + ")";
    ExecSQLCmd(sSQL);
    RecCtr++;
    sSQL = InitSQL;
    else
    StringTokenizer st = new StringTokenizer(record,"@");
    i=0;
    while (st.hasMoreTokens())
    sSQL += ("'" + Escape(st.nextToken()) + "',");
    i++;
    catch (IOException e)
    System.out.println("IOException error!");
    e.printStackTrace();
    throw e;

  • How to pass a parameter from one action1 in block1 to action2 in block2.

    Dear Experts,
    How to pass a parameter from one action1 in block1 to action2 in block2.
    My Process Structure is as follows..
           Process
                Sequential Block
                     Action 1
                     Parallel Dynamic Block
                             Sequential Sub Block
                             Action 2.
    while i am  trying to execute the action1 the following error is shown below:
    Cannot complete action: The activity could not be read.
    Please suggest me how to do?
    Regards,
    Rajesh N

    Hello Rajesh!
    I think you are talk about the mapping parameters of your process.
    This case in design time of your workflow, you have the vision of your blocks and actions, you have on action 1 the output parameter and you have the action 2 an input parameter.
    So you have that make a group mapping on your process, map in this group the action1 outpu parameter with the action2 input parameter.
    Regards, Ronaldo Rampelotti

  • How to pass dynamic selection to logical databse using ldb_process function

    dear friends,
                         can anybode tell me how to pass dynamic selection to the logical database when i m using LDB_PROCESS function module.  however, in EXPRESSIONS paramter of the function module i m  passing the selecti-option, it is passing their also but when i used more than  two select-option or paramter it throw an exception FREE_SELECTIONS_ERROR.
    SO PLEASE GUIDE ME HOW TO PASS MORE THAN TWO SELECT-OPTION IN LOGICAL DATANSE DYNAMICALLY USING LDB_PROCESS.

    would be nice if you post the answer to all

  • 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;
      }

  • How to use dynamic parameter when a report is created using Stored Procedures

    Hi all,
    any one have the idea of how to use dynamic parameter in crystal report XI R2
    when report is created using Stored Procedure.
    Regards
    shashi kant chauhan

    Hi
    You can create an SQL command in Database Expert > Expand your datasource > Add command
    Then enter the SQL query that will create the list of values to supply to the user
    eg select field1,field2 from table
    Then edit the parameter of the report.  These will be the SP parameters adn can be seen in field explorer.
    Change the parameter type to Dynamic
    Under the word Value click on Click here to add item
    Scroll down to your Command and select one of the values that you want to appear in the list
    e.g field1
    Then click on the Parameters field - this is essential to create the param
    You can edit other options as required
    That should do it for you.
    I must say that i use CR 2008 connected to Oracle 10g SP, but i reckon this will work for SQL DB and CR XI as well
    Best of luck

  • How to pass the parameter of a stored procedure to iReport

    Hi... i don't know how to pass the parameter of the stored procedure to the iReport.
    In the Report Query, i tried
    1. sp_storedprocedure ' value'
    2. sp_storedprocedure +''''+$P{parameter}+''''+
    3. sp_storedprocedure +$V+$P{parameter}++$F($F is a variable having a value of ' (a single quote))may you enlighten us please? thank you

    For M$ SQL server I find that it only works when U use the fully qualified name...
    e.g. catalod.dbo.my_procedure_name 'variable'
    My full query in the Report Query window is something like this:
    EXEC arc.dbo.jasper_Invoice 1000
    Note that you may find that selecting from VIEWS / TABLES fails for no apparent reason and iReport will prompt you with the usual very unhelpful (we have what we "pay" for) prompt, stating that "The document is empty".
    To work around this issue, where a statement like "SELECT * FROM arc.dbo.acc_invoices WHERE Invoice_id=1000" does not work, simply create a PROC, something like:
    CREATE PROC jasper_MyProc (@my_rec_id integer) AS
    SELECT * FROM arc.dbo.acc_invoices WHERE Invoice_id= @my_rec_id integer
    ...to wrap your SELECT statement, then call the PROC
    Edited by: Sylinsr on Apr 22, 2008 4:23 PM

  • How to Pass Multiple Parameter to Discoverer Custom Folder Created in Admin

    Hi,
    I have done as describe in doc id (metalink) note 304192.1 and it's ok.
    Now, my scope is to use the parameter declared in SETPARAMS not with the "=" condition but with "IN CLAUSE" (multipe values).
    for example (SQL Inspector):
    SELECT i106116 as E106116,i106117 as E106117,SUM(i106118) as E106118_SUM
    FROM ( SELECT DS_COMMESSA AS i106116, DS_SCENARIO AS i106117, DS_VALUE AS i106118 FROM (select ds_commessa, ds_scenario, DS_VALUE
    from dw_ods.ods_mbo_commessa
    where DS_TIPO_COSTO='COSTI MEDI'
    and ds_label='DIR'
    and cd_scenario in (1,2)
    and ds_commessa IN DW_ODS.SETPARAM.GET_PARAM1
    union all
    select 'Totale' as ds_commessa, ds_scenario, sum(DS_VALUE)
    from dw_ods.ods_mbo_commessa
    where DS_TIPO_COSTO='COSTI MEDI'
    and ds_label='DIR'
    and cd_scenario in (1)
    and ds_commessa IN DW_ODS.SETPARAM.GET_PARAM1
    group by ds_scenario
    ) CUO106102 ) o106102
    WHERE (1 IN (DW_ODS.SETPARAM.SET_PARAM1(:"Commessa")))
    GROUP BY i106116, i106117;
    where the parameter "commessa" is used with "IN" operator.
    Also tried to modifiy the SET_PARAM1 and GET_PARAM1 in order to use a "table of varchar2" ... but with no succes.
    Help please

    Rod,
    for the first "problem" I find the solution on metalink (note 304192.1) and works fine (also combining SET and GET together)... otherwise I don't know how use this "workaround"...
    for the multiple values on a single parameter (for example: Month='Jan,'Feb') I have tried to understand how DISCO pass these values to the SET function (I suppose like an array of varchar2) but don't work. After the first values (Jan) the reports stop... The problem in not how stored the values but understan how DISCO "pass/manage" these values (Jan,Feb)... Can u help me?
    my actual SETPARAMS package body is (like metalink):
    CREATE OR REPLACE PACKAGE BODY SETPARAM AS
    FUNCTION SET_PARAM1(P1 IN VARCHAR2) RETURN NUMBER IS
    BEGIN
    param1 := P1;
    return 1;
    END;
    FUNCTION GET_PARAM1 RETURN VARCHAR2 AS
    BEGIN
    return param1;
    END;
    FUNCTION SET_PARAM_MBO(p_anno IN VARCHAR2) RETURN NUMBER IS
    BEGIN
    anno := p_anno;
    return 1;
    END;
    FUNCTION GET_PARAM_MBO RETURN VARCHAR2 AS
    BEGIN
    return anno;
    END;
    END SETPARAM;
    ----------------------------------------------------------------------

  • How to pass Cascading Parameter in SSRS using Java

    How to pass Cascading Parameter in SSRS using Java---
    We are having a problem with dependent parameters.There are three drop down--
    1.first dropdown is of Country.When we select a country--Accordingly next dropdown(State)will populate
    2.Second dropdown is of State. When we select a state--Accordingly next dropdown(City)will populate.
    I have three data sources are
    CountryList-
    SELECT CountryRegionCode, Name
    FROM Person.CountryRegion
    ORDER BY Name
    StateList
    SELECT StateProvinceID, StateProvinceCode, CountryRegionCode
    FROM Person.StateProvince
    WHERE CountryRegionCode = @CountryRegionCode
    ORDER BY StateProvinceCode
    CityList
    SELECT StateProvinceID, City
    FROM Person.Address
    GROUP BY StateProvinceID, City
    HAVING (StateProvinceID = @StateProvinceID)
    ORDER BY City
    Ihave to show report that has been deployed on server on the besis of these parameters
    I am using ReportViewer in JSP Page through url--
    http://192.168.90.149/ReportServer/Pages/ReportViewer.aspx?%2fReport+Project1%2fCascading_Parameters&rs:Command=Render&rs:parameter=true&Country="+Country+"&State="+State;
    But it is not accepting parameter if they are cascaded.It is working fine if Both parameters are independent.
    Edited by: kaushlee on May 11, 2010 9:22 PM

    Take a look at set_custom_property:
    public static final ID SETTEXT = ID.registerProperty("SETTEXT");
    public boolean setProperty(ID pid, Object value)
        if (pid == SETTEXT)
    String text = value.toString();
    and in forms
    set_custom_property('beans.bean_item', 1, 'SETTEXT', 'some text');
    cheers

  • FTP how to pass dynamic filename/directory location - reading a file in 11g

    Hi All,
    We r using FTP adapter(SOA 11g) for getting files in remote server, May i know how to pass dynamic filename and directory where the file exists for reading in server.
    Thanks,
    Rak

    Hey according to my understanding, the Dynamic partner links are set only for the Outbound invocations only. Is my understanding right? if so, how do we create the dynamic partnerlinks for the ftp get kind of stuff...??
    Thanks in advance

  • How to pass dynamic filename to Receiver JMS channel

    Hi experts,
    I want to pass the dynamic filename to receiver JMS message Properties.
    for example
    I am passing directory name via adapter module AF_Modules/DynamicConfigurationBean with key and value combination like below. How to pass dynamic filename value to a dynamic property ( say DCJMSMessageProperty1)
    eg.
    key.0 - >insert http://sap.com/xi/XI/System/JMS DCJMSMessageProperty0
    value.0 - >  testdirectory ( which is static value)
    Note: Im have not created any ESR object . i just have to bypass the file to a jms queue. I have used AAE integrated configuration scenario ( file to jms )
    Regards,
    Balaji
    Edited by: Balaji Pichaimuthu on Jan 27, 2011 4:45 PM
    Edited by: Balaji Pichaimuthu on Jan 27, 2011 4:46 PM

    Already given link for the dynamic configuration code snippet in the earlier reply... Below is the code snippet
    Note: Use Adapter Specific Message Attributes for the target Communication Channel(CC).Check the indicator for filename in the advanced tab of CC
    //UDF code
    String filename="";
    String NameSpace = "http:/"+"/sap.com/xi/XI/System/JMS";
    try{
          DynamicConfiguration conf = (DynamicConfiguration) param.get(
            StreamTransformationConstants.DYNAMIC_CONFIGURATION);
          DynamicConfigurationKey key  =  DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File",   "FileName");
           // read filename value
           filename = conf.get(key);     
          // So far we extracted filename value .. now do your logic  something like this...
          DynamicConfigurationKey key2 = DynamicConfigurationKey.create(NameSpace,"yourjmsvalue goes here");
           conf.put(key2,filename);
         } catch(Exception e){

  • 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'>

  • How to Pass multiple parameter into single store procedure

    How to Pass multiple parameter into single store procedure
    like a one to many relationship.
    it is possible then reply me immediatly

    you mean like this .....
    CREATE OR REPLACE procedure display_me(in_param in varchar2,in_default in varchar2 := 'Default') is
    BEGIN
    DBMS_OUTPUT.put_line ('Values is .....'||in_param || '....'||in_default);
    END display_me;
    CREATE OR REPLACE procedure display_me_2 as
    cnt integer :=0;
    BEGIN
    For c1_rec In (SELECT empno,deptno FROM test_emp) Loop
         display_me(in_param => c1_rec.empno);
         cnt := cnt+1;
         end loop;
         DBMS_OUTPUT.put_line('Total record count is ....'||cnt);
    END display_me_2;
    SQL > exec display_me_2
    Values is .....9999....Default
    Values is .....4567....Default
    Values is .....2345....Default
    Values is .....7369....Default
    Values is .....7499....Default
    Values is .....7521....Default
    Values is .....7566....Default
    Values is .....7654....Default
    Values is .....7698....Default
    Values is .....7782....Default
    Values is .....7788....Default
    Values is .....7839....Default
    Values is .....7844....Default
    Values is .....7876....Default
    Values is .....7900....Default
    Values is .....7902....Default
    Values is .....7934....Default
    Values is .....1234....Default
    Total record count is ....18

  • How to pass page parameter to report portlet ?

    Portal: 9.0.4
    RDBMS: 9.0.1.5.0
    OS: Windows
    REF: How to pass page parameter to report portlet ?
    Hi,
    I create a Oracle Report as a Portlet in Portal (create Report Definition File Access and check on the option "Publish As Portlet" in the on the last step). My report has an "Additional User Parameter" and I has let it "Visible to user".
    When I put this portlet in my Portal page, I can see this parameter in the property/parameters of this page. However I cannot transfer my page parameter to this portlet parameter. Other portlets in this page (non-Oracle-Report portlets) are working fine with my page parameter.
    Please advice.

    I want to make sure we are talking about the same thing:
    After you add the portlet to the page, you go to the page properties, then the parameters tab, then there is a section at the bottom called "Portlet Parameter Values" where you can click and expand your portlet to see your portlet parameters.
    Is it here where your parameters just don't show up?
    If it is, try the following:
    - Add the portlet to another page and see if it still behaves the same.
    - Mark the parameters in the portlet as being non-public, re-generate portlet (on manage tab), then mark them as being public, re-generate and then try the above again (add to another page).

Maybe you are looking for