Oracle Foreign function interface

Hi All,
we have a form from which we invoke a second form using the CALL_FORM procedure as follows
CALL_FORM(:GLOBAL.FILE_NAME,NO_HIDE, NO_REPLACE, NO_QUERY_ONLY, pl_Id );
we cannot query in the called form i.e the second form.
After debugging , we found that this FFI doesn't initialize.
here "ue_select_item" is a PLL and "orf_init_ffi" is a C function.
ffi_return := ue_select_item.orf_init_ffi(temp, proj_param,
proj,lst_name,own,pass,scol,env,frm,session,select_state);
does not initialize in the second form.
Is there any limitation on the ffi?
Has the application to be started only as a piped application instead?
Thanks & Regards
Gurjeet

No there is no limitation in ORA_FFI in thie regard, but you've not been very precise as to what your problem is.
In the called form I would still do a FIND_LIBRARY to get the handle to the .so / .dll even though Forms will have the library loaded, you need to get the handle to re-register the function etc, you can't just call the function directly without goings through the steps of getting the Library handle and registering the function again as pl/sql in the second form generally doesn't know what pl/sql in the first has done.

Similar Messages

  • Forms hanging after multiple calls to Foreign Function Interface

    Hi,
    Can anyone help me with this problem. I'm getting a 'FRM-92100:
    Your connection to the server was interrupted ... Details ...
    Java Exception:java.io.EOFException' error message when i make
    two calls to a c share object file using the ORA_FFI package.
    Forms will hang with that error message when I call the foreign
    function more than once and when the ORA_FFI.LOAD_LIBRARY
    function is executed twice.
    I've tried using the ORA_FFI.UNLOAD_LIBRARY function at the end
    straight after the load library plus my processes and it still
    hangs with that error message.
    I've got a temporary work around which is not ideal but it
    works. I've made another copy of the C shared object file and
    renamed it and made my second call to load this library.
    I would prefer to have one shared object file and make multiple
    calls to it from forms. Any suggestions?
    note : running forms 6.0 on three tier architecture with web
    browser.

    "Mush15" <[email protected]> wrote in
    message
    news:g7hela$flo$[email protected]..
    > Ok the issue is a stack overflow caused by calling the
    function
    > recursivly.
    >
    > I have tried creating 2 functions and have each call the
    other but still
    > recieve a stack overflow.
    >
    > Any ideas help??
    Try incrementing a counter every time you call the function
    and decrementing
    it on the way out. When you hit 2640 times, stop calling it.

  • How to find the foreign function source code of srw.user_exit in report?

    Hi,
    We know that srw.user_exit can invoke a foreign function,for example SRW.USER_EXIT('FND SRWINIT').
    But how can I find the source code of the foreign function in SRW.USER_EXIT(e.g. the source code of FND SRWINIT)?
    Thanks in advance,

    Hi,
    You build user exits when you want to pass control from Report Builder to a program you have written, which performs some function, and then returns control
    to Report Builder.
    So you will have to know the foreign function you want to invoke.
    For information on writing a user exit, see the following note on Metalink:
    179324.1
    And the "Programmer's Guide to the Oracle Precompilers, 1.8"
    Navneet.

  • Foreign functions

    Qs: To call or use a foreign function from a dll file from forms, using the foreign function PL/SQL interface and ORA_FFI pachage, does the function's language, the code its written in, have to be standard C language, or can the dll and its functions be coded or written using C++ or Visual C++?
    Urgent!!HELP!NOW!!

    Puzzling that you're getting a Java Exception with ORA_FFI as that is all C calls and nothing to do with Java - unless you have Java calls in the Library you are using?
    Anyway - in general terms always use ORA_FFI.FIND_LIBRARY() first then if the handle is null use ORA_FFI.LOAD_LIBRARY() to load it.
    I tend not to explicitly use ORA_FFI.Unload_Library() that will happend automatically when the app closes down.
    Hope that helps Thanks Duncan,
    That worked. Used the find_library before doing any loads and it doesn't hang anymore with the Jave EOFexception error.
    rgds

  • Problem in creation function interface in JCO program

    I am using BLOB /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection for making connection SAP & JAVA it is working properly and giving the same O/P as maintained in example. Now my requirement is that i want to use another JAVA program for outbound processing with SAP i mean....
    I have a program by the name FetchMailUsage which is fetching mail from a perticular id. I m using this program in JCO program and when i m creating a function interface through bellow code , import export working well but when i m creating a table interface for that function it is giving short dump  in ABAP program jco.server could not find server function.
    the code for function interface is
    JCO.MetaData fmeta = new JCO.MetaData("CONNECTION");
       fmeta.addInfo("REQUTEXT", JCO.TYPE_CHAR, 255,   0,  0, JCO.IMPORT_PARAMETER, null);
       fmeta.addInfo("ECHOTEXT", JCO.TYPE_CHAR, 255,   0,  0, JCO.EXPORT_PARAMETER, null);
        fmeta.addInfo("RESPTEXT", JCO.TYPE_CHAR, 255,   0,  0, JCO.EXPORT_PARAMETER, null);
         fmeta.addInfo("RFCTABLE", JCO.TYPE_TABLE, 150, 0, 0, 0, "ZMTAB");
        repository.addFunctionInterfaceToCache(fmeta);
    connection:- object of class FetchMailUsage
    ZMTAB :- Table type placed in SAP have one field.
    Anyone please tell me procedure which i m using is correct if not tell me the process by which i create table for function interface.

    Hi Gregor ,
    Thanks for your reply, it is solving my problem partially.By defining structure i am able to implement function interface with table but i want to pass some data through this table to ABAP.How i will pass data through table structure . is there any requirement to set value like this
    ZIT_TAB.setValue(value,field name);
    Actually when i am exicuting FM from ABAP it is not fatching data in table which i m passing.
    I m sending my test code please correct where it is wrong.
    <b>Function Interface with table structure:-</b>
    JCO.MetaData fmeta = new JCO.MetaData("CONNECTION");
       fmeta.addInfo("REQUTEXT", JCO.TYPE_CHAR, 255,   0,  0, JCO.IMPORT_PARAMETER, null);
       fmeta.addInfo("ECHOTEXT", JCO.TYPE_CHAR, 255,   0,  0, JCO.EXPORT_PARAMETER, null);
        fmeta.addInfo("RESPTEXT", JCO.TYPE_CHAR, 255,   0,  0, JCO.EXPORT_PARAMETER, null);
         fmeta.addInfo("RFCTABLE", JCO.TYPE_TABLE, 150, 0, 0, 0, "ZIT_TAB");
        repository.addFunctionInterfaceToCache(fmeta);
    JCO.MetaData smeta  = new JCO.MetaData("ZIT_TAB");
         smeta.addInfo("FIELD",   JCO.TYPE_BYTE,   3, 24, 0);
         repository.addStructureDefinitionToCache(smeta);
    <b>code bywhich i m passing data through table</b>
    FetchMailUsage CONNECTION = new FetchMailUsage();
    CONNECTION.readMail();
    output.setValue(CONNECTION.mimeType,"RFCTABLE");
    <b>CONNECTION is object of my class FetchMailUsage</b>
    <b>Function using in ABAP is :-</b>
    CALL FUNCTION 'CONNECTION' DESTINATION 'JCO'
      EXPORTING
        requtext = requtext
      IMPORTING
        echotext = echotext
        resptext = resptext
      TABLES
        RFCTABLE = RFCTABLE  .

  • Oracle Spatial functionality with WFS

    Hi all
    My first post here so be gentle on me ;-)
    This may be an obvious question but here goes ...
    When using a WFS client can you access the full SDO_... SQL functions within Oracle Spatial? I've had a read of the WFS spec and it is all a bit vague on how the queries get passed through to the data store.
    Also with the WFS locking, is this done at the web server level? If so how would that impact on any direct access to the database? A bit dangerous??
    Appreciate any advice on WFS implemtations with a 9i back end. I want to retain the full native Oracle functionality and still deploy via WFS ... a pipe dream??
    Thanks
    Richard

    Thanks for your response Andreas
    Sorry, perhaps I wasn't clear, I realise the WFS client will never directly access the data source, that it is the WFS server that makes the request to the data store, not the client, but can the call be passed through to Oracle as native SQL?
    I think I found the answer in the OGC Filter Encoding Imp Spec where it desribes in great detail the optional filter component of a WFS request. It desribes the CQL filter operators that include some spatial operators. These could, I understand, be translated from CGL and Feature based schema to SQL (in GML?) and relational based schema.
    While I don't think at first glance that the spatial operators in CQL match all the Oracle SDO_ functions they probably go far enough for most normal users.
    Am I on the right track?
    Does anyone know of any work that has been done in this filter translation to SQL and if it has been implemented successfully anywhere.
    I think the locks would still pose a problem, but that's for another day :-)
    Thanks
    Richard

  • How to Oracle Database Function in OBIEE Administration Tool

    Hi All,
    I want to use a Oracle Database Function in as a column in OBIEE (BM, Presentation Model). Can anybody has done this inOBIEE. Any pointers to this is much appreicated.
    Thanks,

    Hi user7417334,
    You cannot use any formulas in the presentation layer (not that I know of). But you can definitely use oracle database functions in the BMM layer.
    You want to use the EVALUATE function. It works like this:
    e.x. EVALUATE( 'TO_DATE(%1,%2)' AS DATE, '12/31/2009', 'MM/DD/YYYY')
    Generic Version: 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

  • Execute Oracle Package Function call from FORTE

    Has anyone EVER successfully execute an Oracle Package Function call from FORTE
    via " sql execute procedure "?
    Here's my question, I am able to execute a stored procedure but hasn't figured
    out a way to execute a function which defined in a package. The syntax goes
    like this: sql execute procedure <PackageName>.<FunctionName> ( input
    input_parm, output output_parm). If anyone EVER successfully execute a
    function, please let me know, thanks.

    You'll need to provide a column alias for the function call:
    select func(val) as alias from dual

  • Oracle Asset (Functional) Practichttps:/e Questions for Interviews and Exam

    https://www.createspace.com/3495382
    http://www.amazon.com/Functional-Questions-Interviews-Certification-Examination/dp/1456311581/ref=sr_1_4?ie=UTF8&s=books&qid=1289178586&sr=8-4
    List Price: $29.99
    Add to Cart
    Oracle Asset (Functional) Practice Questions for Interviews and Certification Examination (Release 11i and 12)
    Functional Consultant
    Authored by Erp Gold
    This book contains 150 Oracle Asset Practice Questions for functional consultants. Very useful for interviews and certification examinations.
    Publication Date:
    Oct 26 2010
    ISBN/EAN13:
    1456311581 / 9781456311582
    Page Count:
    94
    Binding Type:
    US Trade Paper
    Trim Size:
    6" x 9"
    Language:
    English
    Color:
    Black and White
    Related Categories:
    Computers / General

    Reported as spam!

  • Oracle Asset (Functional) Practice Questions for Interviews and Exam

    https://www.createspace.com/3495382
    http://www.amazon.com/Functional-Questions-Interviews-Certification-Examination/dp/1456311581/ref=sr_1_4?ie=UTF8&s=books&qid=1289178586&sr=8-4
    List Price: $29.99
    Add to Cart
    Oracle Asset (Functional) Practice Questions for Interviews and Certification Examination (Release 11i and 12)
    Functional Consultant
    Authored by Erp Gold
    This book contains 150 Oracle Asset Practice Questions for functional consultants. Very useful for interviews and certification examinations.
    Publication Date:
    Oct 26 2010
    ISBN/EAN13:
    1456311581 / 9781456311582
    Page Count:
    94
    Binding Type:
    US Trade Paper
    Trim Size:
    6" x 9"
    Language:
    English
    Color:
    Black and White
    Related Categories:
    Computers / General

    Reported as spam!

  • Oracle Asset (Functional) Practice Questions for Interviews and Certificati

    https://www.createspace.com/3495382
    List Price: $29.99
    Add to Cart
    Oracle Asset (Functional) Practice Questions for Interviews and Certification Examination (Release 11i and 12)
    Functional Consultant
    Authored by Erp Gold
    This book contains 150 Oracle Asset Practice Questions for functional consultants. Very useful for interviews and certification examinations.
    Publication Date:
    Oct 26 2010
    ISBN/EAN13:
    1456311581 / 9781456311582
    Page Count:
    94
    Binding Type:
    US Trade Paper
    Trim Size:
    6" x 9"
    Language:
    English
    Color:
    Black and White
    Related Categories:
    Computers / General

    Reported as spam!

  • Using of Oracle Text functions not working in JDev

    Hi,
    I'm confused about using Oracle Text functions in JDeveloper.
    It's not possible for me to pass the sql syntax test while creating a view object with a custom query:
    SELECT score (1) myScore,
    dokumente.titel,
    ctx_doc.snippet ('idx_dokumente_titel',
    TO_CHAR (dokumente.dkt_id),
    'searchstring'
    ) snippet
    FROM dokumente
    WHERE contains (titel, 'searchstring', 1) > 0;
    I retrieve "ORA-00911:     invalid character" for the contains-function.
    (Using this statement in sql-worksheet works.)
    Any ideas?

    Hi william,
       Yes you need code abap to maintein your data. look at <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/2f/696d360856e808e10000009b38f839/frameset.htm">Business Data Toolset</a>, in the part of Dialog.
    Regards.
    Manuel

  • Oracle stored functions and where clauses

    Hello everybody,
    I need to call an Oracle stored function and at the same time do a select on
    the result of the query, it works well except when I use a where clause. I
    am connecting to Oracle 8.1.7 through OLEDB using the Oracle provider for
    OLEDB distributed with this Oracle version.
    Here is the query I am doing:
    select * from {call MC.SEC.QryTermbases(?, ?) where ID = ?}
    If I remove the where clause it works well but I need to use the where. I
    know that I could pass the parameter to the procedure instead of doing that
    in the select but there are places where I can not do that since the SQL
    query is generated dynamically. The code above is just a demo.
    Thanks very much for your help,
    Jose.

    Thanks for answering, it is actually possible to do a select on the return of a function, I have tested it with other than "select *" and it has worked well. What has not worked for me is using a "where" clause. That is "select" without "where" has worked but not with the "where".
    I also suspect that it does not work but similar queries work well in MSSQL 2000 and Interbase 6.0 so I thought may be there was a way to do that with Oracle. That is in MSSQL I can treat the result of a function as a normal table and I can do the same thing with a stored procedure that returns a recordset in Interbase.
    Thanks again for answering,
    Jose.

  • Oracle 9i function to perform data manipulation

    Hi everyone,
    I have two scenarios. I would like to write one Oracle 9i function that can accommodate both these scenarios, using PL/SQL developer. I intend passing a varchar2 parameter to this function. Within the function, I perform a select on a table and see if this value sent has a parent record.
    If it does not have a parent record (null or blank) then I take this value, join with another table, perform some processing and return one varchar2 value.
    If it has a parent record (not null or not blank) then I need to retrieve all the other children records associated with this same parent record, take this value, join with another table,perform some processing and return one varchar2 value.
    I have two simple queries that I wrote: one for record with null/blank parent, and the other for record with same parent and other children. These two queries work individually, when I combine them is where I run into problems. Sample table:
    TABLE XYZ data: (note: if there is a parent, parent shows up in both parent and child field in the table)
    child parent
    1234
    5107 3167
    6259 3652
    5678 9754
    3167 3167
    3652 3652
    1649
    2306 9754
    4657 3652
    9754 9754
    8753 3652
    passing record 1234 into the function.
    SELECT A.child, A.parent, C.field1
    FROM OTHERTABLE C,
    (SELECT TableA.child, TableA.parent
    FROM XYZ TableA
    WHERE TableA.child ='1234')A
    WHERE A.child = C.field2
    ----(output of this query is 1 record with 3 fields 1234 and null/blank and 987654321. I place this output into a cursor and then take 987654321 and place into a variable and return this value)
    passing record 4657 into the function
    SELECT c.CHILDfield, c.PARENTfield, TableOther.field1
    FROM OTHERTABLE TableOther,(
    (SELECT B.CHILDfield, B.PARENTfield FROM
    (SELECT A.PARENTfield, i.CHILDfield FROM TableB,
    (SELECT TableA.CHILDfield, TableA.PARENTfield
    FROM XYZ TableA
    WHERE TableA.CHILDfield ('4657' ))A
    -- pass 4657 and then get the parent
    WHERE A.PARENTfield = TableB.PARENTfield)B
    -- gets associated children with the parent from previous query.
    -- note: parent can exist in the parent and child fields
    WHERE B.CHILDfield <> B.PARENTfield))C
    --strips off the parent and gets child/children only as I don't need
    --the parent when it is also a child
    WHERE C.CHILDfield = TableOther.field1
    --(output of this query is 3 records
    4657 3652 912345671
    6259 3652 945362798
    8753 3652 934274857)
    I place this output into a cursor and then have a CASE statement that goes thru each record, and appends the third value into a variable, the ultimate return value of this will be as follows:
    912345671;945362798;934274857)
    The dilemma is writing a generic query to accommodate both these situations. My current function can handle each of these situations individually, but not both. For testing purposes, I change the select statement depending on whether I have a record that has a parent on not!
    Any help is greatly appreciated.

    You want one function to handle two cases? This is the best opportunity to use the IF STATEMENT.
    FUNCTION MyFunc (p_input IN VARCHAR2) RETURN VARCHAR2 IS
    ReturnValue VARCHAR2;
    BEGIN
    IF <blank or null test> THEN
    SELECT ... -- Blank or null select statement
    ... -- Blank or null data processing
    RETURN ReturnValue;
    ELSE
    SELECT ... -- Other select statement
    ... -- Other data processing
    RETURN ReturnValue;
    END IF;
    END MyFunc;

  • Oracle declare function in shell script

    Please tell me oracle declare function now able to run in shell script?
    I am calling in shell script like @/myscript.sql it is not working properly, reset update and other oracle command is working fine in shell script.

    I am running below code.
    #!/bin/sh
    sqlplus system/manager@prod_db <<ENDOFSQL
    update apps.fnd_concurrent_queues set node_name = 'host1', target_node ='host1' where node_name='host3';
    update apps.fnd_concurrent_queues set node_name = 'host2', target_node ='host2' where node_name='host4';
    commit;
    DECLARE
    VALUE BOOLEAN;
    l_node_id number;
    BEGIN
    select node_id into l_node_id from fnd_nodes where NODE_NAME = 'host5';
    VALUE := fnd_profile.save ('NODE_TRUST_LEVEL', 3, 'SERVER',l_node_id,null,null);
    END;
    ENDOFSQL
    Below ERROR i am getting after running above code via shell script with oracle user
    SQL>
    0 rows updated.
    SQL>
    0 rows updated.
    SQL>
    Commit complete.
    SQL> SQL> DECLARE
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at line 5

Maybe you are looking for

  • Mouse arrow has changed to straight line - how do I get the arrow back?

    Help! When I sat down to use my computer yesterday, I noticed the mouse arrow that is usually there has changed to a line (similar to a curser in a word document). I want to change it back to the arrow, but am unsure how. I'm hoping it's just a setti

  • Error in Mail Form: Academic titles

    Hi All, I have included the fields 1. Title_Key and 2. Title_Aca1 from the BP_Structures in my mail form. My mail form is in a different language. Thus, the requirement is to have the Title and Academic Title in the other language. I have maintained

  • How do I add time stamp to photo in photoshop?

    How do I add time stamp to photo in photoshop? I have saved photos from a camera phone to the computer. They still have the META data on them (aka the date and time from when the picture was taken). How do I put them on there?

  • The Project Server fields are comming blank from TFS task

    Hi, I have a environment with Project Server 2010 integrated with TFS 2012. When I create a task in TFS, the task is submited to approval in PS. The problem is with the TFS fields on PS:  Work Item ID Work Item Type Publish to Team Project These fiel

  • Plant missing in the inbound processing of IDOC ORDERS?

    Hi gurus, We are using IDOC ORDERS to create sales order in the inbound processing of R3 4.7 system, finally we found the sales order was created succesfully in VA03, but the plant(WERKS) and storage location(LGORT) couldn't be seen even the idoc has