Calling a user defined function in a select statement

PLS-00231: function 'F_GET_PROJECT_ID' may not be used in SQL
I am caling a user defined function 'F_GET_PROJECT_ID' in a select statement and getting the above error .
Can any one help me to resolve it.
I can not replace the function with a local variable nor can I assign the output of the function to a variable and use the variable in the sql stmt. cos, the in put parameters of the function comes from the same select statement.
Please help
Thanks in advance

Can you provide your function code? Using a function like that is possible from the below example. I suspect something in your function code.
SQL> create or replace function sample_func(p_sal number)
  2  return number
  3  is
  4  v_sal number;
  5  begin
  6     v_sal := p_sal+100;
  7     return v_sal;
  8  end;
  9  /
Function created.
SQL>
SQL> select empno, ename, sal, sample_func(sal)
  2  from emp
  3  /
     EMPNO ENAME             SAL SAMPLE_FUNC(SAL)
      7839 KING             5000             5100
      7698 BLAKE            2850             2950
      7782 CLARK            2450             2550
      7566 JONES            2975             3075
      7654 MARTIN           1250             1350
      7499 ALLEN            1600             1700
      7844 TURNER           1500             1600
      7900 JAMES             950             1050
      7521 WARD             1250             1350
      7902 FORD             3000             3100
      7369 SMITH             800              900
      7788 SCOTT            3000             3100
      7876 ADAMS            1100             1200
      7934 MILLER           1300             1400
14 rows selected.
SQL>And yeah... your formatted code is this.
cursor c1 is
   SELECT t.upi_nbr upi_nbr,
          f_get_project_id(l.pay_type_code,
                           l.charge_type_nme,
                           l.charge_code) project_id,
          LAST_DAY(TO_DATE(SUBSTR(t.Year_Month, 5, 2)||'/'||'01'||'/'||SUBSTR(t.Year_Month,1,4),
                           'MM/DD/YYYY'))reporting_period_end_date,
          SUM (c.hours_worked_qty) reported_hrs
   from trs.trs_timesheet@oraprod5 T,
        trs.trs_line@oraprod5 L,
        trs.trs_cell@oraprod5 C
where T.upi_nbr=L.upi_nbr
and T.year_month=L.year_month
and L.row_nbr=C.row_nbr
and L.upi_nbr=C.upi_nbr
and L.year_month = C.year_month
and L.invalid_activity_ind = 'V'
and rtrim(L.charge_code) is not null
AND L.Pay_Type_Code<>'REQ'
and C.Hours_Worked_Qty > 0
GROUP BY t.upi_nbr,
         t.year_month,
         t.oui_nbr,
         l.charge_code,
         l.activity_detail_code,
         l.charge_type_nme,
         l.pay_type_code;Cheers
Sarma.

Similar Messages

  • Calling a user defined function as default value for a column

    Hi All
    Can we call a user defined function as default value for a column ??
    for example:
    create or replace  function test1  return number is
    begin
    return 10;
    end;
    create table testt
    (id  as test1,
      name varchar2(20));
    getting error:
    Error at line 1
    ORA-02000: missing ( keywordThanks
    Ashwani
    Edited by: Ashwani on Jan 16, 2012 1:19 AM

    Hi;
    For your issue i suggest close your thread here as changing thread status to answered and move it to Forum Home » Database » SQL and PL/SQL which you can get more quick response
    Regard
    Helios

  • Using a scalar user defined function in a select case statement

    I have a simple select statement below and I want to have a case statement for some conditions based on the result of the udf returned value. I then want the returned value from that specific case statement to be returned where i have indicated 'DISPLAY
    ZIPCODE' below.
    SELECT
        CASE
             WHEN (SELECT Top 1 ZipCode FROM ufn_GetAddressByBusinessEntityIDandAddressTypeID(table1.BusinessEntityID,712) IS NOT NULL THEN 'DISPLAY ZIPCODE'
             WHEN (SELECT Top 1 ZipCode FROM ufn_GetAddressByBusinessEntityIDandAddressTypeID(table1.BusinessEntityID,714) as r) IS NOT NULL THEN 'DISPLAY ZIPCODE'
             ELSE NULL
           END as Zipcode,
    FROM
    table1

    SELECT COALESCE(ufn_GetAddressByBusinessEntityIDandAddressTypeID(table1.BusinessEntityID,712),ufn_GetAddressByBusinessEntityIDandAddressTypeID(table1.BusinessEntityID,712)) AS Zipcode
      FROM table1
    Nope. This is two function calls. coalesce(a, b, c, ...) is just syntatic sugar for
       CASE WHEN a IS NOT NULL THEN a
            WHEN b IS NOT NULL THEN b
            WHEN c IS NOT NULL THEN c
       END
    But if you use isnull it's a different matter. (But isnull() permits two arguments.)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Calling a User defined function from Data Model in BIP

    I am new to Procedures and Functions and am not sure if I am doing it right, so please bear with me.
    My User Function:
    create function MyTempFunction(@master_key varchar(max))
    returns VARCHAR(MAX)
    begin
    DECLARE @Names VARCHAR(8000)
    SELECT @Names = COALESCE(@Names + ', ', '') + vndt.name
    from
    [CMPROJ].[dbo].[VNDT] as vndt,
    [CMPROJ].[dbo].[CRQT_QUESTION_DISTRIBUTION] as CQD
    where CQD.parent_key=@master_key
    and CQD.project_name=vndt.project_name
    and vndt.initials=CQD.distributed_to_ini
    return @Names
    endIf I call the function in my query window I get a result:
    "Ron Swanson, Anne Perkins"
    But if I put the same query into my Data Model in BI Publisher and try getting the XML Output, my data is blank.
    This is how I call the function:
    select top 1 dbo.MyTempFunction('98d4dfa893164d138d5f961fa4') as Names from dbo.[CRQT_QUESTION_DISTRIBUTION]And I know that BIP did access the function, because the first time I tried to save the new SQL Query, it threw an error saying it was denied access to the function and I had to add the user to be able to execute the function.
    I am new to doing Procedures and Functions, so I am not sure if I am even doing it right.
    And don't know if even calling procedures or functions works form BIP.
    Any help appreciated.
    Thanks

    Thanks for the suggestion, but I still get nothing in the XML result set.
    I enabled some extra logging in the bipublisher.log file and I get an error:
    [2012-12-21T08:14:37.658-06:00] [AdminServer] [TRACE] [] [oracle.xdo] [tid: 11] [userId: <anonymous>] [ecid: e661403a668a80f1:56f304f5:13baf5ed125:-8000-0000000000003097,0] [SRC_CLASS: oracle.xdo.dataengine.XMLPGEN] [APP: bipublisher#11.1.1] [SRC_METHOD: processSQLDataSource] Sql Query :Distrubuted_To: select dbo.MyTempFunction('98d4dfa893164d138d5f961fa4') as Names [[
    from dbo.[CRQT_QUESTION_DISTRIBUTION]
    [2012-12-21T08:14:37.658-06:00] [AdminServer] [WARNING] [] [oracle.xdo] [tid: 11] [userId: <anonymous>] [ecid: e661403a668a80f1:56f304f5:13baf5ed125:-8000-0000000000003097,0] [APP: bipublisher#11.1.1] java.io.IOException: [Hyperion][SQLServer JDBC Driver]Object has been closed.[[
         at hyperion.jdbc.sqlserverbase.BaseCharacterStreamWrapper.validateClosedState(Unknown Source)
         at hyperion.jdbc.sqlserverbase.BaseCharacterStreamWrapper.read(Unknown Source)
         at oracle.xdo.dataengine.LOBList.readLobChunks(LOBList.java:263)
         at oracle.xdo.dataengine.XMLPGEN.writeLobToStream(XMLPGEN.java:976)
         at oracle.xdo.dataengine.XMLPGEN.writeRowSetListToStream(XMLPGEN.java:948)
         at oracle.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:479)
         at oracle.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:345)
         at oracle.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:286)
         at oracle.xdo.dataengine.XMLPGEN.writeXMLDataStructure(XMLPGEN.java:216)
         at oracle.xdo.dataengine.XMLPGEN.processDataSet(XMLPGEN.java:1450)
         at oracle.xdo.dataengine.XMLPGEN.processMergedDataSet(XMLPGEN.java:1258)
         at oracle.xdo.dataengine.DataProcessor.processData(DataProcessor.java:366)
         at oracle.xdo.servlet.dataengine.DataProcessor.processData(DataProcessor.java:402)
         at oracle.xdo.servlet.dataengine.DataProcessor.processData(DataProcessor.java:389)
         at oracle.xdo.online.data.ClassicDataProcessor.process(ClassicDataProcessor.java:157)
         at oracle.xdo.servlet.ReportModelContextImpl.getReportXMLData(ReportModelContextImpl.java:232)
         at oracle.xdo.servlet.CoreProcessor.process(CoreProcessor.java:310)
         at oracle.xdo.servlet.CoreProcessor.generateDocument(CoreProcessor.java:93)
         at oracle.xdo.servlet.ReportImpl.renderBodyHTTP(ReportImpl.java:1059)
         at oracle.xdo.servlet.ReportImpl.renderReportBodyHTTP(ReportImpl.java:624)
         at oracle.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:473)
         at oracle.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:445)
         at oracle.xdo.servlet.XDOServlet.doGet(XDOServlet.java:265)
         at oracle.xdo.servlet.XDOServlet.doPost(XDOServlet.java:297)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.xdo.servlet.metadata.track.MostRecentFilter.doFilter(MostRecentFilter.java:65)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:122)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.xdo.servlet.init.InitCheckingFilter.doFilter(InitCheckingFilter.java:64)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    ]]This same error gets displayed 5 times in a row with the new changes to the query.
    And If I look in the XML result set that I get when I do a test run I get:
    <G_7>
         <NAMES></NAMES>
    </G_7>
    <G_7>
         <NAMES></NAMES>
    </G_7>
    <G_7>
         <NAMES></NAMES>
    </G_7>
    <G_7>
         <NAMES></NAMES>
    </G_7>
    <G_7>
         <NAMES></NAMES>
    </G_7>So you can see that I am getting a blank value 5 times.
    When I run it with the "top 1" I only get the error once and I only see 1 entry in the XML.
    Thanks,

  • Help: How to call a user defined function in a data block query?

    I created a string aggregation function in the program unit, see reference:
    http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php
    I now like to call the function in my data block query. I got the error: ORA-00904: 'concatenate_list' invalid identifier.
    Please help.
    Thank you in advance.
    Jimmy

    Hi,
    You can write UDFs in java in Graphical mapping to enhance your XI Graphical mapping functionality
    The steps for doing it would be:
    1. Click on Create New function Button found on Bottom left corner on your XI Mapping window.
    2. Write your java code.
    3. Run the Mapping Test as usual.
    >>The module that is given here ...where and how it is used.
    The adapters in the Adapter Framework convert XI messages to the protocols of connected external systems and the other way around. When doing so, some
    functionality might need to be added specific to a situation which is possible with the use of custom modules.
    Typical example would be validation of file content when using a File Adapter or modification of the message payload to a common content structure which is not supported by any of the standard SAP modules.
    An Adapter module is developed as an Enterprise Java Bean and is called locally by the Adapter.
    An example on modules :
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/da5675d1-0301-0010-9584-f6cb18c04805">How to develop a module for reading file name in a sender file adapter XI 3.0</a>
    Cheers,
    Chandra

  • Can COLMAP call a User Defined Function?

    Hi, I'm new to GoldenGate. We are replicating many source databases into a single target database. All source databases have the same schema but with different data. I need to generate a GUID to insert into a new column in every table in the source database. Can I do this with COLMAP? If so, how can I generate a GUID with COLMAP?
    If this is not possible, what would be a good solution? Should we use BEFORE INSERT triggers in the source DB to insert the GUID? The guid column is only on the target DB and not in the source DB.
    Thanks.

    Create a procedure to get the data you want:
    CREATE OR REPLACE PROCEDURE LOOKUP
    (CODE_PARAM IN VARCHAR2, DESC_PARAM OUT VARCHAR2)
    BEGIN
      SELECT DESC_COL INTO DESC_PARAM
      FROM LOOKUP_TABLE
      WHERE CODE_COL = CODE_PARAM;
    END;Then, in your replicat, use SQLEXEC:
    MAP HR.ACCOUNT, TARGET HR.NEWACCT,
    SQLEXEC (spname lookup,
    params (code_param = account_code)),
    COLMAP (USEDEFAULTS, newacct_id = account_id,
    newacct_val = @GETVAL(lookup.desc_param));The @GETVAL function maps values returned in desc_param to the newacct_val column.

  • Calling user defined functions through OBIEE

    Can anyone tell me how I can call the user defined functions on database through the new BI tool.
    The idea is to collect certain parameters through the prompt when launching the request, the function is supposed to pick up the parameters, make a certain calculation, and return a value.
    I wrote the function, I just need help over how to call the function through the BI tool - that was pretty easy in the old Discoverer.
    Thanks.
    Message was edited by:
    user611377

    Hi Kresimir ,
    You can use EVALUATE function to call a user defined function.
    EVALUATE('FUNCTIONNAME(%1,..)' As DATATYPE,parameter1,...)
    Here DATATYPE is the returntype of function.
    Hope this will help.
    Thanks
    Ashok

  • Calling user defined functions in Matlab Script Node

    Greetings!
    I am not successful in calling a user defined function inside a Matlab Script Node.
    The path has been added to Matlab, but the Matlab script node is not calling my function.
    I am calling it as follows:
    a= fcd(b,c);
    and the fcd.m file is calculating the 'first central difference' - works in Matlab, but not in LabVIEW:
    function MtxOut=fcd(MtxIn,dt)
    %MtxOut=fcd(MtxIn,dt)
    %first central difference method of finding instantaneous
    %first derivatives
    %MtxIn = MxN matrix of inputs
    %dt = time change between inputs
    %MtxOut = MxN matrix of first derivatives of inputs
    r=size(MtxIn,1);
    c=size(MtxIn,2);
    MtxOut(1,=(MtxIn(2,-MtxIn(1,)/dt;
    MtxOut(r,=(MtxIn(r,-MtxIn(r-1,)/dt;
    for i=2:r-1
        for j=1:c
            MtxOut(i,j)=(MtxIn(i+1,j)-MtxIn(i-1,j))/(2*dt);
        end
    end

    Matthew:
    What version of MatLab, LabVIEW are you using?. Also, what type of errors are you running into?.
    Thanks,
    Rudi N.

  • User Defined Function in MV

    Hello All,
    Can we have user defined function in the select clause of a materializied view.
    I am aware that we cannot have subquery in the select clause of MV.
    Regards,
    Kumar.

    That's not hard to test ...
    SQL> create function f return varchar2
      2  is
      3  begin
      4    return 'I''m from function f';
      5  end;
      6  /
    Functie is aangemaakt.
    SQL> create materialized view my_mv
      2  as
      3  select empno
      4       , ename
      5       , f
      6    from emp
      7  /
    Gematerialiseerde view is aangemaakt.
    SQL> column f format a30
    SQL> select * from my_mv
      2  /
         EMPNO ENAME      F
          7369 SMITH      I'm from function f
          7499 ALLEN      I'm from function f
          7521 WARD       I'm from function f
          7566 JONES      I'm from function f
          7654 MARTIN     I'm from function f
          7698 BLAKE      I'm from function f
          7782 CLARK      I'm from function f
          7788 SCOTT      I'm from function f
          7839 KING       I'm from function f
          7844 TURNER     I'm from function f
          7876 ADAMS      I'm from function f
          7900 JAMES      I'm from function f
          7902 FORD       I'm from function f
          7934 MILLER     I'm from function f
    14 rijen zijn geselecteerd.If you want the materialized view to be fast refreshable, then the answer is no.
    Regards,
    Rob.

  • Using Xquery predefined functions in User defined functions

    Hi All,
    I have a requirement of calling a user defined function in osb xquery file.In that function i have to use osb predefined string functions but they are not working it shows error message in xquery file.Can you please suggest how to use them in user defined functions.
    Thanks,
    Srinivas.

    Hi Eric,
    I have a Proxy service it reads mfl data and transform to some other schema.In this Transformation one element data is taken and we have to manipulate that data
    based on the incoming value and return .For this process i took one function and i have to check weather it contains some symbols like ^,~ so i used contains function of
    String with and with out prefix with if else condition it gives error "Unexpected token if"
    declare function insp:buildReferenceRange($inRange as xs:string)
    as xs:string
    let $low:=""
    l
    if(contains($inRange,"^")) //"Unexpected token if"
    name space and prefix are defined in the top of file.
    Thanks,
    Srinivas.

  • Calling ORACLE Store Procedure with parameters in user define function

    Hi everybody,
    We have a scenario connecting Oracle DB thru JDBC adapter.
    We have to call store procedure with input parameter and output parameter to retrieve data from DB. The implementation was made using JDBC adapter by building the correct XML message with EXECUTE action, and it works fine.
    Now we need to use DB lookup within mapping. I wrote users define function with SELECT statement (using the JDBC adapter) and it works fine but I need to call store procedure in ORACLE instead of SELECT statement.
    I found lot of examples concerning DB lookup but none of them explained how to write UDF calling store procedure in ORACLE with input and output parameters.
    I am looking for an example.
    Thanks in advance,
    Gigi

    I agree with you, but issue is we have lots of existing store procedure, which we need to call where damn required. I am sure those will be few but still i need to find out.
    If you think you are going to get existing MS Stored Procedures  or Oracle Packages that had nothing to do with the ORM previously to work that are not geared to do simple CRUD operations with the ORM and the database tables, you have a rude awakening
    coming that's for sure. You had better look into using ADO.NET and Oracle Command objects and call those Oracle Packages by those means and use a datareader.
    You could use the EF backdoor, call Oracle Command object and use the Packages,  if that's even possible, just like you can use MS SQL Server Stored Procedures or in-line T-SQL via the EF backdoor.
    That's about your best shot.
    http://blogs.msdn.com/b/alexj/archive/2009/11/07/tip-41-how-to-execute-t-sql-directly-against-the-database.aspx

  • How to add user defined functions in Menu bar of a Selection Screen?

    Hi,
    Can anybody please suggest me that how can I add user defined functions in the menu bar of a Selection Screen?
    Regards
    s@k

    Dear Amit,
    I am referring to the standard SAP program: RIEQUI20.
    On the initial screen, there are 3 tabs.
    Code:
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tab FOR 25 LINES.
    SELECTION-SCREEN TAB (20) tab1 USER-COMMAND ucomm1
                         DEFAULT SCREEN 001.
    SELECTION-SCREEN TAB (20) tab2 USER-COMMAND ucomm2
                         DEFAULT SCREEN 002.
    SELECTION-SCREEN TAB (20) tab3 USER-COMMAND ucomm2
                         DEFAULT SCREEN 003.
    SELECTION-SCREEN END OF BLOCK tab.
    AT SELECTION-SCREEN.
      CLEAR gv_okcode.
      gv_okcode = sy-ucomm.
      CLEAR sy-ucomm.
      CASE gv_okcode.
        WHEN 'IH08'.
          CALL TRANSACTION 'IH08'. "Equipment Selection
        WHEN 'IW29'.
          CALL TRANSACTION 'IW29'. "Notification Selection
        WHEN 'IW39'.
          CALL TRANSACTION 'IW39'. "Order List Selection
        WHEN OTHERS.
      ENDCASE.
    *   Check date:                                         
      IF NOT datuv IS INITIAL                            
      AND NOT datub IS INITIAL.                         
        IF datub >= datuv.                              
        ELSE.                                           
          MESSAGE e884(ih) WITH datuv datub.            
        ENDIF.                                           
      ENDIF.                                             
      IF variant IS INITIAL AND
         dy_vari IS INITIAL.
        PERFORM get_default_variant_f14 USING variant.
      ENDIF.
      PERFORM variant_existence_f14 USING variant.
      IF datuv IS INITIAL.
        datuv = sy-datum.
      ENDIF.
      IF datub IS INITIAL.
        datub = sy-datum.
      ENDIF.
      IF sy-ucomm = 'ADDR'.
        PERFORM adress_sel_f01 USING 'EQUIR'.
      ENDIF.
      PERFORM check_parnr_f76.
    *  AT SELECTION SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
      STATICS: l_slset TYPE sy-slset.
    *--- Set initial variant
      PERFORM variant_init_f14 USING 'INST' 'INST' 'INST' 'RIEQUI20'.
      IF variant IS INITIAL AND
         dy_vari IS INITIAL AND
        gv_variant_flag IS INITIAL.
        PERFORM get_default_variant_f14 USING variant.
        gv_variant_flag = 'X'.
      ENDIF.
    *--- Set Icon for adress-button
      PERFORM set_icon_f01 USING dy_adrfl ad_icon text-ad0 text-ad1.
    *--- get classification data from select option
    *--- (if new variant or if called via submit or F3)
      IF ( l_slset NE sy-slset ) OR
         ( s_comw[] IS NOT INITIAL AND gt_clsd_comw[] IS INITIAL ).
        l_slset = sy-slset.
        gv_class_old = dy_class.
        gv_klart_old = dy_klart.
        PERFORM copy_selopt_comw_f79 TABLES gt_clsd_comw s_comw.
        PERFORM class_search_init_f77 USING 'EQUI'.
      ENDIF.
    *--- set Icon for classification
      LOOP AT gt_clsd_comw TRANSPORTING NO FIELDS          
                          WHERE atcod > '0'.               
        EXIT.                                              
      ENDLOOP.                                             
      IF sy-subrc IS INITIAL.
        gv_comw_flag = 'X'.
      ELSE.
        CLEAR gv_comw_flag.
      ENDIF.
      PERFORM set_icon_f01 USING gv_comw_flag cl_icon text-cl0 text-cl1.
      CALL METHOD cl_uid_cust=>selection_screen_output.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR variant.
      PERFORM variant_inputhelp_f14 USING variant 'RIEQUI20'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR dy_parnr.
      PERFORM f4_for_parnr_f76.
    AT SELECTION-SCREEN ON BLOCK clse.
      IF dy_class NE gv_class_old
        OR dy_klart NE gv_klart_old.
        gv_class_old = dy_class.
        gv_klart_old = dy_klart.
        CLEAR gv_comw_flag.
        REFRESH gt_clsd_comw.
        REFRESH s_comw.
      ENDIF.
      PERFORM class_exist_f77 USING dy_klart dy_class 'DY_CLASS'.
      IF sy-ucomm = 'COMW'.
        CALL FUNCTION 'IHCLSD_VALUATION_POPUP'
          EXPORTING
            i_klart               = dy_klart
            i_class               = dy_class
            i_language            = sy-langu
            i_key_date            = sy-datum
            i_also_subclasses     = dy_subcl
          TABLES
            ct_comw               = gt_clsd_comw
          EXCEPTIONS
            exc_no_class          = 1
            exc_klart_not_allowed = 2.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    *--- fill classification data in select option
        PERFORM copy_comw_selopt_f79 TABLES gt_clsd_comw s_comw.
      ENDIF.
      IF sy-ucomm = 'ONLI'.
        sscrfields-ucomm = sy-ucomm.
      ENDIF.
    Regards
    s@k
    Edited by: siemens.a.k on Jan 15, 2010 10:10 AM

  • Calling user defined function in Oracle BI Answers?

    Hi
    I am new in Oracle BI . I want to use the user defined function in Oracle BI Answers as a column,function written in Oracle database to calculate the Sales Revenue.
    I am using Oracle BI Standard Edition One and Oracle 10g database.
    Please suggest me.
    Thanks
    Nusrat

    Search for EVALUATE function you can call function and pass parameters
    Example:
    EVALUATE Function
    This function is intended for scalar and analytic
    calculations.
    Syntax: EVALUATE('DB_Function(%1)', {
    Comma separated Expression})
    Example: SELECT
    e.lastname,sales.revenue,EVALUATE('dense_rank()
    over(order by %1
    )',sales.revenue) FROM sales s, employee e;

  • Can I call a User-Defined Mathscript Function using LabVIEW 7.1?

    I am trying to use a User-Defined function call in a mathscript node using LabVIEW 7.1 and I cannot seem to make it work.
    For example, consider that my mathscript node contains:
    clear all;
    close all;
    x = linspace(1,100,5);
    y = mltp(x);
    where the labview vi is saved in the same folder as the mathlab script mltp.m that is given by:
    function out1 = mltp(in1)
    out1 = 5*in1;
    Creating an array output of the mathscript node for y yields an empty array.
    How can I use User-Defined functions in a mathscript node using LabVIEW 7.1?

    Hello,
    LabVIEW 8.2 did not yet have the MathScript page in Tools >> Options.  In this version, you need to set the search path through the MathScript Window.  Launch the window from Tools >> MathScript Window.  Then go to File >> MathScript Preferences.  It sounds like you have done this.
    A first guess is that your .m file calls some unsupported functions or uses unsupported syntax.  If that were the case, you could put the script in the Script Editor of the MathScript Window and select the "Save and Compile Script" menu item.  This will return any errors from compiling the script.  However, you said you simplified the problem to a single multiplication.  Since this still does not work, I need more information.  What are all the directories listed for the path in the MathScript Preferences dialog from the MathScript window?  What is the working directory?  Where is your .m file located on disk?  Can you attach your .m file or paste the contents in your message?
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

  • How to Developed user defined functions to call function modules in SAP R/3

    •     how to Develope user defined functions to call function modules in SAP R/3 system

    Hello Raja,
    Go through this V.imp Link...
    http://download.oracle.com/docs/cd/B10464_05/integrate.904/b10408/rfc.htm
    Steps to crate FM..
    Follow these steps..
    Go to the T: code SE37
    First You Create Function Group
    On That u specify
    Function Group Name..............
    Short Text..............................
    save...
    Go to SE 37
    Specify the Function Module Name: Eg: Z_Bapi_Materialmaster
    Short Text.......
    Save...
    Next Go to Attributes..
    Select Radio button : Remote enabled model
    Go to Parameters..
    Click Import...
    Give Parameter Type Associate type S.t
    next Click Export...
    Give Parameter Type Associate type S.t
    Next Click Tables Button..
    Specify tables..
    Next click source code button..
    Write Source code here..
    Eg : Select statements Etc..
    Finally we should be select the Radio button Enable remorely
    https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action?pageId=39728
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/bapi%2bstep%2bby%2bstep
    Re: User Defined Functions Tutorials
    Hope this information is useful to you..
    Thanks ,
    Satya Kumar..

Maybe you are looking for

  • Template Builder (BIPublisherDesktop.exe) installation for multiple users

    Hello, I tried to install version 10.1.3.4 of the template builder on a Citrix server (Metaframe 4.0) running under Windows 2003 SP2, and with Office 2003. Framework .NET 2.0 and JRE Sun 1.6 are also installed. It works, but, in Word 2003, the "Oracl

  • Another network issue... C4780 - The wireless radio is not functioning. Contact HP support.

    Hi, I've trawled the forum for an answer to this and searched Google until I'm ready to drop the printer from a height. A long time ago my printer "lost" its ability to carry out any functions wirelessly, which is a shame because it was the wireless

  • How do i import excel files from my pc to my iPad 2 numbers app

    i was able to import PDF files from my PC to my iPad; however, if i try the same method to import Word or Excel docuements, the files do not import after i sync. Successful method to import PDF files form my PC to my iPad: open iTunes select my iPad

  • Add photo grid to a page?

    I am trying to add a photo grid to one of my blog entries and I can't seem to get it to work properly. I have cut and pasted an empty album onto the page and set up the height to allow for everything on the page. The problem I am having is that when

  • Installing iTunes 7.5 error

    Each time I try to install iTunes for Windows I get this eror Unable to install iTunes could not open key Hkeylocalmachine\software\microsoft\windows\currentversion\shareddlls. I have un-installed iTunes an Quicktimes deleted it from the registry and