Problem calling a packaged function from an authorization scheme

I wrote a package and body called pkg_auth with a function returning a boolean called is_authorized with 2 parameters (username and functional area).
i.e.
CREATE OR REPLACE PACKAGE pkg_auth
AS
FUNCTION is_authorized(p_username VARCHAR2, p_functional_area VARCHAR2) RETURN BOOLEAN;
END;
additionally i created a public synonym for it and granted execute access on it to apex_public_user and htmldb_public_user;
i then created an authorization scheme called 'access_control_db' defined as Scheme Type 'PLSQL Function Returning Boolean' and placed the following:
pkg_auth.is_authorized(v('APP_USER'),'DATABASE')
in the Expression 1 field.
and the following:
Not permitted to edit database information.
in the error field.
However when I apply this authorization scheme to a buton I receive the following error when I go to the page containing that button:
ORA-06550: line 1, column 44: PLS-00221: 'IS_AUTHORIZED' is not a procedure or is undefined ORA-06550: line 1, column 44: PL/SQL: Statement ignored
     Error      ERR-1082 Error in executing authorization scheme code.
Any help would be most appreciated.

Hello,
Does putting 'return' infront -
return pkg_auth.is_authorized(v('APP_USER'),'DATABASE')fix your problem?
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

Similar Messages

  • Calling Oracle Package Function from Visual Basic

    Hi,
    Oracle Client 8.04
    Oracle ODBC Driver 8.00.04
    VB 6.0
    Windows 2000
    I'm stumped here. I want to have a Oracle stored procedure run a
    query and return a result set which I can assign to a recordset
    object in VB. Based on things I've read here and on MS's site,
    here's what I've done:
    In the Oracle Schema Manager under the Packages folder I created
    the following package:
    PACKAGE test
    IS
    TYPE test_cur IS REF CURSOR;
    FUNCTION mycur RETURN test_cur;
    END test;
    and under the Package Body folder created:
    PACKAGE BODY test
    IS
    FUNCTION mycur RETURN test_cur
    IS
    c_return test_cur;
    BEGIN
    OPEN c_return FOR
    SELECT * FROM table_A;
    RETURN c_return;
    CLOSE c_return;
    END mycur;
    END test;
    They both compile without errors and in Oracle SQL Worksheet I
    can enter the following:
    variable x refcursor;
    execute :x :=test.mycur;
    print x;
    and the query results are displayed as expected.
    The problem is trying to get the result back into a VB recordset
    object.
    In VB 6.0 I have done this:
    Dim RS As ADODB.Recordset
    Dim Conn As ADODB.Connection
    Dim sConnection As String
    Dim sSQL As String
    sSQL = "{call test.mycur}"
    sConnection = "Provider=MSDASQL;UID=" & sUserID & ";PWD=" &
    sPassword & ";Driver={Microsoft ODBC for Oracle}; Server=" &
    sInstance & ";"
    Conn.Open sConnection
    RS.CursorLocation = adUseClient
    RS.Open sSQL, Conn, adOpenForwardOnly, adLockOptimistic,
    adCmdStoredProc ' or adCmdText
    but get:
    ?err.Number -2147217900
    ?err.Source Microsoft OLE DB Provider for ODBC Drivers
    ?err.Description [Microsoft][ODBC driver for Oracle]Syntax error
    or access violation
    The problem is not with the connection or permissions, since the
    query works fine when I just use the select statement in the
    package function as the string, instead of calling the function
    in the package (eg sSQL = "Select * from table_A") and can
    process the resulting recordset in VB.
    I've also tried variations using:
    Set RS = Conn.Execute("{call test.mycur}")
    or using a Command object something like:
    Dim com As ADODB.Command
    Set com = New ADODB.Command
    With Conn
    .ConnectionString = sConnection
    .CursorLocation = adUseClient
    .Open
    End With
    With com
    .ActiveConnection = Conn
    .CommandText = sSQL
    .CommandType = adCmdText
    End With
    Set RS.Source = com
    RS.Open
    But still get the same errors. Any help is appreciated. Also, in
    my package body, is it necessary to explicitly close the cursor,
    or does the function just exit when it executes the return and
    not ever hit the close statement?
    Thanks,
    Ed Holloman

    Hi
    i don't know if you got your answer, but i work with VB and
    Oracle.
    the procedure in the DB should have the cursor like you writen
    in your mail.
    to call a procedure in Oracle and get the data back
    into a recordset you shuld use a Command object like this:
    Dim conn As ADODB.Connection
    Dim cmd As ADODB.Command
    Dim rs As ADODB.Recordset
    Set conn = CreateObject("adodb.connection")
    Set cmd = CreateObject("adodb.command")
    Set rs = CreateObject("adodb.recordset")
    With conn
    .ConnectionString = ""
    .CursorLocation = adUseClient
    .Open
    End With
    'THE IMPORTENT SECTION IS THIS WHERE YOU SET THE COMMAND TO THE
    STORE PROCEDURE TYPE
    With cmd
    .ActiveConnection = conn
    .CommandText = "proc.fun"
    .CommandType = adCmdStoredProc
    End With
    'Then you set the rs to the command
    Set rs = cmd.Execute
    Set conn = Nothing
    Set rs = Nothing
    Set cmd = Nothing

  • Problem with JCA calling to DB function from Service Bus

    Hi there
    I have managed to use JCA from the Service Bus on several tables, on some diferent Oracle databases and it worked OK.
    Now, I try to use it with a DB function that I have defined. Calling to this function from any DB software returns good values.
    But calling this function using JCA (adapter created with jDeveloper) on OSB gives me the correct answer except that instead of the data there are question marks, like +<param>???</param>+
    The database encoding is ISO-8859 (by using "SELECT * FROM NLS_DATABASE_PARAMETERS") .
    This encoding is the same as was on different databases that worked ok with other adapters, just not calling a DB function, but a custom SQL.
    I would appreciate if anyone might know what can solve this ..
    Thanks

    Where are you checking the content of the XML?
    It seems that platform's default encoding is not able to identify those characters and hence dispalying those as "???". Sometimes you get some invalid characters (like null), in the XML file and when platform's default encoding could not identify those characters then they get displayed like "?". Please check the content of the XML to verify it does not contain any invalid XML characters (sometims null). You may try to log the XML in database and in OSB to see it's content.
    Regards,
    Anuj

  • Calling a package function inside a sql

    Hi friends!!!
    First of all happy Christmas! And them please help! :)
    We have a query calling a package function:
    SELECT * FROM DW025H WHERE DW025H_NR=MPPCI.ENCR ('0000000000000000');There is a primary key just with one column DW025H_NR and the problem is that is not accessing by INDEX UNIQUE SCAN,
    it's accessing by TABLE ACCESS FULL.
    May be the problem is that we are calling a procedure inside the query?
    I have been able to run that query accessing by primary key from my computer but a workmate hasn't!
    We both are connecting the same data base 10.2.0.4 and using Oracle SQL Developer!
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 5343K| 1406M| 15670 (7)| 00:02:43 |
    |* 1 | VIEW | DW025H | 5343K| 1406M| 15670 (7)| 00:02:43 |
    |* 2 | FILTER | | | | | |
    | 3 | TABLE ACCESS FULL| DW025H | 5343K| 1406M| 15670 (7)| 00:02:43 |
    Predicate Information (identified by operation id):
    1 - filter("DW025H_NR"="MPPCI"."ENCRIPTAPAN"('0000000000000000'))
    2 - filter(CASE "OPS$SISINFO"."IS_USER_DNI"() WHEN 1 THEN
    SYS_AUDIT('OPS$SISINFO','DW025H','CMINFOGR001',3) ELSE NULL END IS
    NULL)
    The correct path would be:
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 276 | 3 (0)| 00:00:01 |
    |* 1 | FILTER | | | | | |
    | 2 | TABLE ACCESS BY INDEX ROWID| DW025H | 1 | 276 | 3 (0)| 00:00:01 |
    |* 3 | INDEX UNIQUE SCAN | PK_DW025H | 1 | | 2 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - filter(CASE "OPS$SISINFO"."IS_USER_DNI"() WHEN 1 THEN
    SYS_AUDIT('OPS$SISINFO','DW025H ','CMINFOGR001',3) ELSE NULL END IS NULL)
    3 - access("DW025H_NR"="MPPCI"."ENCR"('0000000000000000'))
    Please any ideas!?!?!
    Thanks a lot!
    José
    Edited by: jamv on Dec 20, 2011 10:50 AM

    Hello
    Have a read of this and try to pull together the information in it and post it up here. That will help immensely with getting to the root of your problem...
    HOW TO: Post a SQL statement tuning request - template posting
    In the mean time:
    From the execution plan you have extra predicates that aren't present in the query you supplied, so that's either not the SQL or you have something like VPD switched on.
    Anyway, there could be lots of reasons for the difference in execution plan. Sorry if this is very basic and possibly patronising question but it's always worth checking the basics I think - are you both definitely connecting to the same database? If so, have a look in v$sqlarea for this SQL statement and find the SQL_ID, use this to query v$sql and look at the child_number column.
    select
        sql_id
    from
        v$sqlarea
    where
        sql_text like '%SELECT * FROM DW025H WHERE DW025H_NR=MPPCI.ENCR%(''0000000000000000'')%'
    and
        sql_text not like '%v$sqlarea%'
    select child_number from v$sql where sql_id='<enter the sql id returned by the query above>'as an example...
    XXXX> select /* my sql statement*/ rownum id from dual;
            ID
             1
    1 row selected.
    Elapsed: 00:00:00.10
    XXXX> select sql_id from v$sqlarea where sql_text like '%my sql statement%'
    and sql_text not like '%v$sqlarea%';
    SQL_ID
    a6ss4v79udz6g
    1 row selected.
    Elapsed: 00:00:03.56
    XXXX> select child_number from v$sql where sql_id='a6ss4v79udz6g'
      2  /
    CHILD_NUMBER
               0
    1 row selected.   If you have more than one row in v$sql there could be differences in the optimiser environment. The supplied like shows you how to gather the information that should help find what the differences are if any.
    Also as a side note if you're calling PL/SQL functions from SQL, you can take advantage of subquery caching to help reduce the number of calls (depending on your version). As it stands, your function is most likely going to be called for every row - when there is only a single row returned, that's not necessarily a problem but for multiple rows, the overhead can quickly grow. If there's no way to get rid of the function call, select the function from dual instead i.e.
    SELECT * FROM DW025H WHERE DW025H_NR= (SELECT MPPCI.ENCR%('0000000000000000') FROM dual);This also (as I learnt a couple of weeks ago) works when you're using columns in the table your selecting from as parameters to the function.
    HTH
    David

  • Calling a JavaScript function from an JApplet...

    Can anyone help? Is it possible to call a JavaScript function from within a JApplet? If so, what is the syntax? I've seen reference to the Netscape package but I've been led to believe it doesn't always work within Internet Explorer 6 which is the target browser.
    If the above is not possible can anyone tell me if and how it is possible to load images from outside the init() method of a JApplet? This would allow me to work around the problem.
    Thanks in advance - Jim.

    Call javascript you use the JSObject
    Please note the MAYSCRIPT int the html file.
    html file:
         <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
                  height="0" width="0" >
            <param name="code" value="someApplet.class" />
            <!--[if !IE]> Mozilla/Netscape and its brethren -->
            <object classid="java:someApplet.class"
                    height="0" width="0"
                    mayscript=true>
            </object>
            <!-- <![endif]-->
          </object>
    <LABEL id="lblOutputText">This text is the HTML text </LABEL>java class:
    // new class for jsObject!!!! compile this: javac -classpath "C:\Program Files\Java\jre1.5.0\lib\plugin.jar" someApplet.java
    // since jaws.jar does not exsist anymore
    // in 1.4.0 to compile: javac -classpath "C:\j2sdk1.4.0_03\jre\lib\jaws.jar" someApplet.java
    // for msjvm use the -source 1.3 -target 1.1 option so the command looks like this:
    // javac -source 1.3 -target 1.1 -classpath "C:\j2sdk1.4.0_03\jre\lib\jaws.jar" someApplet.java
    import netscape.javascript.*;
    public class someApplet extends java.applet.Applet {
        JSObject win;
        public void init() {
             try{
                 win = JSObject.getWindow(this);
    // you need win.eval("window.close();"); // to close the window. if the current window is not a popup
    // opened by a parent with window.open than the user will get a waring, your next question probably will
    // be "can I stop this warning" and the answer is simple: NO
                 JSObject textBoxLabel = (JSObject) win.eval("document.getElementById('lblOutputText')");
                 textBoxLabel.setMember("innerHTML", "<center><h1>Some text</h1></center>");
            }catch(Exception e){
                 e.printStackTrace();
    }

  • How to call pl/sql function from element values

    EBS 11.5.10.2
    XMLP 5.6.3
    Hello,
    I noticed that the output of the rdf-to-data template conversion process makes use of an undocumented feature of data templates, and I would like to get input from experts as to which situations this feature is usable.
    The closest thing I can find in the documentation is a sample in the user guide. There is a "General Ledger Journals Data Template Example" that has a <dataStructure> section that contains <element> nodes which are NOT children of a <group> node. I can't find any explanation of this in the user guide.
    I've noticed from converted templates that in these un-grouped elements you can make calls to PL/SQL functions in the "value" attribute, like this:
    <dataStructure>
      <group name="G_LINES" source="Q_MAIN">
        <element name="Line_Num"           value="Line_Num"/>
      </group>
      <element name="C_CALCULATED_VALUE" dataType="number" value="XX_CUSTOMPROCS.SOME_FUNCTION"/>
    </dataStructure>Has anyone had any success being able to call PL/SQL functions from grouped elements? Whenever I try, it doesn't seem to work.
    When I try something like this:
    <dataStructure>
      <group name="G_LINES" source="Q_MAIN">
        <element name="Line_Num"           value="Line_Num"/>
        <element name="some_calculation"   value="XX_CUSTOMPROCS.SOME_FUNCTION"/>
        <element name="some_calculation_b" value="XX_CUSTOMPROCS.SOME_FUNCTION_B(:Line_Num)"/>
      </group>
      <element name="C_CALCULATED_VALUE" dataType="number" value="XX_CUSTOMPROCS.SOME_FUNCTION"/>
    </dataStructure>The <SOME_CALCULATION/> and <SOME_CALCULATION_B/> nodes come out empty in the output data xml file, but <C_CALCULATED_VALUE> would have a value as desired.

    ah - perfect. That makes sense. Thank you for the response!
    But what about when we need to pass parameters to those functions whos values are the results of aggregate element values?
    This happens a lot in the converted data templates, where pl/sql package functions are meant to replace formula columns from the original Oracle Report. Take this example from the conversion of ARXAGMW.rdf (Aging Report, 7 Buckets):
    (note the function call in the value of "Set_Percent_Inv_Inv" is using aggregate results from subgroups)
      <group name="G_INV_INV" dataType="varchar2" source="Q_Invoice">
        <element name="Total_Inv_Inv_Amt" function="sum" dataType="number" value="G_Invoice.C_Amt_Due_Rem_Inv"/>
        <element name="Total_Inv_Inv_B0" function="sum" dataType="number" value="G_Invoice.C_Inv_B0"/>
        <element name="Total_Inv_Inv_B1" function="sum" dataType="number" value="G_Invoice.C_Inv_B1"/>
        <element name="Total_Inv_Inv_B2" function="sum" dataType="number" value="G_Invoice.C_Inv_B2"/>
        <element name="Total_Inv_Inv_B3" function="sum" dataType="number" value="G_Invoice.C_Inv_B3"/>
        <element name="Total_Inv_Inv_B4" function="sum" dataType="number" value="G_Invoice.C_Inv_B4"/>
        <element name="Total_Inv_Inv_B5" function="sum" dataType="number" value="G_Invoice.C_Inv_B5"/>
        <element name="Total_Inv_Inv_B6" function="sum" dataType="number" value="G_Invoice.C_Inv_B6"/>
        <element name="Set_Percent_Inv_Inv"  dataType="number"  value="XX_CUSTOMPROCS.XXC_ARXAGMW.set_percent_inv_invformula(:Total_Inv_Inv_Amt, :Total_Inv_Inv_B0, :Total_Inv_Inv_B1, :Total_Inv_Inv_B2, :Total_Inv_Inv_B3, :Total_Inv_Inv_B4, :Total_Inv_Inv_B5, :Total_Inv_Inv_B6)"/>
        <element name="Sum_Percent_B0_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B0_Inv_p"/>
        <element name="Sum_Percent_B1_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B1_Inv_p"/>
        <element name="Sum_Percent_B2_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B2_Inv_p"/>
        <element name="Sum_Percent_B3_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B3_Inv_p"/>
        <element name="Sum_Percent_B4_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B4_Inv_p"/>
        <element name="Sum_Percent_B5_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B5_Inv_p"/>
        <element name="Sum_Percent_B6_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B6_Inv_p"/>
        <group name="G_Cust_Inv" dataType="varchar2" source="Q_Invoice">
          <group name="G_Site_Inv" dataType="varchar2" source="Q_Invoice">
            <group name="G_1" dataType="varchar2" source="Q_Invoice">
              <group name="G_Invoice" dataType="varchar2" source="Q_Invoice">
                <element name="C_Amt_Due_Rem_Inv" dataType="number" value="C_Amt_Due_Rem_Inv"/>
                <element name="C_Inv_B0" dataType="number" value="C_Inv_B0"/>
                <element name="C_Inv_B1" dataType="number" value="C_Inv_B1"/>
                <element name="C_Inv_B2" dataType="number" value="C_Inv_B2"/>
                <element name="C_Inv_B3" dataType="number" value="C_Inv_B3"/>
                <element name="C_Inv_B4" dataType="number" value="C_Inv_B4"/>
                <element name="C_Inv_B5" dataType="number" value="C_Inv_B5"/>
                <element name="C_Inv_B6" dataType="number" value="C_Inv_B6"/>
              </group>
            </group>
          </group>
        </group>
      </group>
      ...All of these groups and sub-groups are based on one single query, so I am not sure how I would move the function call into the query without changing the results of the function.
    In the example above, elements Sum_Percent_B0_Inv through Sum_Percent_B6_Inv grab the results of the calculation done in set_percent_inv_invformula. Here is the essence of that function:
      sum_percent_b0_inv := ROUND ((total_inv_inv_b0 / total_inv_inv_amt) * 100, 2);
      sum_percent_b1_inv := ROUND ((total_inv_inv_b1 / total_inv_inv_amt) * 100, 2);
      sum_percent_b2_inv := ROUND ((total_inv_inv_b2 / total_inv_inv_amt) * 100, 2);
      sum_percent_b3_inv := ROUND ((total_inv_inv_b3 / total_inv_inv_amt) * 100, 2);
      sum_percent_b4_inv := ROUND ((total_inv_inv_b4 / total_inv_inv_amt) * 100, 2);
      sum_percent_b5_inv := ROUND ((total_inv_inv_b5 / total_inv_inv_amt) * 100, 2);
      sum_percent_b6_inv := ROUND ((total_inv_inv_b6 / total_inv_inv_amt) * 100, 2);The only solution I can think of is to have separate queries, one for each subgroup, that do the "sum" in sql; but that seems terribly inefficient.

  • Call a Java Function From Abap

    Hi, I need to call a java function from ABAP,  I have a WAS 640 to deploy the module.
    I have found this tutorial...
    [ABAP calls Java via RFC|/people/thorsten.franz3/blog/2008/11/21/abap-calls-java-via-rfc-1-introduction]
    The problem is that it uses a newer version of WAS and it implements EJB 3.0 wich only works on Java 5, but my WAS has java 1.4.2.
    Anyone knows how to adapt this Blog to a WAS 640 version ?
    Or Perhaps there is another way of doing this, maybe publishing my function as a web service.
    Regards.
    Mariano.

    Why don't you expose your Java functionality as a Web Service and consume it in ABAP program. That should be much easier and the web service can be used in other places as well.
    Best regards,
    Ritesh Chopra

  • Calling public package functions and variables through dblink

    Is it possible to call a global public variable in a package in one database from another package procedure in another database using a database link? If so, could you let me know the syntax? Same question for package functions.

    Hi,
    check this documentation link especially the stmt...
    http://www.mcs.csueastbay.edu/support/oracle/doc/10.2/appdev.102/b14251/adfns_packages.htm#i1007858
    You cannot access remote package variables and constants.May be you can write a function in the remote db which when called will return the variable value.
    for calling remote package functions...
    syntax from documentation is [[schema.]package.]function_name[@dblink][(param_1...param_n)]
    an example given in the above link for this...
    EXECUTE fire_emp1@boston_server(1043);
    Ravi Kumar
    Edited by: ravikumar.sv on Aug 31, 2009 11:29 AM

  • Problems calling context-sensitive AIRHelp from Adobe Flex App

    Hi everyone...
    I´m having problems calling context-sesitive AIRHelp from Flex.
    I can launch the help from flex using the following code (flex), but allways starts on the default topic.
    private function invocarAirHelp(tema:String):void {
          var appID:String = "pc1";
          var pubID:String = "8C47FDE4638CAF7F210634E52A5F8318D893A57C.1";
          var mgr:ProductManager = new ProductManager("airappinstaller");               
          mgr.launch("-launch " + appID + " " + pubID);
    the launch method can recive parameters after the publisherID, but i dont know the parameters that i should give to the method to start the AIRHelp on an specific topic.
    I tryed using the parameters as the call was on the command line, ex:
      mgr.launch("-launch " + appID + " " + pubID + " -csh mapnumber 12");
    but i can get any results... with those parameters the help application doesn´t even start
    Anyone have an idea to make this works?
    Thanks in advance, Sabin

    Hi Sabin,
    The only supported way to launch AIR applications from the browser is the air "browser API": http://livedocs.adobe.com/flex/3/html/help.html?content=distributing_apps_3.html#1035834
    The browser API uses ProductManager internally and exposes higher-level browser API so that we change the implementation if necessary someday. The browser API will stay the same, even if the interactions through ProductManager (or something else) change.
    The browser API (air.swf) has other features that make it the preferred way to launch apps. For instance, it provides accurate information about which platforms support AIR, and can therefore manage install of new apps and of the runtime itself.
    Also, if the application is not installed then Browser API will return Error to the flex application, but that does not happen in case of ProductManager.
    That said, you can probably use "--" to separate arguments intended for airappinstaller from arguments that should be passed through to the app itself. 
    mgr.launch("-launch " + appID + " " + pubID + " -- -csh mapnumber 12");
    -Praful Jain

  • [iPhone] Calling Objective-C function from a standard-C function

    How can I call an Objective-C function from a standard-C function?
    I can call standard-C functions from an Objective-C functions but I can't do the inverse, how can I solve the problem of the *error: 'self' undeclared* ?
    Here below is the example code:
    - (void)animateView: (UIImage *)image fromPosition:(CGPoint) location1 toPosition:(CGPoint) location2
    - (void) touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event
    [self animateView:newImage fromPosition:location1 toPosition:location2];
    void dessineItemesAnim(int iteme, int final)
    [self animateView:newImage1 fromPosition:location1 toPosition:location2];
    *error: 'self' undeclared (first use in this function)*
    }

    Either add another parameter that contains a reference to the instance you are trying to call (just like many of the various API functions that use a 'C' language callback offer a 'user data ' parameter that can be used for this purpose) or create a global variable reference to the instance.
    Once you have the instance reference, then you can use it in the same way that you would from within an obj-c function.
    Of course, all of this assumes that you are using the standard GCC compiler that is told that your source is objective-c.
    Susan

  • How to call a SQL function from an XSL expression

    Hi
    In R12, in Payroll Deposit adivce/Check writer, We need to sort the earnings tag <AC_Earnings> in to two different categories as regular and other earnings. In the DB and form level of element defintiion we have a DFF which differentiates between the two kinds of earnings. But the seeded XML that is gerneated by the check writer does not have this field.
    The seeded template displays all the earnings in one column. How can we achieve this in the template without modifying the seeded XML.
    The one approach i have is to write a function and based on the return value sort the data. For this I need to know :
    1) How to call a SQL function from an XSL expression that is allowed in BI template.
    If anyone ahs faced similar requirements please share your approach.
    Thanks
    Srimathi

    Thank u..
    but i'd seen that link wen i searched in google..
    Is it possible without using any 3rd party JARs and all?
    and more importantly plz tell me what should be preferred way to call a javascript function?
    Do it using addLoadEvent() or Windows.Load etc
    OR
    Call it thru Xsl? (I donno how to do dis)
    Thanks in Advance..
    Edited by: ranjjose on Jun 3, 2008 8:21 AM

  • How can I call a plsql function from an attribute?

    I have an attribute defined in an element. I want execute a PLSQL function from the attribute, and display the returne value with an HTML template.
    I've defined the attribute's type like PLSQL, and I've put the called of the function in the value of the attribute, but it doesn't work. The only value I obtain is an URL (I think that is the URL of the function or someting like this).
    How can I call to my function from the attribute and display the returnes value in the page?
    Thanks.

    Thanks, but it doesn't work. I have an attribute called ID_BOL and I want to associate a sequence to that attribute. I've created a function, with the sequence. This function return de value of the sequence. I want taht the attribute takes the value of the sequenece dinamically.
    I've tried it, creating the type attribute like PLSQL, and calling the function from the attribute, but it doesn't work.
    How can I return the sequence value to my attribute?
    Thanks.

  • How to call a Javascript function from backing bean without any event

    Hi,
    Someone knows how to call a Javascript function from backing bean without any event ?
    thanks

    Please review the following thread:
    ADF Faces call javascript
    Luis.

  • Help needed in calling a javascript function from a jsp

    Hey guys,
    I need help.
    In my jsp I have a field called date. When i get date field from the database, it is a concatination of date and time field, so I wrote a small javascript function to strip just the date part from this date and time value.
    The javascript function is
    function formatDate(fieldName)
              var timer=fieldName;
              timer = timer.substring(5,7)+"/"+timer.substring(8,10)+"/"+timer.substring(0,4);
              return timer;
    Now I want to call this javascript function from the input tag in jsp where I am displaying the value of date. Check below
    This is one way I tried to do:
    <input size="13" name="startDate" maxLength="255" value=<script>formatDate("<%=startDate%>")</script> onChange="checkDate(this)">
    I even tried this:
    <input size="13" name="startDate" maxLength="255" value="'formatDate(<%=startDate%>)'" onChange="checkDate(this)">
    But it dosen't work
    Please help. I am struggling on this for days.
    Thanks,
    Ruby

    Hey all you developers out there , Pleaseeee help me with this one.

  • IP - Is it possible to call exit planning function from ABAP Report..

    Hi All,
    Greetings.
    Is it possible to call exit planning function from ABAP Report (t-code SE38) ? Or I mean is not limited only to be called from ABAP Report, perhaps from BSP / Web-Dynpro / Function Module.
    If somebody here has been doing it before, I'm keen to ask to kindly share it. Particularly how to call and transfer data to that exit function.
    Or if somebody has done in BPS, appreciate if it can be shared too .
    Thanks a lot and have a good day,
    Best regards,
    Daniel N.

    Hi.
    You can achive this as suggested by Mattias in your previous post.
    Lets say you have next data structure:
    CostCenter | Amount | PercentForDistibution |
    Create input ready query in this format. Restrict cost center by variable type range.
    Create WAD with analysis item.
    When you run web page you enter range of cost centers (lets say you will enter 101004 to 101010).
    I assume you have data only for 101004 in your cube (lets say 1000).
    You will see only one record in your webpage.
    CostCenter | Amount | PercentForDistibution |
    101004       | 1000     | NOTHING
    When you create WAD in analysis item properties set "NUMBER_OF_NEW_LINES" to lets say 1 (so in WAD you will see always one blank line for entering new data).
    Just add 6 new records:
    CostCenter | Amount   | PercentForDistibution |
    101005       | NOTHING| 10
    101006       | NOTHING| 30
    101007       | NOTHING| 20
    101008       | NOTHING| 25
    101009       | NOTHING| 5
    101010       | NOTHING| 10
    Then run planning FOX function like this:
    FOREACH Z_COST_CENTER.
    IF {Amount, Z_COST_CENTER} <> 0
    Z_AMNT_TO_DISTRIBUTE = {Amount, Z_COST_CENTER}.
    ENDIF.
    ENDFOR.
    FOREACH Z_COST_CENTER.
    IF {PercentForDistibution Z_COST_CENTER} <> 0.
    {Amount, Z_COST_CENTER} = Z_AMNT_TO_DISTRIBUTE * {PercentForDistibution Z_COST_CENTER}.
    ENDIF.
    ENDFOR.
    It is not perfect FOX, but as an idead, it should work.
    Regards.

Maybe you are looking for