Calling databse function from report end. Using Evaluate function.

Hi All,
We have a req where we need to call the backend functions from the report end. I have seen that Evaluate function can be used to do the same. I tried replicating the same same but it didnt work.
Can any one please elaborate more on this. Syntax & other details. We need to also pass on parameters to the function, probably some column value.
Also please do let me know where all changes need to be done... RPD etc if applicable.
This is the functiion we need to replicate in OBIEE.
Nvl(dwh.dwh_pa_get_si_value_f(Pa_Projects_All_V.Project_Id,Pa_Periods_All_V.Period_Name,-1,Dwh_Pa_Project_Si_Info.Currency_Type,Dwh_Pa_Task_Si_V.Task_Number,'R'),0)
Thanks,
Pankaj

Hey Pankaj,
I got solution for your issue...
Under any logical table.. you create a logical column and
Select Existing logical columns as source checkbox
Click on Eclipse button..
Now here you write..
EVALUATE('dwh.dwh_pa_get_si_value_f(%1,%2,%3,%4,%5)' ,Pa_Projects_All_V.Project_Id,Pa_Periods_All_V.Period_Name,-1,Dwh_Pa_Project_Si_Info.Currency_Type,Dwh_Pa_Task_Si_V.Task_Number,'R')
And click ok..
Hope it works..
it worked for me..
Thanks & Regards
Kishore Guggilla

Similar Messages

  • Using EVALUATE function

    Hello to all!
    I have a problem using EVALUATE function in BI report column. In my schema I have created stored function.
    Call looks like
    evaluate('PKG1.GET_STAMP_DATE(%1)' as date,"Доп. аналитики"."Документ")
    Состояние: HY000. Код: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 904, message: ORA-00904: "PKG1"."GET_STAMP_DATE": invalid identifier at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
    I tried function IN package and OUTSIDE package. The same.
    What's wrong???
    Tnanks in advance...

    Hi,
    Check this function in database wether it is working or not.
    The identifier (column name, function, …) entered is invalid or unknown.
    This can have a number of reasons:
    It can be an unknown function, a column name that does not belong to a table, an invalid table alias, …
    The following function is not known
    SQL> select unknown_function from dual;select unknown_function from dual
    *ERROR at line 1:
    ORA-00904: "UNKNOWN_FUNCTION": invalid identifier
    The following column does not exist in the table:
    SQL> select X1 from dual;select X1 from dual
    *ERROR at line 1:
    ORA-00904: "X1": invalid identifier
    Please refer the below thread might be help u..
    DB Function errors out when trying to use in both Answers and RPD file.
    Urgent: Error while displaying data in OBIEE answers
    Thanks,
    Satya

  • Can we use Evaluate function in Prompt

    Hi all
    Can we use Evaluate Function in Dashboard Prompt?
    I need some exposure on how to use it.
    I am working on a HRMS-OLTP Source where I need to work with Oracle Functions from OBIEE.
    IF somebody can tell me that, It will be a favour for me....
    ThanQ
    Anand V

    Hi All,
    Here's an example of how to use evaluate. This use calls the Oracle TO_DATE function: EVALUATE('TO_DATE(%1,%2)' as DATE, '03/03/2009', 'MM/DD/YYYY')
    Here's how it works: EVALUATE( '<FUNC>' AS <DATATYPE>, VALUE1,VALUE2,etc)
    FUNC) Is the syntax for the function you are calling. Any parameters have to be replaced by %<number>, where number refers to the order in which you specify your parameters.
    DATATYPE) The datatype that the function will evaluate to. In this case, DATE.
    VALUE1) The latter part of the formula is a comma separated list of all the parameters used in the function. In this case, it's the date I want to cast
    VALUE2) This is the second parameter. You need as many as you referenced in your function. In this case, it's the date format.
    Good luck and if you found this post useful, please award points!
    Best regards,
    -Joe

  • Can we use Evaluate Function in Dashboard Prompt

    Hi
    Can anybody tell me
    Can we use Evaluate Function in Dashboard Prompt.
    If yes...How
    Thanks in Adv

    Yes ! You Can!
    while creating the dashboard prompt, under "Show" pick SQL results and you write the SQL statement and include the EVALUATE function.
    I have several such examples. Most of of dashboard pages are parameter driven.
    1. 1st paratmeter - users specify the dates
    2. 2nd parameter - constrains the results for the period specified in 1st paramter and my SQL for 2nd paramter looks like this -
    SELECT table1.column1
    FROM table, datedim1, table1,table2
    WHERE datedim1.date BETWEEN EVALUATE( 'TO_DATE(%1,%2)','@{presentation variable1}','dd/mm/yyyy') AND EVALUATE('TO_DATE(%1,%2)', '@{presentation variable 2}','dd/mm/yyyy')
    HTH
    Mahesh

  • How to call a form from report? in 6i

    How to call a Form from Report? In Developer 6i of oracle. Plz tell me tex.

    try this
    declare
       AppID PLS_INTEGER;
    begin
         AppID := DDE.App_Begin('ifrun60 module=myform.fmx userid=scott/tiger@mydb maximize=no', DDE.App_Mode_Maximized);
    exception when others then
          srw.message(1,'Errror');
    end;Baig
    [My Oracle Blog|http://baigsorcl.blogspot.com/]

  • Best practices on using EVALUATE functions

    hi, experts,
    I wanna know what is the best practices on using EVALUATE functions on obiee (calling oracle user defined functions)
    I found that if I use evaluate functions in Answers,
    obiee will construct a sql behind and then execute.
    sometimes, obiee contructs some unexpected sqls, and returns errors.
    so, is it better to use EVALUATE functions in logical columns ?
    thanks

    EVALUATE('DB_Function(%1)' as returntype, {Comma separated Expression})
    even when used in Logical columns, its gonna fire the same sql.

  • Calling dialog program from report

    Hi All,
    I need to call dialog program from report and do not want the initial screen to be shown and execute the dialog program. can this be possible, if yes please let me know this to do this, when I tried using leave to transaction its showing the initial dialog screen.
    Thanks in advane
    jog

    Hi,
    Create a Z trnsaction Code for the Transaction you want to call.
    Go to SE93. Give Transaction name and click on create.
    Select start object as 'Transaction with Variant' or 'Transaction with Parameter'.
    On second screen give transaction name and check the <b>check box for 'Skip initial screen'</b>.
    Find out the initial screen for the transaction and mention it.
    Now, you can call this Z transaction in your program.

  • Calling Forms 6i from Reports 6i. Is this possible. Run Product in Reports

    Re: Calling Forms 6i from Reports 6i. Is this possible?
    Hello,
    I have need programming in Oracle 9.x and using Forms and Reports for about 1.5 years. My ERP application calls a report from a form. I DO NOT have source code for the FORM. But, I DO have source code for the Report. So, from the Report 6i, I would like to call an Oracle Form 6i. Note: Not WEB based. My question is, IS THIS POSSIBLE. I can not find a command like Run Product in Report for calling a Form Application. Can someone please help me. I am under the gun to have this ready in a couple of days. Can I call an Active X Application from Reports..if Oracle Forms DOES NOT WORK. This needs to be a Form Application because of the nature of this request.
    Thank you
    Dennis

    Thank you
    ...the ERP vendor based on a form icon button will call a report. They will pass a TAG_NUMBER from a database record (that they just inserted) to the report. This tag_number will link to other tables and will display the report. The problem is ??..there is additional information that the user needs to scan into the database BEFORE the report runs. This is part of the business work flow.
    I have options.
    1) Get the ERP Vendor to call a FORM based on the name I provide to them.(Not really an option since they are unwilling to make custom mod changes.)
    2) Have the user key into the REPORTS PARM FORM. And I will update the tables...
    3) Call an Active OCX popup FORM from Reports and then update tables. Is this possible from Reports???..I am not sure if I like to introduce ms vb into an oracle application. It just does not seem to be a correct solution/procedure.
    4) Pay the ERP Vendor as a custom mod to make the changes for us. (unlikely because they do not like making custom mod changes)
    5) ....any more ideas/comments please let me know..
    Thank you Again
    Dennis Aubrey

  • Use EVALUATE function in obiee

    Hi ALL
    i hv a database query like this;
    select
    deptno,
    rtrim (xmlagg (xmlelement (e, ename || ',')).extract ('//text()'), ',') enamesfrom
    emp
    group by
    deptno;
    now, i want to use this using Evaluate function in obiee column formula.
    thn how to do it.
    Please reply.
    THX
    SAP

    Hello SAP,
    I have seen you for sometime and one thing I came to know is you are creating threads and once you got your solution or you dont feel to follow up you are just leaving the thread.
    see few here,
    Sorting month name
    Drill down problem
    Re: Filter in Union Request
    so please better close the threads which are answered and proceed further.

  • Can we call a BDC from REPORT program.

    hi
    can anybody tell me that
    can we call a BDC from REPORT program.
    thanks&regards

    Yes, It can be called.
    Infact you can generate a program from SHDB recording and in the program generated you can put necessary report logic and call the BDC/CALL TRANSACTION as required.
    <b>Please check here for a sample program,</b>
    http://www.sapdevelopment.co.uk/bdc/bdc_ctcode.htm
    Regards
    Kathirvel

  • Call Unix Command From Reports Using Java

    Hi,
    Could somebody please show me a sample coding to call Unix command from 10g report using java?
    In metalink doc id 361857.1 does not show much.
    Thanks,
    neemin

    Hi,
    I have a problem with synchronization of the java commands.
    In the Before Parammeter Form trigger, I have:
    function BeforePForm return boolean is
    rt ORA_JAVA.JOBJECT;
    proc ORA_JAVA.JOBJECT;
    v_txt varchar2(32000);
    i integer := 0;
    v_cd_modulo int;
    v_arqlog text_io.file_type;
    cursor c_evento is
    select codigo,
    nome
    from
    (select e.cd_evento || e.cd_edicao codigo
    ,nm_evento nome
    from grh_ev_evento e
    where e.CD_GRUPO in (select cd_grupo
    from grh_ev_adm
    where cd_usuario = (select cd_usuario
    from usuario
    where login_usuario = :AUTHID)))
    order by substr(nome, 11);
    begin
    -- Create the context for logged user
    if instr(upper(nvl(:AUTHID,'RWCLIENT')),'RWCLIENT') > 0 then
    :AUTHID := :SSO_USUARIO;
    end if ;
    TCEENV.SET_TCEENV(:AUTHID);
    if PK_SCA.SCA_GET_USER_RIGHTS(:sca_module_name, :AUTHID) IS NULL then
    srw.message(100, 'Access denided!');
    return (FALSE);
    end if;
    -- Create file in Report Server (UNIX)
    v_txt := '<BR>' || htf.formSelectOpen('P_EV_EDICAO', 'Evento: ');
    :p_file := '/u03/SCAWEB/repout/' || :sca_module_name || '_' ||
    pk_sca.sca_encrypt(:AUTHID || to_char(systimestamp, 'ss.ff'));
    v_arqlog := text_io.fopen (:p_file, 'A');
    text_io.put_line (v_arqlog, v_txt);
    for reg in c_evento loop
    i := i + 1;
    if i = 1 then
    v_txt := '<OPTION SELECTED VALUE="' || reg.codigo || '">' || reg.nome;
    else
    v_txt := '<OPTION VALUE="' || reg.codigo || '">' || reg.nome;
    end if;
    text_io.put_line (v_arqlog, v_txt);
    end loop;
    v_txt := '</SELECT></CENTER></form></BODY> </HTML>';
    text_io.put_line (v_arqlog, v_txt);
    text_io.fclose (v_arqlog);
    SRW.SET_AFTER_FORM_HTML(SRW.FILE_ESCAPE, :p_file);
    rt := RUNTIME.GetRuntime();
    proc := RUNTIME.exec(rt,'rm ' || :p_file);
    return (TRUE);
    end;
    The problem is that there isn't a "synchronize" command, and the
    RUNTIME.exec(rt,'rm ' || :p_file) don't works (it does nothing) because
    the SRW.SET_AFTER_FORM_HTML has a large delay and the following
    command is ignored.
    How can I solve it?
    thanks,
    lmprestes

  • Calling .jsx functions from .js files using HTML Widget

    Hi there,
    I'm using the HTML Widget in a panel to load an html file along with some javascript files. Is there a way to call .jsx Adobe functions from a .js file? I've successfully been able to call an alert() of a .jsx file from the html but have not been able to do anything further than that.
    For example:
    .js file:
    var x = foo('bar');
    alert(x);
    .jsx file:
    function foo(x) {
        alert('This works');
        var dir = $.fileName;
        alert('This doesn't work because of $.fileName');
        return 'Directory: ' + dir;}
    So, ultimately I would like to have an HTML Widget in my panel, press a link that will call fiddle with the open document and layer, then return some values back to the HTML Widget's js file.
    Thanks

    To the client browser, JSP is just HTML. Adding JS makes it DHTML, which provides the kind of applet/web page interaction you were referring to in the first post. Note that the applet and JS are both being run 'client side', whereas the JSP is generated 'server side'.
    A JSP environment can in some cases replace the JS (e.g. submit a form with values to the server, and use JSP to write the resulting applet page). This can be handy in the event that the end user does not have JS enabled, in that you can offer a 'pure HTML' solution. OTOH though, it is slower (requires a round trip to the server to do what the user asked for) and most users prefer the quicker 'click and see' philosophy of the Java/JS combo.
    So, my advice to you is that JSP adds very little value, here.

  • Calling javascript function from report customization form

    I have been unable to call any user-defined javascript function from Portal Report Customization forms.
    Even a simple Message Box function doesn't work. I've been placing my code in the ..after header PL/SQL section for the report customization form.
    htp.p('<script type="javascript">');
    htp.p('function MsgBox(message){');
    htp.p('alert(message);}');
    htp.p('</script>');
    htp.p('See if it works');
    I have verified in plain html that my syntax is fine. Even the syntax rendered by portal is correct:
    <script type="javascript">
    function MsgBox(message){
    alert(message);}
    </script>
    See if it works
    Despite this, you will get a javascript error that an Object is expected, MsgBox not defined. Clearly from the script above MsgBox is defined.
    I have tried any number of calls to user defined functions and can't get anything to work. However, calling native functions like 'alert' works fine ( ie
    See if it works
    Anyone know how I can call a user defined javascript function in a Portal Report Customization form?

    Try changing the code
    htp.p('<script type="javascript">');
    to
    htp.p('<script language="javascript">');
    Thanks
    -Krishnamurthy

  • To upload an excel file from front end using GUI_UPLOAD

    Hi All,
    Please give me the code to upload data from front end to internal table only using GUI_UPLOAD.
    Thanks,
    Kumar

    Check this program , reward points if helpful
    *& Report  ZEXCEL_UPLOAD                                               *
    report  ZEXCEL_UPLOAD    message-id ZMSG.
    tables :T001.
    data : begin of ITAB occurs 0,
          BUKRS like T001-BUKRS,
          BUTXT like T001-BUTXT,
          ORT01 like T001-ORT01,
          LAND1 like T001-LAND1,
          WAERS like T001-WAERS,
          end of ITAB.
    data : WA_T001_EXCEL like ITAB.
    data : IT_T001_EXCEL like standard table of WA_T001_EXCEL.
    data IT_TEXT like ITAB occurs 0 with header line.
    data : IT_RETURN  like standard table of ALSMEX_TABLINE,
           WA_RETURN like ALSMEX_TABLINE,
            WA_RETURNS like ALSMEX_TABLINE.
    data : V_FILE type STRING,V_MASK(10) type C.
    selection-screen  begin of block B1 with frame title TEXT-001.
    parameters P_FILE like RLGRAP-FILENAME .
    selection-screen end of block B1.
    selection-screen  begin of block B2 with frame title TEXT-002.
    parameter : R_TXT  radiobutton group G1 default 'X' user-command C1,
                R_EXCEL radiobutton group G1.
    selection-screen end of block B2.
    at selection-screen on value-request for P_FILE.
      if R_TXT = 'X'.
        V_MASK = '*TXT'.
      elseif R_EXCEL = 'X'.
        V_MASK = '*XLS'.
      endif.
      call function 'KD_GET_FILENAME_ON_F4'
        exporting
          PROGRAM_NAME  = SYST-REPID
          DYNPRO_NUMBER = SYST-DYNNR
          MASK          = V_MASK
        changing
          FILE_NAME     = P_FILE.
    at selection-screen.
      translate P_FILE to upper case.
      if R_TXT = 'X'.
        search P_FILE for '*TXT'.
        if SY-SUBRC <> 0.
          message E011.
        endif.
      endif.
      if R_EXCEL = 'X'.
        search P_FILE for '*XLS'.
        if SY-SUBRC <> 0.
          message E012.
        endif.
      endif.
    start-of-selection.
      V_FILE = P_FILE.
      if R_TXT = 'X'.
        call function 'GUI_UPLOAD'
          exporting
            FILENAME            = V_FILE
            FILETYPE            = 'ASC'
            HAS_FIELD_SEPARATOR = 'X'
          tables
            DATA_TAB            = IT_TEXT.
        if SY-SUBRC eq 0.
          message I013 with V_FILE.
          loop at IT_TEXT .
        write :/ IT_TEXT-BUKRS color 4, IT_TEXT-BUTXT color 3,IT_TEXT-ORT01
        color 5,
        IT_TEXT-LAND1 color 2,IT_TEXT-WAERS color 1.
          endloop.
        endif.
      elseif R_EXCEL = 'X'.
        call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
          exporting
            FILENAME    = P_FILE
            I_BEGIN_COL = 1
            I_BEGIN_ROW = 1
            I_END_COL   = 4
            I_END_ROW   = 2
          tables
            INTERN      = IT_RETURN.
        if SY-SUBRC eq 0.
          message I014 with P_FILE.
          sort IT_RETURN by ROW COL.
          loop at IT_RETURN into WA_RETURNS.
            WA_RETURN = WA_RETURNS.
            case WA_RETURN-COL.
              when 1.
                WA_T001_EXCEL-BUKRS = WA_RETURN-VALUE.
              when 2.
                WA_T001_EXCEL-BUTXT = WA_RETURN-VALUE.
              when 3.
                WA_T001_EXCEL-ORT01 = WA_RETURN-VALUE.
              when 4.
                WA_T001_EXCEL-LAND1 = WA_RETURN-VALUE.
            endcase.
            at end of ROW.
              append WA_T001_EXCEL to IT_T001_EXCEL.
              clear : WA_RETURN, WA_T001_EXCEL.
            endat.
          endloop.
        endif.
        loop at IT_T001_EXCEL into WA_T001_EXCEL.
          write :/ WA_T001_EXCEL-BUKRS color 1, WA_T001_EXCEL-BUTXT color 2,
                   WA_T001_EXCEL-ORT01 color 3,WA_T001_EXCEL-LAND1 color 4.
        endloop.
      endif.

  • Calling a procedure from Calculation View with Debug function

    Is it possible to call a debuggable hana procedure in a calculation view?
    I just saw the video  HANA Academy - HANA Native Development Workshop: SQL Script Editor - YouTube for HANA Native Development workshop and got the debug functionality to work for a file Procedure.
    But I am unable to call this procedure from a Calculation View.
    Below is the code I am using for the SQLScript Calculation View. Can someone tell me if this is correct?
    /********* Begin Procedure Script ************/
    BEGIN
    call "_SYS_BIC"."test-package.RF.SalesOrders.procedures/get_sls_ordtype"(SalesDocNo => '0070004105', SalesDocTypes => ?) ;
    var_out = CE_PROJECTION(:SalesDocTypes, ["SALESDOCNO" , "SALESDOCTYPE", "ORDVALUE"] );
    END /********* End Procedure Script ************/

    Hello,
    Just provide the out parameter in the call:
    Declare
      amount   number; -- OUT number argument populated by the procedure
    Begin
      -- call the X procedure --
      x( amount ) ;
    End;Francois

Maybe you are looking for