Calling a function via dblink in a PL/SQL program

I tried the following in my PL/SQL code:
his_schema.his_function(argument1, argument2)@hisplace
I got an error from the PL/SQL compiler for that one. I am trying to call a function that has been written in another database via a dblink (that has been created; I can use the link from my SQL prompt).
Of course, so far I have only done select on tables using dblink. This is the first time I am trying a function (and of course, from inside a PL/SQL program).
Any pointers would be appreciated.
Thanks,
Srini

The syntax is
rc := his_schema.his_function@hisplace(argument1, argument2);

Similar Messages

  • How can I call a function via two different eventListener, is it possible?

    Hi...
    I want to call one function two different way... I write following code, but an error appears..
    Could you help me.. ?
    Thanks...!
    /******************************** LET'S CALL VIA TWO DIFFERENT EVENTLISTENER A FUNCTION ***********************************************/
    var trigger:Timer = new Timer(1000, 10);
    function showAll(evt:TimerEvent, olay:MouseEvent):void{
    /* code blocks */
    increase_btn.addEventListener(MouseEvent.CLICK, showAll);
    trigger.addEventListener(TimerEvent.TIMER, showAll);
    trigger.start();
    Gürkan Şahin
    Code Developer/Coder
    Turkey

    var trigger:Timer = new Timer(1000, 10);
    function showAll(evt:*):void{
    /* code blocks */
    increase_btn.addEventListener(MouseEvent.CLICK, showAll);
    trigger.addEventListener(TimerEvent.TIMER, showAll);
    trigger.start();
    Just change the showAll as shown - * is a wildcard - any object/event will work.
    You can also do like:
    function showAll(evt:* = null):void{
    By putting the = null you can call it with the events or just call it like showAll(); if you need.

  • Error occuring when calling a function via BSP

    In BSP, I call the function 'SD_DELIVERY_UPDATE_PICKING' to update a delivery. Unfortunately, when there is an error during processing this function (it is returned in the export table PROT), I found that this delivery is always locked! On the other hand, calling this function in SAP GUI, I haven't found this problem. How can I solve it. I try to use the command 'commit work.', but it doesn't work.
    Moreover, when this function raises an error message, in SAP GUI this function terminates its work according to the message type 'E' rule. However, in BSP, when this error message is raised, the page shows 'The page cannot be displayed'. How can I solve these problems.

    you should do something like below.
    call function 'SD_DELIVERY_UPDATE_PICKING'
        exporting
          vbkok_wa      = <vbkok_wa>
          synchron      = ' '
          no_messages_update = ' '
        tables
          vbpok_tab     = tvbpok
          prot          = wat_prot
        exceptions
          error_message = 2.
      case sy-subrc.
        when 0.
          describe table wat_prot lines fa_lines.
          if fa_lines = 0.
            commit work.
          else.
    * fill a vairable with a message and show it in BSP page
          endif.
        when 2.
    Regards
    Raja

  • Call lsmw functions via function module

    Hi experts,
    I have heard about the possibility to call LSMW functions
    (e.g. Read Data, Convert Data, Create Idoc,...) from "outside" with
    a SAP function module.
    I searched help databases and this forum for answers but I didn't find anything
    helpful.
    Has anybody experience with this issue?

    Not too hard:
    CALL WDA passing in a KEY on start plug.
    write the data to a shared memory object using the key passed as the
    key to a shared memort object on the submit.
    (see blogs on writing Shared maemory objects in ABAP)
    Then simply exit APP.
    On return read the data from the Shared memory Object.
    The shared memory object lives across the 2 sessions.
    cheers
    Phil.

  • Calling a function in a form in PL/SQL

    Hi all,
    i'm workin in Forms ( Oracle 10g) i wonna call a function and i got an error
    this is my code:
    declare
         x number;
         b_min_g number;
         b_max_g number;
    begin
         x := check_overlap(:min_g, :max_g, ex2.min_g, ex2.max_g);
    end;
    ex2 is a table
    i got this error:
    error 357 at line 7, col 14
    table, view or sequence reference 'ex2.min_g' not allowed in this context
    thanks in advance

    one more question:
    Are you using loop through ex2 table records, or cursor?
    or ex2 is also block name --> then use :ex2.min_g, :ex2.max_g
    Tomas

  • Calling a function in an EXE file from Java Program

    Hi Im having a function which is written in c program.i need to call that function from my java program, if i create a shared library (DLL) for my C code then it works but my requirement is i dont want to create that DLL , like in it would be an executable and my java code should access that function in that C program

    I understand the usage od a DLL but the thing is if i convert the exe to a DLL
    the server doesnt start at all so what i need is that i dont want to change
    that .EXE into a .DLL,let it be an executable. that executable is in running mode
    and through my java program i need to call a function in that EXE file.
    Is ther any way to do it?Nope, but you have another problem: why can't you separate your server program
    into a .dll part and a startup part? Both, when properly linked against each other
    should give you an executable file.
    kind regards,
    Jos

  • Return multiple variables from function via DBLINK

    hey,
    I've created a function for use by another database through a dblink.
    I created the function to return a ref cursor but
    have since found out that this is not allowed so i'm looking for
    alternatives?
    Assuming I want to keep the function on our database (for maintainability reasons) what other options do i have?
    Two suggestions i've got are 1) to return a ',' delimited string
    or to have a number of OUT parameters. Is there any reason
    why either of these would not work or would be preferable to the other?
    Thanks for reading, any help much appreciated.
    BTW i'm new to PL/SQL so feel free to dumb it down.
    cheers.
    function....
    CREATE OR REPLACE FUNCTION "GET_SCHEME_DETAILS"
    IN_BRANCH IN VARCHAR2,
    IN_AGENCY IN VARCHAR2,
    IN_PRODUCT_SUFFIX IN VARCHAR2,
    IN_TERM IN INTEGER,
    IN_LOAN_START_DATE IN DATE
    RETURN sys_refcursor AS TYPE RESULTSET IS REF CURSOR;
    and its being called like this....
    select GET_SCHEME_DETAILS@PPPRO ( '864' , '500086' , 'M7' , 10 , TO_DATE ( '01/02/2010' , 'DD/MM/YYYY' ) ) FROM DUAL ;

    I would be amazed if that even compiled.
    The function should look something like:
    CREATE FUNCTION GET_SCHEME_DETAILS (in_branch          IN VARCHAR2,
                                        in_agency          IN VARCHAR2,
                                        in_product_suffix  IN VARCHAR2,
                                        in_term            IN INTEGER,
                                        in_loan_start_date IN DATE) RETURN sys_refcursor AS
       l_ref_cur SYS_REFCURSOR;
       < any other variables that need declaring >
    BEGIN
       OPEN l_ref_cur FOR
          <your select tstatment here>
       RETURN l_ref_cur;
    END;and you would call it from the other database like:
    DECLARE
       l_other_ref_cur SYS_REFCURSOR;
       < any other variables that need declaring  like one for each column in the ref cursor>
    BEGIN
       l_other_ref_cur := get_scheme_details@PPPRO ('864', '500086', 'M7', 10,
                                                    TO_DATE ( '01/02/2010' , 'DD/MM/YYYY' ));
       LOOP
          FETCH l_other_ref_cursor INTO <variable list>
          EXIT WHEN l_other_ref_cursor%NOT_FOUND;
          <do something with the values>
       END LOOP;
       CLOSE l_other_ref_cur;
    END;Having said that, if you are only expecting to get one row back, then you could just as easily use a procedure with out parameters.
    If you expect multiple rows back, you could also just do a query on the other database drectly using the db link assuming that the user that the db link uses to connect has appropriate privileges.
    HTH
    John

  • Call Oracle Function via JDBC Adapter

    Hi to everybody,
    using JDBC connection with an Oracle DB, from XI I manage to send messages to execute SQL statements or Stored Procedures. Does anybody know if there is a way to call also an Oracle Function?
    Thanks a lot for any help...
    Ilaria

    Hi Illaria,
    I think i agree with Michal. The solution to your problem would be to go for a stored procedure. The link on SDN help only tells us that a stored procedure can be executed and does not discuss about oracle functions.
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    So, Stored Procedures, it has to be.
    Regards,
    Bhavesh

  • How to call c functions that expects c structs from java program?

    i need to call from my java program to c functions that get
    c structs as a parameters in their prototype.
    as you probablly know java is not working with structs (classes only), so my question is how can i do it , i mean call the c functions that gets structs as parameters form java????

    i believe your c function can accept a jobject and then inside your c function you have to translate that jobject into a c struct by using the jni methods.
    the only reason your c function cant accept structs from java is because java does not have such structures. your c function can accept any data type that has been defined and a jobject has been defined.
    if you have no control over the c functions that are being called, you need to write a wrapper function for those c function. the wrapper functions do the translation from jobject to a struct...then call the c other c functions.

  • Calling user function from Interface mapping

    I am getting error "Bad query:ORA-00904: invalid identifier" while calling function in the mapping of an interface.
    Can some one provide the syntax of calling user function from interface mapping.
    Thanks,
    RP

    user452108 wrote:
    Can some one provide the syntax of calling user function from interface mapping.Oracle's Call Iinterface, the OCI, does not work differently when coding using a Dvorak keyboard, or writing code using a pretty pink font in the editor.. or coding the call from an interface mapping (whatever the hell that that is).
    You have 2 types of calls. SQL and PL/SQL.
    To call a function via SQL, it can be done using a the standard cursor interface. E.g.
    select MyFunkyFunction from dualIt will return the function value via a single row with a single column. The standard cursor fetch and close cursor calls are used.
    To call it via PL/SQL, an anonymous PL/SQL block is needed, and the caller needs to use a bind variable to receive the value from the function. The anon block will look as follows:
    begin
      :bindVar := MyFunkyFunction;
    end;Refer to your client's abstract layer for interfacing with the Oracle Call Interface, on how to deal with bind variables.

  • Calling oracle function from Access passthrough query does not return list

    Thanks to the help I received in an earlier post I've created an oracle 10g function that returns a list after executing the sql it contains. It works in oracle, using sql developer.
    I need to have the list that it returns show up in MS Access via a passthrough query. It's not working so far. The connection string etc is ok, I'm able to use passthrough queries to run sql strings successfully. But when I try to call the function via the Access passthrough query at first nothing seems to happen (ie no list appears) and if I try to run it again, there is a odbc error 'call in progress. Current operation canceled'. There are only the three records in the table. I'm missing something, can anyone spot it?
    The passthrough query looks like this
    select * from fn_testvalues from dual
    Again that runs in oracle.
    To create the testing table and 2 functions see below.
    CREATE TABLE t_values (MyValue varchar2(10));
    Table created
    INSERT INTO t_values (
    SELECT 'Merced' c1 FROM dual UNION ALL
    SELECT 'Pixie' FROM dual UNION ALL
    SELECT '452' FROM dual);
    3 rows inserted
    CREATE OR REPLACE FUNCTION fn_isnum(p_val VARCHAR2) RETURN NUMBER IS
    n_val NUMBER;
    BEGIN
    n_val := to_number(p_val);
    RETURN 1;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN 0;
    END;
    Function created
    testing the table:
    SELECT val, fn_isnum(MyValue ) isnum
    FROM t_values;
    VAL ISNUM
    Merced 0
    Pixie 0
    452 1
    Now the function that is called in the passthrough query:
    create or replace function fn_testvalues
    return sys_refcursor is
    rc sys_refcursor;
    begin
    open rc for
    Select t_values.*, fn_isnum(MyValue) IsNum from t_values;
    return(rc);
    end fn_testvalues;

    lecaro wrote:
    OK. But obviously there is some oracle object that one can call via an Access pass-through query which returns rows?Just to clarify. You could fetch data in Access from an Oracle function that returns a ref cursor using VBA editor. To use a pass-through query Oracle function should be a table function or pipelined table function:
    CREATE OR REPLACE
      TYPE testvalues_obj_type
        AS OBJECT(
                  val varchar2(10),
                  isnum number
    CREATE OR REPLACE
      TYPE testvalues_tbl_type
        AS TABLE OF testvalues_obj_type
    CREATE OR REPLACE
      FUNCTION fn_testvalues
        RETURN testvalues_tbl_type
        PIPELINED
        IS
            CURSOR testvalues_cur
              IS
                SELECT  testvalues_obj_type(MyValue,fn_isnum(MyValue)) testvalues_obj
                  FROM  t_values;
        BEGIN
            FOR v_rec IN testvalues_cur LOOP
              PIPE ROW(v_rec.testvalues_obj);
            END LOOP;
            RETURN;
    END;
    /To test it in Oracle:
    SELECT  *
      FROM  TABLE(fn_testvalues)
    VAL             ISNUM
    Merced              0
    Pixie               0
    452                 1
    SQL> Now in Access pass-trough query window enter:
    SELECT  *
      FROM  TABLE(fn_testvalues);SY.

  • Calling a function in Bi Publisher

    can I call a function in bi publisher datamodel through SQL?

    in the query whats the use of stor-proc ?, unless u use pipeline

  • How to call a function module from debugger?

    Hi all,
           i just wanted to know whether we can call a function module from a debugger ,
           if yes how ?

    Hi Laxmikanth,
    How ur going to call a function module which is not present in program???
    In debugging mode u can change the values of variables,put break points and watch points,but i thnk its not possible to call a function module(not present in program) while debugging .
    Please share with us if u have any solution...
    Regards,
    lakshman.

  • CALLING AN FUNCTION MODULE FROM ILE/RPG

    Hello all,
    We are trying to call this function module ''CRM_CALL_ATP_BAPI'' from an ILE RPG program using and RFC call.
    This function module only have tables to pass and receive parameters. We have a hard time trying to make it work. We did'nt find any documentation for Ile RPG on how to define a structure table and on how to pass it to the function module.
    Did somebody that already done that would be kind enough to send us an exempple of the code.
    Claude Bernier
    Southshore industries

    Hello Claude,
    we are doing this kind of programming pretty often.
    If you are interested, you can contact us on that. It is pretty tricky with the iTabs, because the description is not really good and clear.
    Regards
    Volker Gueldenpfennig, consolut.gmbh
    http://www.consolut.de - http://www.4soi.de - http://www.easymarketplace.de

  • Call a function module from CRM 5.0 via ITS to FICA

    Hi
    I want to call a function module in FICA (FICA is using sapgui) from CRM (IC-web) via ITS (Not integrated in FICA)
    Is it possible and how should this be done???
    If someone know how, please help
    BR//JL

    generally RFCs should not have user dialogs.
    any how to handle your case, you need ITS and since FICA is a WAS 6.20 system, you need to have a ITS installed for FICA system, without which you cannot do that.
    alternatively you can mimic the functionality of the RFC by programming the same in a BSP and call this from CRM system
    Regards
    Raja

Maybe you are looking for

  • Read the text in pdf file

    Dear all, I have checked a lot of post about reading pdf in this forum. However, is it possible to read the text in pdf file. In my case, I need to read the content of pdf to do further process. Could anybody give me some suggestions. Thank you.

  • Need help for QCI ASTM routines

    Hello Friends, Presently I am setting up the QCI config in our test server. I have configured the necessary settings for the Conversion group and the reading group. Now when I am testing the results using the O3QCITEST transaction, I am getting an er

  • Oracle 10g and JDeveloper 10.1.3 Java Stored procedures

    Hello, I am not able to run Java Stored Procedures created with 10.1.3 in conjunction with an Oracle 10g Database. Same procedures are just working fine, when using JDev 10.1.2, but I want to / have to use Jdev 10.1.3! What happened? Greetings.

  • After Effects CC sluggish "Fast Preview" playback

    Hello, I've recently upgraded from After Effects 5.5 to CC. I've found CC to be very sluggish in many ways, from using the interface itself, to scrolling down my layers using the mouse wheel, to not being able to get realtime playback once I spacebar

  • Whilst transfering to new computer lost libary

    Help. Whilst following instructions for transfer to new comp, I have mangaed to wipe all information of I pod. Ihave dragged file to desktop and still have music files in when I connect and find i pod in My Computer. I am very un IT and in a panic. A