Display a register in a function

Hi,
I have a PL/SQL function compiled succesfully, but it doesn't works as I wish, and I don't know why. So I tried to display a register of a table but there are errors. Here is the code:
create or replace
PACKAGE BODY "SML_ACUMULADOS" as
-- Para que el usuario actualice los stocks erróneos de una clave desde Discoverer
FUNCTION actualizar_acumulados(p_counipro in VARCHAR2,
p_cjclmapr in VARCHAR2,
p_nuprovee in VARCHAR2,
p_caextrap in NUMBER,
p_caextran in NUMBER,
p_caexexpl in NUMBER,
p_caexalma in NUMBER)
RETURN NUMBER
IS
CURSOR c_acumulados is
SELECT counipro,
cjclmapr,
nuprovee,
caextrap,
caextran,
caexexpl,
caexalma
FROM sml_movimientos_2009
WHERE COUNIPRO = p_counipro
AND CJCLMAPR = p_cjclmapr
AND NUPROVEE = p_nuprovee;
--SET VERYFY OFF
SET SERVEROUTPUT ON SIZE 20000; --error
BEGIN
OPEN c_acumulados;
FOR i in c_acumulados LOOP
IF p_caexalma IS NOT NULL AND p_caexalma != i.caexalma THEN
UPDATE sml_movimientos_2009
SET CAEXALMA = p_caexalma
WHERE COUNIPRO = p_counipro
AND CJCLMAPR = p_cjclmapr
AND NUPROVEE = p_nuprovee;
DBMS_OUTPUT_LINE(i.caexalma); --Error
RETURN 1;
ELSE RETURN 0;
END IF;
END LOOP;
RETURN p_caexalma;
CLOSE c_acumulados;
END;
END;
The error I display is:
Error(29,21): PLS-00103: Encountered the symbol "ON" when expecting one of the following: := . ( @ % ; not null range default character The symbol "; was inserted before "ON" to continue.
How can I display the caexalma value?
Thanks.

Although what you told me works, the problem it's not fixed. Because I'm trying to display the value inside the table, that is, i_caexalma, not the parameter I type in the function. That's why I typed in the code:
DBMS_OUTPUT_LINE(i.caexalma); --Error
The important code is:
IF p_caexalma IS NOT NULL AND p_caexalma != i.caexalma THEN
UPDATE sml_movimientos_2009
SET CAEXALMA = p_caexalma
WHERE COUNIPRO = p_counipro
AND CJCLMAPR = p_cjclmapr
AND NUPROVEE = p_nuprovee;
--DBMS_OUTPUT_LINE(i.caexalma);
RETURN c_acumulados.i_caexalma;
p_caexalma is the parameter of the function and it's possible to display it. But is it possible to display i.caexalma value? I want to check if this conditional is OK and the table sml_movimientos is updated. Now I know that this table is not updated and I want to know why.
Thanks.

Similar Messages

  • Register a Callback function in LabVIEW

    Is there any way to register a callback function in LabVIEW. For example:
    I have a DLL on Win2k that run a thread. This thread is doing a certain task (it is not important what it does...) I can't predict when this task will end and I need to know when the task is over. The easy way would be to poll this DLL and ask: "Is it over? Is it over?" over and over again. No! I don't want to poll. Not because it's too easy. I want this DLL to wake me up on time.
    Any idea, solutions, function that I'm not aware of, new features...
    Thanks
    Nitrof

    I think I have a much better solution for you. Here is an example program that show how to set a LabVIEW occurence in a dll. Therefore when your dll is done it can set the LabVIEW occurence, meanwhile your VI is just waiting on the occurence.
    More infomration on this is in the external code in LabVIEW manual Using External Code in LabVIEW
    NOTE:This will ONLY work in LabVIEW 7.
    Attachments:
    SetOccurDll.zip ‏165 KB

  • During APP how to display Check Register

    Dear SAP Experts,
    Need your help...
    I have a scenarion: During APP after the payemnt is done we have to do to Environmnet>Check Information>Display--> Check Register. But in FBZP for my Co Code Xyz using the payment method (A)...when i go to payment method in coutnry in Payment Method Classafication (bank Trf) is selected. Will i have to to select (check) option to display Check.
    What all configuration i will have to do so that during APP i can display check register.
    Regards

    Hi,
    In FBZP > Payment Method for country > Select Check and also give the print program for check like RFFOUS_C is used for payment method C in US.
    Then in FBZP > Payment method in company code, define the form for printing the check.
    (Hope you have already maintained the check lot in FCHI.)
    Then you should be able to see the check in the check register in F110/ FCHN for that payment method. (All the new docuemnts posted after this customization will be displayed.)
    Regards,
    SDNer

  • Display dimming buttons don't function on wireless keyboard.

    Display dimming buttons do not function on the wireless keyboard, but do function on the MacBook Pro's keyboard. That is, I cannot control brightness of the MacBook Pro's display from the wireless keyboard, but can do so with the MacBook Pro's built in keyboard. Neither of the keyboards seem to have any control over the external monitor. The wireless keyboard is a brand new Apple aluminum keyboard. How can I gain control of the wireless keyboard's brightness control buttons?

    Hello roytel:
             Welcome to HP's forum. Sorry your keyboard has become corrupted. Unfortunately there is no way to excess the keyboard. They are manufacturered preinstalled software as a set. That is Bllue Tooth Device, Mouse and Keyboard. The only solution is to replace the set. I am on my third Keyboard, Mouse and Blue Tooth Device set. Please check and compare the prices at HP's store and HP's part store. HP's parts store was cheeper when I bought my last set. I have on hand a cheep USB Keyboard as spare. This way you can continue using your computer in the mean time while your new keyboard set is being ship. Here is HP's Part Store link http://h20141.www2.hp.com/hpparts/ and here is HP's Store Wireless Keyboard sets link http://www.shopping.hp.com/en_US/home-office/-/search-SimpleOfferSearch;pgid=9ENQqrMsvdhSRpHAjtpLkm....+  You are welcome use your Sound Icon by the clock on Task Bar as the volume control or any of  your media  players untill your new keyboard arrives. frrw

  • How to display out put of a function module in BSP?

    hi friends,
    I am using a FM to get details of a pernr in screen. But it's displaying in R/3 screen instead of in BSP page.
    plz help me in this.....
    CALL FUNCTION 'HR_ESS_ADDRESSLIST_01'
      EXPORTING
        PERNR                 = w_pernr
        NAME                  = w_ename
        ACCOUNTEDTO   = ACCOUNTEDTO1
        PAYROLLAREA   = pa
        INFOLINE            = infoline1
    IMPORTING
      RETURNCODE   =
       ADDRESSKEY    = addresskey1
      CHANGING
        MOLGA             = wa_molga
        ANSSA             = anssa1
    Regards,
    Shankar.

    Hi vijay,
    thanks for ur reply. But the thing is here they dont want desing again. By using this FM u will be seeing the result in a screen right.
    That screen as it is i have to display in BSP.
    Plz just check out once output of that FM in SE37.
    help me..if is there any ways...
    Regards,
    Shankar.

  • Skygo content will not display on TV when mirror function enabled

    my skygo content will not display on my TV when I stream from my iPad and have mirror function enabled. It will stream other video content. I get a message that HDMI out is not supported by the application and a black screen. I do hear the sound of the program being streamed. Can the block be overcome?

    I Believe the sky app blocks Airplay.

  • How to register PL/SQL function with Varchar2 argument in Discoverer

    Hi,
    I have registered a PL/SQL function in Discoverer Administrator 10.1.2.1. Function has two arguments with data type varchar2. In discoverer I've selected varchar as it doesn't have varchar2.
    When i use this function in report using discoverer desktop it gives an error "One of the function argument has an incorrect datatype.
    I would appreciate if somebody can help
    Regards
    BA

    Hi,
    First, do not wait to use it in order to check it.
    In the discoverer admin you can "Validate" the function on after registering it.
    there are couple of things you should know about registering the function:
    1. the "Varchar" option you selected is correct (there is no varchar2 in the admin definition).
    2. check the database function to verify that you indeed registered all its arguments and they match the names and types of the db function.
    3. during the registration, type everything in UPPER CASE.
    the other way to register the function (and you will not need to deal with the definition of it) is to search for the function in a list.
    in order to do that, on the register function screen press the "Import" button (on the bottom right side of screen).
    then search by the owner (db user / schema) that the function / package is registered.
    Tamir

  • Register PL/SQL functions

    Hi,
    I want to use the EXTRACT function in Discoverer. I went through the Help for the «Import PL/SQL function» without success....
    When I click the «Import» button, I see a HUGE list of functions, and I don't recognize which is the one I want.
    I use that EXTRACT in the same database with PL/SQL developer and it works fine, but I get a «Function EXTRACT has not been registered with the EUL» message when I try to use it in Discoverer.
    Any one knows how to «bring» the right function in the EUL ??
    Thanks.

    I was able to import a Oracle standard package function SYS_CONTEXT and view it in Discoverer Desktop/Plus.
    However when I create my own package function in a schema "xxdev" and then import via Disco Admin, I cannot view this function in Discoverer Desktop/Plus. These are the steps that I followed to implement it:
    1. create package in xxdev schema
    2. grant execute on package to noetix_sys & noetix_eul
    3. register the function in Disco Admin
    4. login to Disco Desktop/Plus and try creating a calculation field and lookup functions.
    The function is not visible. I followed the exact same steps for STANDARD.SYS_CONTEXT function and it was visible. Is something missing in my steps to do?
    Thanks in advance.

  • Display the return of a function in a field

    Hi,
    I'm new to oracle reports. I basically have written a fuction that will return a date. However i want to display this date on the report but can't see how. When i select a field on the layout editor and go to the property palette and then go to source - i look for my function but it is not there - only the database fields are.
    Does anyone know how do i go about this ?
    Thanks

    thanks to user451185. That seems to be working - can't believe i'm getting nearer to a solution in creating these ID cards. Does anyone know anything about creating bar codes on reports ?

  • Can we change the display order of member set functions like @Idescendant?

    Generally, for example, if we have dimension with member hierarchy as below:
    Parent
    Child1
    Child11
    Child2
    Child21
    then, when we use function @Idescendant(Parent) to define the row during form design, the form will display the members in the following order:
    Child11
    Child1
    Child21
    Child2
    Parent
    This is not what I want, I need the order to be the same as I defined them.
    I know I can set the members one by one to display any order as I wish, but this is not doable when I have hundreds of members.
    is there any good way to solve this problem? Any answer is appreciated.
    thanks
    tony

    Hi,
    The answer is unfortunately no, there isn't any easy way of doing it. There are ways of doing it and automating it but I can't say it is easy. The solution I found once required me to update form definition tables through a stored procedure in Planning and recycle services after every update.
    Cheers,
    Alp

  • How to register database plsql function in obiee

    Hi,
    I've a database plsql function which accepts two date arguments - StartDate and EndDate and return Integer.
    I discoverer like we've Plsql function registration tool, where we import function and pass parameter values as arguments in report- how same can be done in Oracle BI Administration tool and BI Answers?
    I tried to create logical column as
    EVALUATE('YOUR_FUNCTION(%1, %2, %3, %4)' as varchar(20),@{p_1},@{p_2},@{p_3},@{p_4})
    it is giving syntax error.
    url: How to store OBIEE presentation level variable values in DB
    Please help. It is really urgent.
    Kind Regards.

    Hi,
    I created 2 session variables p_startym and p_endym of char datatype and called in function(name: RepInitDates). It looks like:
    EVALUATE('INIT_DATES_MONID(%1, %2)' AS INTEGER , VALUEOF(NQ_SESSION."p_startym"), VALUEOF(NQ_SESSION."p_endym")).
    Now I've presentation variables StartMonth and EndMonth in bi answers report, whose value i want to pass to p_startym and p_endym. What should be the syntax of Bi answers column? Please reply.
    Thanks

  • Display list of objects via Function

    Hi Gurus,
    BANNER
    Oracle Database 10g Release 10.2.0.3.0 - 64bit Production
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for Linux: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    I do have an object type as follows
    CREATE or replace TYPE T_TABLE IS OBJECT
        Field1 varchar2(100),
        Field2 date
    CREATE TYPE T_TABLE_COLL IS TABLE OF T_TABLE;
    When I run
    SELECT T_TABLE(ename,hiredate) FROM emp where rownum<=5;
    I get following result
    SQL> SELECT T_TABLE(ename,hiredate) FROM emp where rownum<=5;
    T_TABLE(ENAME,HIREDATE)(FIELD1, FIELD2)
    T_TABLE('SMITH', '17-DEC-80')
    T_TABLE('ALLEN', '20-FEB-81')
    T_TABLE('WARD', '22-FEB-81')
    T_TABLE('JONES', '02-APR-81')
    T_TABLE('MARTIN', '28-SEP-81')
    So far so good.
    Now I have  a function which is returning above mention table of object
    CREATE OR REPLACE FUNCTION FN_MyFunction
    RETURN T_TABLE_COLL
    IS
      l_res_coll T_TABLE_COLL;
      l_index number;
    BEGIN
      l_res_coll := T_TABLE_COLL();
      FOR I IN (SELECT ename col1,hiredate  col2 FROM emp where rownum<5)
      LOOP
          l_res_coll.extend;
          l_index := l_res_coll.count; 
          l_res_coll(l_index):= T_TABLE(i.col1, i.col2);
      END LOOP;
      return l_res_coll;
    END;
    When I run query using above function, I get following results
    SQL> select *
      2    from table(FN_MyFunction());
    FIELD1                FIELD2
    SMITH                   17-DEC-80
    ALLEN                   20-FEB-81
    WARD                   22-FEB-81
    JONES                  02-APR-81
    OR
    SQL>   select
      2              FN_MyFunction() from dual;
    FN_MYFUNCTION()(FIELD1, FIELD2)
    T_TABLE_COLL(T_TABLE('SMITH', '17-DEC-80'), T_TABLE('ALLEN', '20-FEB-81'), T_TABLE('WARD', '22-FEB-81),T_TABLE('JONES', '02-APR-81))
    My problem is, I need following result using above function;-
    T_TABLE(ENAME,HIREDATE)(FIELD1, FIELD2)
    T_TABLE('SMITH', '17-DEC-80')
    T_TABLE('ALLEN', '20-FEB-81')
    T_TABLE('WARD', '22-FEB-81')
    T_TABLE('JONES', '02-APR-81')
    T_TABLE('MARTIN', '28-SEP-81')
    In short, I need table of individual objects returned by function.
    Please note, I know SQL solution is better than PL/SQL solution but I presented this example  for explanation purpose.
    I would appreciate any help.
    Thanks in advance.

    Hi,
    Not really clear what your requirement is.
    You said...
    In short, I need table of individual objects returned by function.
    The function is returning a value which is of type: table of objects. Can you not define the function to return an value of type T_TABLE?
    CREATE OR REPLACE FUNCTION FN_MyFunction (f1 varchar2, f2 varchar2)
    RETURN T_TABLE 
    IS
    BEGIN
    ---- Do what ever processing needed
       return (T_TABLE(f1, f2));
    END;
    > col col1 format A60
    > select  FN_MyFunction(last_name,hire_date) col1 from employees where rownum<=5
    COL1                                                      
    HR.T_TABLE('King','2003-06-17 00:00:00.0')                  
    HR.T_TABLE('Kochhar','2005-09-21 00:00:00.0')               
    HR.T_TABLE('De Haan','2001-01-13 00:00:00.0')               
    HR.T_TABLE('Hunold','2006-01-03 00:00:00.0')                
    HR.T_TABLE('Ernst','2007-05-21 00:00:00.0') 
    May be I am missing something from your requirement. :-(

  • Content of screen moves to right of screen and truncates, scroll bar missing. Full screen restores display but hides all other functionality. Does not happen with IE, email or Office Suite

    FF 5 screen display shifted to the right, leaving left side of screen blank. The full screen option restores the display to normal but the menu bars are no longer visible. Exiting full screen moves the screen to the right another quarter, leaving 3/4 of the screen to the left blank. This only happens with the Firefox browser. Explorer, email and all other applications (Office, i.e.) display correctly.

    Babylon Toolbar 1.1.8 installed? If so, disable it.

  • Display Issues Using Time Series Function

    I have created a time dimension (Total Time > Year > Quarter > Month) and created QTD, YTD, QTD_AGO, and YTD_AGO metrics. I join a materialized view with revenue metrics to property dimension and calendar dimension with grain of year-month.
    When I build the following report A, all data is present for 20 markets:
    A - Market (property dim) , Unit Count (property dim), QTD Revenue (fact)
    When I build the following report B, all data is present for 20 markets:
    B - Market (property dim) , Unit Count (property dim), QTD_AGO (fact)
    When I build the following report C, I am missing unit count for 3 markets of the 20 markets:
    C - Market (property dim) , Unit Count (property dim), QTD Revenue (fact), QTD_AGO (fact)
    If I remove one of the markets that properly displays from report C, all unit counts appear. If I display just the 3 markets missing unit counts, their unit counts appear.
    I have tried several redesign approaches, looked for data issues, cleared cache, waited for data to refresh, and I can’t get this to work. Would the materialized view cause any issues? ANY ideas/suggestions are MOST appreciated!
    Note – OBI 10g on Oracle database

    Hi
    If time dimension lowest granularity is month then how can you get data at day level that is Quarter to Date??
    set the fact LTS content tab at proper dim levels.
    and set the chronological ket at lowest level and other levels based on your req.
    Thanks
    Jay.

  • Registering AQ Callback function

    Can Oracle-8.1.7 which is installed on a Sun-Solaris machine send a notification to a WindowsNT callback function?
    I am using OCI for receving notifications from AQ.
    If I have Oracle and the Client application running on the same Operating system then everything works fine.
    If I run Oracle on Sun-Solaris, and the Client application on WindowsNT, then the client application is NOT able receive notifications from AQ.

    Hi,
    Kindly check below;
    AQ PL/SQL Notification: PL/SQL Callback and Email Notification (Doc ID 225749.1)
    Also let me know if there are any Q0** or J0** traces generated.
    Thanks,

Maybe you are looking for

  • Regarding Importing Text file

    Hi All, I want to import the Text file which contains the " tab" as Deliminator. I am not able to import this file as I can not put " Tab" in check box provided on Import manager screen while importing the file. Kindly advise on the same. Regards Rah

  • Ipod just won't work or connect or play HELP

    ok so apperently alot of people are having this problem and its getting really annoying because i spend more time trying to fix my iPod then actully listening to it and it seems like they are alot more trouble then they are worth but here is my probl

  • Windows 7. Task Bar

    I have my Task Bar set to Auto Hide. When I run iTunes it makes the Task Bar always visible. After iTunes is closed the Task Bar is still always visible. I can set the properties of the Task Bar to Auto Hide until I am blue in the face and it won't c

  • Use of NI6040E

    Excuse me for my perseverance and My bad english but I looking for a better solution before buy. I have now two questions. First question: How I have said before, i need generate four signal: 1) One sine- wave signal from 0 to -4 Volt, and frequency

  • When will Adobe lightroom 5 be available?

    When will Adobe Lightroom 5 be available in the APP Store?