Another Function Question

I have created the following Function:
CREATE FUNCTION f_defer_future_payments
(Vendor_id varchar2,
User_id varchar2,
Start_date date,
End_date date,
Defer_to_date date
RETURN NUMBER
IS
original_start_date date;
original_end_date date;
original_defer_to_date date;
dfp_start_date_flag char(1);
start_date_changed number(5);
start_date_chgd_fut_to_future number(5);
start_date_chgd_past_to_future number(5);
defer_to_date_changed number(5);
update_vehicle_processing number(5);
update_vendor_data number(5);
today_date date;
min_date date;
return_code number;
test_flag_internal number(5);
lv_db_session_id number(18,0);
BEGIN
start_date_chgd_past_to_future := 0;
start_date_chgd_fut_to_future := 0;
update_vehicle_processing := 0;
update_vendor_data := 0;
today_date := TRUNC(SYSDATE);
min_date := TO_DATE('18000101','YYYYMMDD');
return_code :=
CASE dfp_start_date_flag
WHEN 'Y' THEN 2
WHEN 'N' THEN 1
ELSE 1
END;
IF ((original_defer_to_date IS NOT NULL) AND (Defer_to_date IS NULL)) THEN
update_vehicle_processing := 1;
Defer_to_date := NULL;
update_vendor_data := 0;
return_code :=
CASE dfp_start_date_flag
WHEN 'Y' THEN 2
WHEN 'N' THEN 1
END;
END IF;
-- ============================================================
-- Process finished with SUCCESS
-- ============================================================
RETURN(1);
END;
When I try to compile it, I get this error:
NAME TYPE SEQUENCE LINE POSITION
TEXT
ATTRIBUTE MESSAGE_NUMBER
F_DEFER_FUTURE_PAYMENTS FUNCTION 1 43 8
PLS-00363: expression 'DEFER_TO_DATE' cannot be used as an assignment target
ERROR 363
F_DEFER_FUTURE_PAYMENTS FUNCTION 2 43 8
PL/SQL: Statement ignored
ERROR 0
2 rows selected.
In this Function, I need to set the passed variable 'Defer_to_date' to NULL; why can't I do this??
Any Assistance would be appreciated.
Murray Sobol

there is no need to change the parameter value since you will not use it back to the calling program. if you need to return the parameter value back to your calling program switch to procedure and define the parameter variable as in and out.

Similar Messages

  • Simple Question -- How to use global variables in an another function??!

    Function named globalLeftMargin that has:
    Global NumberVar LeftMargin := 5;
    HOW DO I USE THIS IN ANOTHER FUNCTION?  B/C IT DOES NOT RECOGNIZE IT AND GIVES THIS ERROR:
    The ) is missing.
    The other function is:
    Space(LeftMargin)

    Hi Ajay,
    Add WhilePrintingRecords at the beginning of each formula like:
    WhilePrintingRecords;
    Global NumberVar LeftMargin := 5;
    WhilePrintingRecords;
    Global NumberVar LeftMargin;
    Space(LeftMargin)
    Good luck,
    Brian

  • 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 find the existing function module is used in another function module

    Hi all,
    I created a function module and the same one is called from another function module.
    When I tried to find where the  first function module is used  using  Where-used List , I am getting the message "function module not found in selected areas" .
    Please  guide me what is other method to find whether the function module is used in another one.
    Thanks,
    Vengal Rao.

    hi,
    Go to UTILITIES-> Update Navigation index.
    or go to fucntion group and Generate the Funtion group once.
    it will detect all fucntion modules under that function group.
    regards,
    Rama

  • Calling another function if upate statement fails

    Hi there,
    I have written an update procedure and insert procedure. Is there a way of calling another function if the update statement fails? Thanks a lot for your help.
    Chris
    procedure update_costing(in_period in DATE,
                   in_project_id IN VARCHAR2,
                   in_user_id IN VARCHAR2,
                   in_thu IN VARCHAR2,
                   in_fri IN VARCHAR2,
                   in_sat IN VARCHAR2,
                   in_sun IN VARCHAR2,
                   in_mon IN VARCHAR2,
                   in_tue IN VARCHAR2,
                   in_wed IN VARCHAR2)
         UPDATE TBL_COSTING
              SET
                   HOURS_THU = to_date (in_thu, 'HH24:MI'),
                   HOURS_FRI = to_date (in_fri, 'HH24:MI'),
                   HOURS_SAT = to_date (in_sat, 'HH24:MI'),
                   HOURS_SUN = to_date (in_sun, 'HH24:MI'),
                   HOURS_MON = to_date (in_mon, 'HH24:MI'),
                   HOURS_TUE = to_date (in_tue, 'HH24:MI'),
                   HOURS_WED = to_date (in_wed, 'HH24:MI'),
                   WHERE PERIOD = in_period
         AND PROJECT_ID = in_project_id
         AND USER_ID = in_user_id;
    EXCEPTION
    --CALLL HERE THE INSERT FUNCTION WITH SAME DATAMEMBERS
    SOMETHING LIKE THIS---
    WHEN others then
         insert_costing(in_period, in_project_id, in_user_id ,in_thu,in_fri,in_sat,in_sun,in_mon,in_tue,in_wed ,in_submit);
    COMMIT;
    END update_costing;

    begin
    UPDATE statement
    IF SQL%ROWCOUNT =0
    then
    INSERT statement|procedure
    end if;
    end;
    /Hi,
    i have a simple doubt over here, i read somewhere that cursor attributes can be used only as long as the cursor is open, then in the above case whiel doing the update operation, oracle implicitly will open an cursor and will do the operation and then will close the cursor, then how does SQL%ROWcount works???please revert...
    cheere

  • How to pass a locale object into another function?

    Greetings,
    i like to pass a locale object into another function. These are my code below
    import java.util.*;
    public class Locales{
         public static void main(String[] args){
              Locale locale= new Locale("EN", "US");
              convert(locale);
    public void convert(Locale convert)
         String language = convert.getDisplayLanguage();
         System.out.println(language);          
    }I got this error:
    Locales.java:6: non-static method convert(java.util.Locale) cannot be referenced from a static content
                    convert(locale);
                    ^How do i correct it?
    Thanks

    Did you bother to do a search?
    Did you bother to read any of the material that the search would have linked you to?
    If you had then you would be able to understand where you are going wrong and how to fix it yourself. Instead of being spoonfed by us.

  • Passing results to another function in MDX

    I'm pretty sure I know the answer to this, but it would be cool if it worked, so I figured I would put it out there and see if anyone successfully did this.<BR><BR>Is it possible to pass the result of a function NonEmptyCount() as an index for another function Item()?<BR><BR>Example<BR>CrossJoin({[Time].Levels(0).members},<BR>{[Measures].[Headcount]}).Item(NonEmptyCount(<BR>[Time].Levels(0).members, [Measures].[Headcount]<BR>))

    I found the solution to my problem.
    [1] Create a "After Submit" under Computations.
    [2] Select 'Item Value' under Type in Item Name
    [3] Select "After Submit" under Computation Point
    [3] Enterer Item Name, which value needs to be passed in 'Source'
    thanks

  • Using a function module i want to create another function module

    Hi all,
            My requirement is by using a function module i want to create another function module(if needs modify action should also be done if i need this is for the created function module) and the main thing is that the function module which we are used to create is should be RFC enabled.
    Thanks,
    Vichu.

    Hi,
    You can do one thing... you write the BDC code in the function module name you are creating... so that if you call the function module in a program and execute that program and if you give the function module to be created in the selection screen of the program... in this way there is chance of creating another function module.
    Hope this would help you.
    Good luck
    Narin

  • How to you refer to a function in another function in a cfc

    HI,
    How to you refer to a function in another function in a cfc like so
    <cffunction name="getApplicationConstants" access="remote" returntype="struct">
             <cfset flash.result.users = [the result from the getUsers function]>
        <cfreturn flash.result>
    </cffunction>
    <cffunction name="getUsers" access="remote" returntype="query">
            <cfquery name="q" datasource="#datasource#">
                select     c.*
                from    USERS as c    WHERE looksLikeUserIsDeleted = 'False'
                AND userPrivileges = 1
                ORDER BY fullName
            </cfquery>
            <cfset flash.result = q>
            <cfreturn flash.result>
    </cffunction>

    Hi, Nikos,
    If the CFCs are in the same directory, you could do the following:
    CFCA
    <cfcomponent>
    <cffunction name="getApplicationConstants" access="remote" returntype="struct">
        <cfset flash.result.users = cfcB.getUsers() />
        <cfreturn flash.result>
    </cffunction>
    </cfcomponent> 
    CFCB
    <cfcomponent>
    <cffunction name="getUsers" access="remote" returntype="query">   
            <cfquery name="q" datasource="#datasource#">
                select     c.*
                from    USERS as c    WHERE looksLikeUserIsDeleted = 'False'
                AND userPrivileges = 1
                ORDER BY fullName       
            </cfquery>
            <cfset flash.result = q>
            <cfreturn flash.result>
    </cffunction>
    <cfcomponent>
    If the CFCs were in different directories, the cfset expression in CFCA would be this:
    <cfset flash.result.users = path.to.cfc.cfcB.getUsers() />
    Where I have path.to.cfc, you would use either a mapping from CF Admin or the hierarchy of folders to the CFC from the web root.
    Does that help?

  • Calling one function in another function

    Hi,
    How to call one function in another function?
    regards,
    Kishore.

    example:
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    function bob(x number) return number is
      3    begin
      4      return x*x;
      5    end;
      6    function fred(x number) return number is
      7    begin
      8      return x+bob(x);
      9    end;
    10  begin
    11    dbms_output.put_line('Value: '||to_char(fred(5),'fm9999'));
    12* end;
    SQL> /
    Value: 30
    PL/SQL procedure successfully completed.
    SQL>

  • Calling an OA Function from another function

    Hi,
    I need to create a link in a function that calls another function.
    I've created a new Item 'Static Styled Text' writing in the destination URL 'OA.jsp?OAFunc=FUNCTION_NAME&pPersonID=&pFromMenu=Y'.
    I am able to connect to the Function but the person_id parameter passed is not the right one.
    To be clear I'll write down an example. I am a super user and in FUNCTION A I query an employee and enter in the function. Subsequently I click on the link I've created to view this employees information in FUNCTION B. Instead it queries my information, passing my person_id.
    Can someone help?
    thanks

    You would need to get hold of the person id of the employee you queried, this may be a VO attribute
    Once you get the person Id, you would need to set the URLs parameter value to this value.
    so the URL when you are in the next pahe would look like
    http://<server:port>/../OA.jsp?OAFunc=FUNCTION_NAME&pPersonID=<the value you passed>&pFromMenu=Y
    Thanks
    Tapash

  • SD & FI BI functional Questions

    Hi Experts,
    I need to ask some questions to customer on SD & FI functional related questions for BI Analytical reports..
    Already cutomer implemented Data ware house Informatica with congnos reporting tool.
    right now they want to implement BI.
    please any one can share on what type functional questions could ask the customer.
    Advance Thanks,
    Bala.

    Hi,
    A few more pointers.
    Start with Reports. What the client is using. What he is expecting.
    If he got existing reports map the fields with Business Content BW Fields. Go to Business content and make a list of queries which are delivered from SAP. Explain them the KPI's. This should be good to start with. Also check the Tcodes they use.
    Look for DataSources that get data from theses Tcode's.
    Project Preparation (Initial stuff -- Do a conceptual review after this phase requirements gathering)
    Collect requirement thru interviews with Business teams /Core users / Information Leaders.
    Study & analyze KPI's (key figures) of Business process.
    Identify the measurement criteria's (Characteristics).
    Understand the Drill down requirements if any.
    Understand the Business process data flow if any.
    Identify the needs for data staging layers in BW – (i. e need for ODS if any)
    Understand the system landscape.
    Prepare Final Requirements Documents in the form of Functional Specifications containing:
    Report Owners, Data flow, KPI's, measurement criteria's, Report format along with drilldown requirements.
    Hope this helps.
    Thanks,
    JituK

  • How do i call a Function from another Function ?

    When i press a button, i want a series of functions to execute one after another (they contain tweens, but its irrelevant), each of them waiting for the previous to be completed. I want to put the series of functions inside one function, so i can call just this function to execute all the others. The animations are working fine, but i dont know how call Functions from within another function. Also it would be necessary each function to wait until the previous has completed, to execute. Here is a clear example of what i need to do:
    boton.onPress = animate ;
    Function animate () {
         animation1 (onComplete: animation2);
         animation2 (onComplete: animation3);
         animation3 ;
    Function animation1 () { Tween 1};
    Function animation2 () { Tween 2};
    Function animation3 () { Tween 3};
    any suggestions ?

    I'd do something like this:
    boton.onPress = animation1 ;
    Function animation1 () {
         var Tween1 = new Tween();
        Tween1.onComplete =  animation2;
    Function animation2 () {
         var Tween2 = new Tween();
         Tween2.onComplete = animation3;
    Function animation3 () {
         var Tween3 = new Tween();

  • Can a function module call another function module

    Can a function module call another function module:-
      within the same function group
    (ii)  within different function  groups

    Hi,
    We can call function from another function. If there is a function which is like a calculator and all the operations are from different functions then we have to call the functions from the calculator function for different functions.
    If all the function are from same function group, Then the data is globally available to all the functions with in the group.
    Otherwise we have to declare the data definitions for each of the functions if they are in different function groups.  
    Yes it is possible to call a function module from another function module:-
    within the same function group
    (ii) within different function groups
    Reward.

  • Function Invoking Another Function

    Trying to invoke 1 function from another function, using same parameters for each.
    Trying to invoke 1 function from another function. MasterFunction has parameterX which is a dictionary Name. When attempting to call ChildFunction from within MasterFunction, and passing it the same parameter that MasterFunction has, got javascript error 'Invalid Object'.
    Here is basic scenario:
    MasterFunction(dictionaryName)
    ChildFunction(dictionaryName);
    Both of these functions are in the JavaScript function list.
    Any help on this would be appreciated.

    You need to pass the dictionary object, not the dictionary name.  So you would pass in a parameter of "serviceForm.DictName", which is the dictionary object.  Then, if your parameter name was "objDict", you would call methods against it, for example: "objDict.setVisible(false);" and "objDict.FieldName.getValue();"
    If, for some reason, you do need or want to pass a string of the dictionary name, you need to use the "eval" method to get the dictionary object back: eval("serviceForm." + dictString + ".FieldName.getValue()");

Maybe you are looking for

  • What are the field names for below mentioned

    Hello Friends What are the fields names for below tables in EKKO Purchase Document Date Net Value of the purchase document. In EKPO Item Description From which place We bought it. (It means in Sales Items there we can know from which plant we sold th

  • Inbox messages won't appear on Mail

    My ymail account won't sync to my Mail. I'm on OS X. I'm not too sure what happened. All my other accounts like hotmail and another yahoo mail are synced and I can access my messages. I tried deleting the account but it's still the same.

  • Can I add a point cloud to a 3D PDF?

    I created a 3D model based off of a point cloud and I want to include the point cloud in the PDF. I already exported the Revit model into the PDF. Thanks.

  • Auto-fill Existing PDF files?

    I have been given some standard shipping forms in an editable PDF format. Instead of spending 200 hours recreating reports in Report Builder that are the exact same thing, I was hoping Oracle Reports (or Forms) could just "send" the data to the PDFs

  • Satellite Pro L40 (PSL43E) Wi-Fi intermittant

    Well I am fed up with this laptop and its intermittent Wi-Fi connection. You just dont know from powering up if it wants to work or not, and when it doesnt, it can be an absolute nightmare getting it to detect the router. The adaptor properties alway