Can I call a function in another package?

Dear all,
Can I call a function in another package?
Say I have package A, and package B.
Is it possible for me to call a function in inside package A, within a function inside package B?
If yes, what's the syntax.
Thanks in advance!

The variable in the calling package that will receive the value of the function in the other package needs to be defined based on that type in the other package directly:
sql>create or replace package pkg_a
  2  is
  3    type testTable is table of varchar2(10) index by binary_integer;
  4 
  5    function f_a return testTable;
  6  end;
  7  /
Package created.
sql>create or replace package body pkg_a
  2  is
  3    function f_a
  4      return testTable
  5    is
  6      v_table testTable;
  7    begin
  8      v_table(1) := 'One';
  9      v_table(2) := 'Two';
10      return v_table;
11    end; 
12  end;
13  /
Package body created.
sql>create or replace package pkg_b
  2  is
  3    procedure p_b;
  4  end; 
  5  /
Package created.
sql>create or replace package body pkg_b
  2  is
  3    procedure p_b
  4    is
  5      v_table pkg_a.testTable;  -- this variable has to be based on the type in pkg_a
  6    begin
  7      v_table := pkg_a.f_a;
  8      for i in 1..v_table.count loop
  9        dbms_output.put_line( v_table(i) );
10      end loop;
11    end;
12  end; 
13  /
Package body created.
sql>exec pkg_b.p_b
One
Two
PL/SQL procedure successfully completed.

Similar Messages

  • Can't call a function inside another function

    Hello,
    i have the following function :
    FUNCTION test_day_week (P_DATE DATE)
    RETURN VARCHAR2 IS
    BEGIN
    RETURN TO_CHAR(P_DATE ,'DAY');
    END;
    --it returns the day name of a given date
    FUNCTION TEST_DAY_NUMBER (P_DAY_NAME VARCHAR2)
    RETURN NUMBER IS
         V_RESULT NUMBER;
         V_RETURN_DAY VARCHAR2(30);
         P_DATE DATE;
    BEGIN
    V_RETURN_DAY := test_day_week (P_DATE );
    MESSAGE('V_RETURN_DAY'|| V_RETURN_DAY);
    MESSAGE('V_RETURN_DAY'|| V_RETURN_DAY);
    IF V_RETURN_DAY = 'MONDAY' THEN V_RESULT :=1;
         END IF ;
    IF V_RETURN_DAY = 'TUSEDAY' THEN V_RESULT :=2;
         END IF ;
    IF V_RETURN_DAY = 'WENDSDAY' THEN V_RESULT :=3;
         END IF ;
    IF V_RETURN_DAY = 'THURSDAY' THEN V_RESULT :=4;
         END IF ;
    IF V_RETURN_DAY = 'FRIDAY' THEN V_RESULT :=5;
         END IF ;                
    IF V_RETURN_DAY = 'SATURDAY' THEN V_RESULT :=6;
    END IF ;
    IF V_RETURN_DAY = 'SUNDAY' THEN V_RESULT :=7;
         END IF ;
    RETURN V_RESULT;
    END;
    --The above function returnds the day name in numbers
    The proble is that when i call test_day_week function it returns no value even it is tested separatly and works fine don't know where is my problem :
    1-number of argrments in function[b] TEST_DAY_NUMBER
    ?? and so ..!
    Regards,
    Abdetu..

    You could also cut the whole thing down to a simple function... (assuming you have a need to customise your start of week rather than use built in date functionality)
    SQL> ed
    Wrote file afiedt.buf
      1  CREATE OR REPLACE FUNCTION test_day_week (P_DATE DATE) RETURN NUMBER IS
      2  BEGIN
      3    RETURN (INSTR('MONTUEWEDTHUFRISATSUN',TO_CHAR(P_DATE,'DY'))+2)/3;
      4* END;
    SQL> /
    Function created.
    SQL> select test_day_week(sysdate) from dual;
    TEST_DAY_WEEK(SYSDATE)
                         1
    SQL> select test_day_week(sysdate+1) from dual;
    TEST_DAY_WEEK(SYSDATE+1)
                           2
    SQL> select test_day_week(sysdate+2) from dual;
    TEST_DAY_WEEK(SYSDATE+2)
                           3
    SQL> select test_day_week(sysdate+3) from dual;
    TEST_DAY_WEEK(SYSDATE+3)
                           4
    SQL> select test_day_week(sysdate+4) from dual;
    TEST_DAY_WEEK(SYSDATE+4)
                           5
    SQL> select test_day_week(sysdate+5) from dual;
    TEST_DAY_WEEK(SYSDATE+5)
                           6
    SQL> select test_day_week(sysdate+6) from dual;
    TEST_DAY_WEEK(SYSDATE+6)
                           7
    SQL> select test_day_week(sysdate+7) from dual;
    TEST_DAY_WEEK(SYSDATE+7)
                           1
    SQL>

  • Call/start function on another package

    hi all,
    i'm new to java card development..
    i'd like to know if it's possible to call/start a function, or assign a value to a variable that belongs in an applet of a different package..
    currently, i'm using an old eclipse version for development..
    any comment is appreciated..
    thanks..
    regards,
    bayu k

    Hi Manuel,
    Thanks a lot for the hint and the link..
    I already started making 2 test packages (server and client) to try the shareable interface object, but i cant seem to get it right..
    on the client side, i cant cast the interface.. i think i need to import the server's package, but i dont know how to refer to another project.. (em using eclipse v2.1)
    below is the code.. i mark the line where i other package can not be resolved.. (commented as "PROBLEM")
    appreciate it very much for anyone's comment..
    thank you..
    server package : (1 class, 1 interface)
    the interface :
    package settings;
    import javacard.framework.*;
    public interface Settings extends Shareable
         public void SetLang(byte lang);
         public byte GetLang();
    the class :
    package settings;
    import javacard.framework.*;
    public class Proc extends Applet implements Settings {
         private byte bLang;
         public void SetLang(byte lang)
              bLang = lang;     
         public byte GetLang()
              return bLang;     
         public Shareable getShareableInterfaceObject(AID clientAID, byte parameter)
                    return this;
         public static void install(byte[] bArray, short bOffset, byte bLength) {
              // OP-compliant JavaCard applet registration
              new Proc().register(bArray, (short) (bOffset + 1), bArray[bOffset]);
         public void process(APDU apdu) {
              // Good practice: Return 9000 on SELECT
              if (selectingApplet()) {
                   return;
              byte[] buf = apdu.getBuffer();
              switch (buf[ISO7816.OFFSET_INS]) {
                   case (byte) 0xb1 :
                        break;
                   default :
                        // good practice: If you don't know the INStruction, say so:
                        ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
    client package : (1 class)
    package client;
    import javacard.framework.*;
    public class client extends javacard.framework.Applet{
         private byte[] servAID = {(byte)'A',(byte)'0',(byte)'1',(byte)'0',(byte)'1',(byte)'0',(byte)'1',(byte)'0',(byte)'0',(byte)'0',(byte)'0',(byte)'2'};
         public client()
         private void Call()
         AID settingsAID = JCSystem.lookupAID(servAID,(short) 0, (byte) servAID.length);
            //PROBLEM = BELOW IS THE LINE WHERE I CANT CALL THE SERVER'S PACKAGE "settings"     
           settings sio = (settings)(JCSystem.getAppletShareableInterfaceObject(settingsAID, (byte) 0));
         public static void install(byte[] bArray, short bOffset, byte bLength){
              (new client()).register(bArray, (short)(bOffset + 1), bArray[bOffset]);
         public void process(APDU apdu){
              byte[] buf = apdu.getBuffer();
              switch(buf[ISO7816.OFFSET_INS]){
                   case (byte)0xb1:
                        break;
                   default:
    }

  • Call a function inside a package from a stored procedure

    Hello:
    I am kind of new to the stored procedure. Does anyone know how to call a function inside a package from another stored procedure?
    I have a existing function (func_b) inside a package (pack_a) and it returns a cursor. I want to call this function from a stored procedure (proc_c) so that I use the data inside the cursor.
    can I do the following in proc_c:
    my_cursor1 SYS_REFCURSOR;
    begin
    my_cursor1 := exec pack_a.func_b
    end
    It will be very helpful if anyone can point me to any reading or example. Thank you very much for your information.

    guys:
    Thank you for your information so far. I need some more help here. I was able to run the function in my stored procedure. However, I was not able to print the result on the screen to view the cursor result, although I am using dbms_output.put_line statement inside my stored procedure.
    I use the following statement to execute my stored procedure on sql*plus. I can tell the stored procedure is executed successfully, but I did see anything printed:
    DECLARE TEMP VARCHAR2(100);
    BEGIN PROC_LAWS_CAD_NAME_SEARCH('LPD', 'TEST DEVICE ID', 'TEST LAST NAME', 'TEST FIRST NAME', 'F', '11112009', TEMP); END;
    I tried to use 'set serveroutput on' and got the following error:
    ERROR:
    ORA-06502: PL/SQL: numeric or value error: host bind array too small
    ORA-06512: at line 1
    I am kind of confused now. thank you for your help.
    Jack
    Here is my procedure:
    create or replace
    PROCEDURE PROC_SEARCH
    ( AGENCY_ID IN VARCHAR2,
    DEVICE_ID IN VARCHAR2,
    L_NAME IN VARCHAR2,
    F_NAME IN VARCHAR2,
    SEX IN VARCHAR2,
    DOB IN VARCHAR2,
    CAD_NAME_SCH_RESULT_STR OUT VARCHAR2)
    AS
    v_agy_id varchar2(10);
    v_device_id varchar2(20);
    v_l_name varchar2(25);
    v_f_name varchar2(15);
    v_sex varchar2(1);
    v_dob date;
    -- this cursor is going to be used to store a list of warrant matching
    -- name search criteria
    cad_srch_cursor sys_refcursor;
    objSrch SEARCH_RESULT_TEMP%ROWTYPE;
    BEGIN
    cad_srch_cursor := SEARCH_PKG.SEARCH('TESTING', 'TESTER', null, null,null, null, getPhonetic('TESTING'));
    LOOP
    FETCH cad_srch_cursor INTO objSrch;
    EXIT WHEN cad_srch_cursor%NOTFOUND;
    --insert into SEARCH_RESULT_TEMP (name_last) values (objSrch.name_last);
    CAD_NAME_SCH_RESULT_STR := objSrch.name_last;
    dbms_output.put_line('First:'||objSrch.name_first||':Last:'||objSrch.name_last||':Middle:'||objSrch.name_middle);
    end LOOP;
    END PROC_LAWS_SEARCH;
    -----------------------------------------

  • How can I call a function from a procedure

    I have a function named: f_calc_value which return the variable v_result. This function is part of a package.
    How can I call this function from a new procedure I am creating?
    Thanks

    or refer this theread....calling function from procedure

  • Can I call a function with an arguement of %ROWTYPE directly from SQL?

    I have the following function in a 10g DB:
    CREATE OR REPLACE FUNCTION f_is_eligible2 (in_dm_row IN amplify_dm%ROWTYPE)
    RETURN NUMBER
    IS
    I know I can call that function from another pl/sql function but I'm wondering if I can call that function directly from a SQL statement, something like this:
    SELECT f_is_eligible2(dm.*)
    FROM amplify_dm dm
    or
    SELECT f_is_eligible2(dm%rowtype)
    FROM amplify_dm dm
    neither of those worked so I'm thinking it's not possible but I thought I'd ask anyway.
    Thanks in advance!

    Not possible as said - but - based on what I'm seeing - you could simply pass the parameter(s) that are key on that table and - accomplish the same thing by modifying the function.
    not sure why you'd need the whole row if I'm interpretting the code excerpt.

  • Can we call a function within a function??????Urgent

    Dear All,
    Like we can call a procedure from another procedure , in the same way can we call a function within a function. Please reply it's urgent.
    Regards

    > Please reply it's urgent.
    My usual soapbox response.
    Saying your posting is urgent is rude and arrogant. Why? Because you are saying that other people who have posted problems here, have less important problems than yours. That despite how complex and critical their problem may be, yours take priority.
    You're also demaning attention and a quick answer from people that provide support here - in their free time... and not getting paid a single cent for their efforts.
    So just how can you demand any urgency to your posting from them?
    Remember that this is a public forum. You cannot demand anything here. This is not Oracle Support. There are no SLA's here. Basic nettiquette applies.

  • Can I call a function from a dll in LabVIEW that returns:double*string and int.?

    I have a function from a dll that return a double* string and an integer. How can I call this function from LabVIEW? There is a possibility to work in LabVIEW with a double* string?

    pcbv wrote:
    > Hello all,<br><br>The header of the function is:
    >
    > "HRESULT WRAPIEnumerateDevices(WRAPI_NDIS_DEVICE **ppDeviceList, long *plItems);"
    >
    > where WRAPI_NDIS_DEVICE have this form:
    >
    > typedef struct WRAPI_NDIS_DEVICE<br>{<br>
    > WCHAR *pDeviceName;<br>
    > WCHAR *pDeviceDescription;<br><br>}
    > WRAPI_NDIS_DEVICE;<br><br>
    >
    > The function is from WRAPI.dll, used for communication with wireless card.
    > For my application I need to call in LabVIEW this function.
    Two difficulties I can see with this.
    First the application seems to allocate the array of references
    internally and return a pointer to that array. In that case there must
    be another function which then deallocates that array again.
    Then you would need to setup the function call to have a pointer to an
    int32 number for the deviceList parameter and another pointer to int32
    one for the plItems parameter.
    Then create another function in your DLL similar to this:
    HRESULT WRAPIEnumExtractDevice(WRAPI_NDIS_DEVICE *lpDeviceList, long i,
    CHAR lpszDeviceName, LONG lenDeviceName,
    CHAR lpszDeviceDesc, LONG lenDeviceDesc)
    if (!lpDeviceList)
    return ERROR_INV_PARAMETER;
    if (lpDeviceList[i].pDeviceName)
    WideCharToMultiByte(CP_ACP, 0,
    pDeviceList[i].pDeviceName, -1,
    lpszDeviceName, lenDeviceName,
    NULL, NULL);
    if (lpDeviceList[i].pDeviceName)
    WideCharToMultiByte(CP_ACP, 0,
    pDeviceList[i].pDeviceDescription, -1,
    lpszDeviceDesc, lenDeviceDesc,
    NULL, NULL);
    return NO_ERROR;
    Pass the int32 you got from the first parameter of the previous call as
    a simple int32 passed by value to this function (and make sure you don't
    call this function with a higher index than (plItems - 1) returned from
    the first function.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Need Help: Using Ref Cursor in ProC to call a function within a Package

    I'm calling a function within a package that is returning a REF CURSOR.
    As per the Oracle Pro*C Programmer's Guide, I did the following:
    1) declared my cursor with a: EXEC SQL BEGIN DECLARE SECTION and declared the cursor as: SQL_CURSOR my_cursor;
    2) I allocated the cursor as: EXEC SQL ALLOCATE :my_cursor;
    3) Via a EXEC SQL.....END-EXEC begin block
    I called the package function and assign the return value to my cursor
    e.g. my_cursor := package.function(:host1, :host2);
    Now, the only difference between my code and the example given in the Pro*C Programmer's Guide is that the example calls a PROCEDURE within a package that passes back the REF CURSOR as an OUT host variable.
    Whereas, since I am calling a function, the function ASSIGNS the return REF CURSOR in the return value.
    If I say my_cursor := package.function(:host1, :host2); I get a message stating, "PLS-00201: identifier MY_CURSOR" must be declared"
    If I say :my_cursor := package.function(:host1, :host2); I get a message stating, "ORA-01480: trailing null missing from STR bind value"
    I just want to call a package function and assign the return value to a REF CURSOR variable. There must be a way of doing this. I can do this easily in standard PL/SQL. How can this be done in Pro*C ???
    Thanks for any help.

    Folks, I figured it out. For those who may face this problem in the future you may want to take note for future reference.
    Oracle does not allow you to assign the return value of a REF CURSOR from a FUNCTION ( not Procedure - - there is a difference) directly to a host variable. This is the case even if that host variable is declared a CURSOR variable.
    The trick is as follows: Declare the REF CURSOR within the PL/SQL BEGIN Block, using the TYPE statement, that will contain the call to the package function. On the call, you then assign the return REF CURSOR value that the function is returning to your REF CURSOR variable declared in the DECLARE section of the EXEC SQL .... END-EXEC PL/SQL Block.
    THEN, assign the REF CURSOR variable that was populated from the function call to your HOST cursor varaible. Then fetch this HOST Cursor variable into your Host record structure variable. Then you can deference individual fields as need be within your C or C++ code.
    I hope this will help someone facing a deadline crunch. Happy computing !

  • Calling a function in another class that is not the App delegate nor a sngl

    Hi all-
    OK- I have searched and read and searched, however I cannot figure out an easy way to call a function in another class if that class is not the app delegate (I have that down) nor a singleton (done that also- but too much code)
    If you use the method Rick posted:
    MainView *myMainView = [[MainView alloc] init];
    [MyMainView goTell];
    That works, however myMainView is a second instance of the class MainView- I want to talk to the instance/Class already instantiated.
    Is there a way to do that without making the class a singleton?
    Thanks!

    I had some trouble wrapping my head around this stuff at first too.
    I've gotten pretty good at letting my objects communicate with one another, however I don't think my method is the most efficient or organized way but I'll try to explain the basic idea.
    When you want a class to be able to talk to another class that's initialized elsewhere, the class your making should just have a pointer in it to the class you want to communicate with. Then at some point (during your init function for example) you should set the pointer to the class you're trying to message.
    for example in the app-delegate assume you have an instance of a MainView class
    and the app-delegate also makes an instance of a class called WorkClass
    If you want WorkClass to know about MainView just give it a pointer of MainView and set it when it's instantiated.
    So WorkClass might be defined something like this
    //WorkClass.h
    @import "MainView.h"
    @interface WorkClass : NSObject
    MainView *myPointerToTheMainView;
    @property (retain) myPointerToTheMainView;
    -(void)tellMainViewHello;
    @end
    //WorkClass.m
    @import "WorkClass.h"
    @implementation WorkClass
    @synthesize myPointerToTheMainView;//this makes getter and setter functions for
    //the pointer and allows us to use the dot
    //syntax to refrence it.
    -(void)tellMainViewHello
    [myPointerToTheMainView hello]; //sends a message to the main view
    //assume the class MainView has defined a
    //method -(void)hello
    @end
    now somewhere in the app delegate you would make the WorkClass instance and pass it a reference to the MainView class so that WorkClass would be able to call it's say hello method, and have the method go where you want (to the single instance of MainView owned by the app-delegate)
    ex:
    //somewhere in app-delegate's initialization
    //assume MainView *theMainView exists and is instantiated.
    WorkClass *myWorkClass = [[WorkClass alloc] init];
    myWorkClass.myPointerToTheMainView = theMainView; //now myWorkClass can speak with
    // the main view through it's
    // reference to it
    I hope that gets the basic idea across.
    I'm pretty new to Obj-c myself so if I made any mistakes or if anyone has a better way to go about this please feel free to add
    Message was edited by: kodafox

  • Calling a Function from another Function within CFC

    Hi all,
    I have many functions in my CFC that do various things, but
    one query is a query that selects absolutely every record from a
    table.
    The thing is, I need to do a query like this in another
    function to obtain only a recordcount of the same table used in
    both separate functions. Instead of writing the query out again,
    how can I utilise the function already written?
    My question is, how can I invoke and use the results of a
    query in one cffunction for another cffunction in the same CFC
    component?
    An example may look like the code attached...
    Many thanks for your patience and help!
    Mikey.

    quote:
    Originally posted by:
    Dan Bracuk
    Generally, to call a function from within a cfc, you do
    exactly what you do outside a cfc.
    For your specific case, if your requirements permit it, you
    might consider caching the big query for a couple of seconds. Then
    you can continously call the function and not have to wait for it
    to run and bring back the data each time.
    Do you mean to say that within a CFC function I can execute
    the same cfinvoke tags I use in normal CFM pages?
    Mikey.

  • How to get a called procedure/function name within package?

    Hi folks,
    is it possible to obtain a called procedure/function name within package?
    For a measuring and tracing purpose, I would like to store an info at the beginning of each procedure/function in package with timestamp + additional details if needed.
    For example:
    CREATE OR REPLACE PACKAGE BODY "TEST_PACKAGE" IS
       PROCEDURE proc_1 IS
       BEGIN
          api_log.trace_data(sysdate, 'START.' || ???????);
          api_log.trace_data(sysdate, 'END.' || ???????);
       END;
       PROCEDURE proc_2 IS
       BEGIN
          api_log.trace_data(sysdate, 'START.' || ???????);
          proc_1;
          api_log.trace_data(sysdate, 'END.' || ???????);
       END;
    END; I would like to replace "???????" with a function which would return a name of called procedure, so result of trace data after calling TEST_PACKAGE.proc_2 would be:
       11.1.2013 09:00:01    START.*TEST_PACKAGE.proc_2*
       11.1.2013 09:00:01    START.*TEST_PACKAGE.proc_1*
       11.1.2013 09:00:01    END.*TEST_PACKAGE.proc_1*
       11.1.2013 09:00:01    END.*TEST_PACKAGE.proc_2*I tried to use "dbms_utility.format_call_stack" but it did not return the name of procedure/function.
    Many thanks,
    Tomas
    PS: I don't want to use an hardcoding

    You've posted enough to know that you need to provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    >
    is it possible to obtain a called procedure/function name within package?
    For a measuring and tracing purpose, I would like to store an info at the beginning of each procedure/function in package with timestamp + additional details if needed.
    >
    I usually use this method
    1. Create a SQL type for logging information
    2. Put the package name into a constant in the package spec
    3. Add a line to each procedure/function for the name.
    Sample package spec
          * Constants and package variables
              gc_pk_name               CONSTANT VARCHAR2(30) := 'PK_TEST';Sample procedure code in package
          PROCEDURE P_TEST_INIT
          IS
            c_proc_name CONSTANT VARCHAR2(80)  := 'P_TEST_INIT';
            v_log_info  TYPE_LOG_INFO := TYPE_LOG_INFO(gc_pk_name, c_proc_name); -- create the log type instance
          BEGIN
              NULL; -- code goes here
          EXCEPTION
          WHEN ??? THEN
              v_log_info.log_code := SQLCODE;  -- add info to the log type
              v_log_info.log_message := SQLERRM;
              v_log_info.log_time    := SYSDATE;
              pk_log.p_log_error(v_log_info);
                                    raise;
          END P_PK_TEST_INIT;Sample SQL type
    DROP TYPE TYPE_LOG_INFO;
    CREATE OR REPLACE TYPE TYPE_LOG_INFO AUTHID DEFINER AS OBJECT (
    *  NAME:      TYPE_LOG_INFO
    *  PURPOSE:   Holds info used by PK_LOG package to log errors.
    *             Using a TYPE instance keeps the procedures and functions
    *             independent of the logging mechanism.
    *             If new logging features are needed a SUB TYPE can be derived
    *             from this base type to add the new functionality without
    *             breaking any existing code.
    *  REVISIONS:
    *  Ver        Date        Author           Description
    *   1.00      mm/dd/yyyy  me               Initial Version.
        PACKAGE_NAME  VARCHAR2(80),
        PROC_NAME     VARCHAR2(80),
        STEP_NUMBER   NUMBER,
        LOG_LEVEL   VARCHAR2(10),
        LOG_CODE    NUMBER,
        LOG_MESSAGE VARCHAR2(1024),
        LOG_TIME    TIMESTAMP,
        CONSTRUCTOR FUNCTION type_log_info (p_package_name IN VARCHAR2 DEFAULT 'Uninitialized',
                                            p_proc_name IN VARCHAR2 DEFAULT 'Uninitialized',
                                            p_step_number IN NUMBER DEFAULT 1,
                                            p_LOG_level IN VARCHAR2 DEFAULT 'Uninit',
                                            p_LOG_code IN NUMBER DEFAULT -1,
                                            p_LOG_message IN VARCHAR2 DEFAULT 'Uninitialized',
                                            p_LOG_time IN DATE DEFAULT SYSDATE)
                    RETURN SELF AS RESULT
      ) NOT FINAL;
    DROP TYPE BODY TYPE_LOG_INFO;
    CREATE OR REPLACE TYPE BODY TYPE_LOG_INFO IS
        CONSTRUCTOR FUNCTION type_log_info (p_package_name IN VARCHAR2 DEFAULT 'Uninitialized',
                                            p_proc_name IN VARCHAR2 DEFAULT 'Uninitialized',
                                            p_step_number IN NUMBER DEFAULT 1,
                                            p_LOG_level IN VARCHAR2 DEFAULT 'Uninit',
                                            p_LOG_code IN NUMBER DEFAULT -1,
                                            p_LOG_message IN VARCHAR2 DEFAULT 'Uninitialized',
                                            p_LOG_time IN DATE DEFAULT SYSDATE)
         RETURN SELF AS RESULT IS
        BEGIN
          self.package_name  := p_package_name;
          self.proc_name     := p_proc_name;
          self.step_number   := p_step_number;
          self.LOG_level   := p_LOG_level;
          self.LOG_code    := p_LOG_code;
          self.LOG_message := p_LOG_message;
          self.LOG_time    := p_LOG_time;
          RETURN;
        END;
    END;
    SHO ERREdited by: rp0428 on Jan 11, 2013 10:35 AM after 1st cup of coffee ;)

  • Can we call a function module in ADHOC query

    Hi
    Can we call a function module in ADHOC query if yes how.
    Also we ned to know how to call a function module in SAP query.
    An early responce is appreciated.
    Thanks and best regards
    Rajeev

    Okay as far as I understand your aim is:
    To fill a field in the output list with a value that is based on the current line information and calculated by a function module
    So go to SQ02 and create an additional field in the InfoSet.
    You can refer in the coding to the technical names you can see in the left tree window like P0000-PERNR.
    More information is avaiable in the Help part look for additional field in SQ02.
    Regards,
    Michael

  • Can we call a report in another report?

    I have developed a XMLP report for AR receivables for a customer and another XMLP report for AP vouchers for a customer.
    Now my requirement is to develop a report for AR/AP Balance for a customer,which is combination of above 2(ie AR Receivables report + AP vouchers report).
    What is the possible solution to above mentioned requirement??
    Can I call a report from another report(for ex AP vouchers report from AR Receivables report).Is this possible?
    If yes,please explain...
    Or are there any alternatives to this requirement??
    Thanks in advance!!

    Hi,
    Calling another report in a report? Not sure about your requirement but you can do fnd_submit/fnd_request.
    OR, if you need AR/AP balance,... here's an alternative solution:
    If you're in R12, there is the "Automatic Netting (AP/AR)" feature in Payables. You could check on the available report if it fits your need.
    In 11i, you may run "Supplier Customer Netting Report" (ARXSCN). This is an OReport(RDF) and could be converted to XMLP. This report is designed to display the net balances in AP and AR for Vendors and Customers with the same name, NIF Code, or VAT Registration.
    Hope this helps.
    Rownald

  • Can you call a function module from within a smartform?

    I was told that yu can not call a function module from a smartform - that does not make sense to me because you can do tons of ABAP within a smartform.
    Well - can you?
    Thanks.
    Scott

    Yes, you can call function modules.

Maybe you are looking for

  • Programs hang after 10.3.9 how do i go back?

    i updated to 10.3.9 from 10.3.5 and now quicktime, reason, itunes and probly others wont open at all...i repaired perms and restarted i dont know what else to do. with the software update i installed the quicktime so it should be the corresponding ve

  • EDI820 currency and amount- blank in Payment advice.(Basic type PEXR2002)

    Hi All, We are in the process of implementing EDI 820 for customer payments. When the IDOC is generated, a payment advice is created but it has blank values in amount & currency fields, due to which we get an error "Formatting error in the field BKPF

  • Converting string to date in mm/dd/yyyy format

    Hi, I used simpledateformat to convert date to "MM/dd/yyyy" format. Now when i want to insert into db, i want the value as date object instead of string [returned by format method of SimpleDateFormat] what should i do? Date dt = new Date(); SimpleDat

  • Delay between sending messages

    Hi, I sometimes need to send 500+ individual emails and just about every time I end up with errors messages, saying "too many messages", "mail server not responding" etc and reading my ISP's FAQ they recommend sending an email a minute when sending l

  • Resource History Page Modification Possible?

    Hi, In Resource History page, the processes are listed that have run before. To get the detailed information we should click to the record on list and go to the Detail Page of this record. However, I want to show the date info, that is the working ti