Function problems

I am currently trying to learn AS3 after only really knowing
basic AS2. Anyways, I am working within FlashCS3 using its
integrated actionscript editor. So far I am having a problem that I
can't seem to find an answer for. I make the Document class of a
test .fla file the name of my class, and the only way I can get my
code to do anything to that .fla(draw a circle or something simple
like that) is to name the function the same as the document class.
Any other functions that I put in that file are ignored if they are
not named the same as the document class. Is there a setting I need
to change, or is this some new AS3 rule that I don't know about.
Thanks for your time. Here's my code if you are
interested...

if a class file (like MessageBox) has a "constructor"
function (which is always the same as the class name (MessageBox()
in your case), that function executes whenever the class is
instantiated.
(in a document class file, it would be very unusual to NOT
have a constructor function.)
otherwise, the only way to execute a class method (like
FilledCircle() ) is to apply the method to a class instance:
var mb:MessageBox = new MessageBox();
mb.FilledCircle();
(this only makes sense for non-document class files.)

Similar Messages

  • Has anyone had a problem with TapMedia File Manage on iPhone 5. I reported a WIFI functionality problem to the developer and asked for support. Instead they have been very unprofessional by name calling me instead of logically evaluate and troubleshoot th

    Has anyone had a problem with TapMedia File Manage installed on iPhone 5? I reported a WIFI functionality problem to the developer and asked for support. Instead the company has been very unprofessional by name calling me instead of logically evaluate and troubleshoot the problem

    Hi AKE1919,
    Welcome to the Support Communities!
    The following information should help you with this:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    http://support.apple.com/kb/HT1933?viewlocale=en_US
    Cheers,
    Judy

  • Common SAP MM Functional problems

    Fellows
    Is there anyone who can explain some common SAP MM daily functional problems. im junior consultant and want to be prepared for interviews. you may just state them in point form briefly.
    thanks
    rash

    Common Issue
    1)Vendor is not created for Purchasing Organisation XXXX.
    2)Though Vendor Master is Flag for Deletion ,Vendor is shows at the time of PO Creation.
    3)How to extend the materials for another storage location
    4)How to Create the PO for Different Currencies.
    5)While Posting The Doc . Error Occure,1) Account Determination for Entry 1000 BSV _ _ not Posssible.2)  Account Determination for Entry 1000 FRL _ _ not Posssible.
    6)Not Authorisation for Movt Type ......,Transaction Code......
    7) Account Determenation for transaction ....  Cost center ...does not maintain.
    8)While Creation of GR -Authorisation missing for Company Code 0000 Asset Class XXXX,
    9)While Removing The Stock of material by Cancelling the Goods Receipt Doc.Error occur that Stock Qty difficial by xx No.
    10)While GR Cancellation error occure that document does not contain any selected item.
    11)While Creating Service Entry Sheet Error occured that Qty entered  exceeded by Qty in PO
    12)While cancelling the matl.Doc Error occure that matl is deficit of sales ordr stock.
    13) Error-Tax code does not Exist while creating Miro
    14)TDS Amount is not Captured at Miro entry.
    15)While Miro error occure that No suitable item found for Purchase Order.
    16)User ID gets Blocked due to wrong Password entered more than 3 times.
    18)Error-Gl account does not created for Chart of account XXXX while Miro
    19)In Purchase Order Service tax is 12.24 % and at Bill service tax is 10.5 .How to adjust it and How to cancell Wrong Miro
    20)Stock Statement not matched Value still lying into Stock A/c
    Rewards if Helpful...
    Regards
    Sanjay L

  • Filter Function problems on ALV report. [Resolved]

    Hi,
    I developed an ALV report by using function as below:
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
             EXPORTING
                  I_CALLBACK_PROGRAM = G_REPID
    *            I_CALLBACK_PF_STATUS_SET = status_set
    *            I_CALLBACK_USER_COMMAND  = USER_COMMAND
                  I_STRUCTURE_NAME = 'T_BSIK'
                  IS_LAYOUT        = GS_LAYOUT
                  IT_FIELDCAT      = GT_FIELDCAT[]
             TABLES
                  T_OUTTAB    = TAB_BSIK.
    And this ALV custom report is referenced from standard function FBL5N.
    After i completed this report, i made an comparision of FBL5N and my custom report.
    When I apply the filter function, for example, on the document type, I cannot input 2 characters in the document type field under the filter function. The field length is only 1 character. Similar case results on the field document date.
    While the standard function FBL5N works very nice.
    What should i do to make the filter function of my own ALV report as the same as the standard function FBL5N do?
    Thanks in advance.
    Lala
    Message was edited by:
            Hoo lala

    Oh, i found where the problem is...
    add below 2 statements, then the question is resolved.
      LS_FIELDCAT-ref_fieldname = ****
      LS_FIELDCAT-ref_tabname = ***
    FORM FIELDCAT_INIT tables RT_FIELDCAT.
    CLEAR LS_FIELDCAT.
      LS_FIELDCAT-COL_POS   =  3.
      LS_FIELDCAT-FIELDNAME = 'BLART'.
      LS_FIELDCAT-TABNAME   = 'TAB_BSIK'.
      LS_FIELDCAT-SELTEXT_L = 'Document Type'.
      LS_FIELDCAT-ref_fieldname = 'BLART'.
      LS_FIELDCAT-ref_tabname = 'BSIK'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    endform.
    Fine now.
    Lala

  • I have the "Bookmarks and history system will not be functional" problem and not FireFox will not open at all and my whole computer freezes if I try.

    For a few weeks now, I've been getting the "Bookmarks and history system will not be functional..." message. When I clicked for more information, FireFox would freeze.
    I found a solution about a new places database, but for the past few days I can't get FireFox to open at all. Then my whole system is frozen and I have to turn it off to get it going again, thus losing a lot of unsaved data.
    How can I get FireFox back?

    A possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.com/kb/The+bookmarks+and+history+system+will+not+be+functional

  • View with columns based on function - problem with query

    Hi,
    I'm using Oracle 9i;
    I've created a view which has columns based on a table columns (multiple columns from 1 table) and funtion (multiple columns based on 1 function).
    The function takes ID as the first argument and name of the column to determine which value to return as the second one.
    Here is a sample of such function (simplified):
    FUNCTION my_function
    (in_id IN NUMBER, in_col_name IN VARCHAR2)
    RETURN VARCHAR2
    IS
    c_name VARCHAR2(100);
    c_last_name VARCHAR2(100);
    BEGIN
    SELECT T.NAME, T.LAST_NAME
    INTO c_name, c_last_name
    FROM TABLE_1 T, TABLE_2 Z
    WHERE T.PK = Z.FK
    AND Z.ID = in_id;
    IF in_col_name = 'NAME' THEN
    RETURN c_name;
    ELSIF in_col_name = 'LAST_NAME' THEN
    RETURN c_last_name;
    END IF;
    END;
    For simplicty I've restricted the number of columns.
    CREATE OR REPLACE VIEW my_view
    (ID, NAME, LAST_NAME)
    AS
    SELECT
    T.ID ID
    ,CAST(my_function(T.ID,'NAME') AS VARCHAR2(100)) NAME
    ,CAST(my_function(T.ID,'LAST_NAME') AS VARCHAR2(100)) LAST_NAME
    FROM TABLE T;
    There is no problem with query:
    SELECT * FROM my_view;
    The problem arises when I query the view (regardles of '=' or 'LIKE'):
    SELECT * FROM my_view
    WHERE name LIKE '%some_part_of_name%'
    The query returns rows for same names, for same it doesn't. If I put '=' and the whole name the query returns nothing, but when I put 'LIKE' and the first letter it returns rows in some cases.
    I've tried to debug this situation and I've discovered that the function recives ID not in the proper order and not the same amount of times - in explicit:
    for each ID in (1, 2, 3, 4, 5, 6, ... , 100) the function should be called twice for each ID and in the same order, but it does not.
    I get 1, 1, 2, 3, 3, 6, 20, 20 and so on.
    Help needed.
    Greetings.

    The problem is more complicated than the solutions provided here.
    The reason why I'm using the function is this:
    the original view was constructed using multiple union all selects and the speed was terrible. I've created the index on the base table to obtain a proper sort. For retriving all records at once the view works perfectly, but if one wants to query by columns based on function the results are suprisng - sometimes there are, some times there are none, or if you serch with "like" and only a part of string there are results, but with "=" there are no results.
    Here are real DDLs:
    View:
    CREATE OR REPLACE VIEW V_DOK_ARCH
    (ID_ZDAR, TYP, STAN, DATE_CREATED, CREATED_BY,
    DATE_MODIFIED, MODIFIED_BY, SPRA_ID_SPRA, PODM_ID_PODM, PODM_UMOW_ID_UMOW,
    NR_WFS, WFS_NR_INTER, UWAGI_OPER, FUNDUSZ, NUMER,
    DATA_PODPISANIA, RODZAJ, TYP_PRZY, TYP_UBEZ, NAZWISKO,
    IMIE, IMIE_OJCA, NAZWA_FIRMY, NAZWA_FIRMY_SKR, DANE_KLIE)
    AS
    SELECT /*+ INDEX(Z ZDAR_DATE_CREATED_DESC_I) */
    Z.ID_ZDAR ID_ZDAR
    , Z.TYP TYP
    , Z.STAN STAN
    , Z.DATE_CREATED DATE_CREATED
    , Z.CREATED_BY CREATED_BY
    , Z.DATE_MODIFIED DATE_MODIFIED
    , Z.MODIFIED_BY MODIFIED_BY
    , Z.SPRA_ID_SPRA SPRA_ID_SPRA
    , Z.PODM_ID_PODM PODM_ID_PODM
    , Z.PODM_UMOW_ID_UMOW PODM_UMOW_ID_UMOW
    , Z.NR_WFS NR_WFS
    , Z.WFS_NR_INTER WFS_NR_INTER
    , Z.UWAGI_OPER UWAGI_OPER
    , Z.FUNDUSZ FUNDUSZ
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NUMER') AS VARCHAR2(30)) NUMER
    , F_Rej_Zdar_Date(Z.ID_ZDAR, 'DATA_PODPISANIA') DATA_PODPISANIA
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'RODZAJ') AS VARCHAR2(4)) RODZAJ
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'TYP_PRZY') AS VARCHAR2(4)) TYP_PRZY
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'TYP_UBEZ') AS VARCHAR2(3)) TYP_UBEZ
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWISKO') AS VARCHAR2(30)) NAZWISKO
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE') AS VARCHAR2(30)) IMIE
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE_OJCA') AS VARCHAR2(30)) IMIE_OJCA
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY') AS VARCHAR2(300)) NAZWA_FIRMY
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY_SKR') AS VARCHAR2(100)) NAZWA_FIRMY_SKR
    , CAST(LTRIM(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWISKO')||' '||F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE')||' '||F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE_OJCA')||F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY')||DECODE(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY'),NULL,F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY_SKR'),NULL)) AS VARCHAR2(492)) DANE_KLIE
    FROM T_ZDARZENIA Z
    WHERE F_Rej_Zdar_Char(Z.ID_ZDAR, 'JEST') = 'T';
    and functions:
    CREATE OR REPLACE FUNCTION F_Rej_Zdar_Char
    (WE_ID_ZDAR IN NUMBER
    ,WE_KOLUMNA IN VARCHAR2
    RETURN VARCHAR2
    IS
    c_numer           T_PRZYSTAPIENIA.NUMER%TYPE;--VARCHAR2(30);
    c_rodzaj           T_KLIENCI.RODZAJ%TYPE;--VARCHAR2(1);
    c_typ_przy           T_PRZYSTAPIENIA.TYP_PRZY%TYPE;--VARCHAR2(1);
    c_typ_ubez           T_PRZYSTAPIENIA.TYP_UBEZ%TYPE;--VARCHAR2(3);
    c_nazwisko           T_KLIENCI.NAZWISKO%TYPE;--VARCHAR2(30);
    c_imie                T_KLIENCI.IMIE%TYPE;--VARCHAR2(30);
    c_imie_ojca      T_KLIENCI.IMIE_OJCA%TYPE;--VARCHAR2(30);
    c_nazwa_firmy      T_KLIENCI.NAZWA_FIRMY%TYPE;--VARCHAR2(300);
    c_nazwa_firmy_skr T_KLIENCI.NAZWA_FIRMY%TYPE;--VARCHAR2(100);
    c_jest                VARCHAR2(1) := 'T';
    c EXCEPTION;
    BEGIN
    --dbms_output.put_line('id zdar wykonania '||WE_ID_ZDAR);
    BEGIN
    SELECT p.NUMER, k.RODZAJ,p.TYP_PRZY,p.TYP_UBEZ,k.nazwisko, k.imie, k.imie_ojca, k.nazwa_firmy, k.nazwa_firmy_skr
    INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
    FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D1, T_PODMIOTY D2
    WHERE p.KLIE_ID_KLIE = k.ID_KLIE
    AND z.PODM_ID_PODM = D1.ID_PODM
    AND D1.KLIE_ID_KLIE = p.KLIE_ID_KLIE
    AND Z.PODM_UMOW_ID_UMOW = D2.ID_PODM
    AND D2.PRZY_ID_PRZY = P.ID_PRZY
    AND z.ID_ZDAR = WE_ID_ZDAR;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
         BEGIN
         SELECT p.NUMER, k.RODZAJ,p.TYP_PRZY,p.TYP_UBEZ,k.nazwisko, k.imie, k.imie_ojca, k.nazwa_firmy, k.nazwa_firmy_skr
         INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
         FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D
         WHERE z.PODM_UMOW_ID_UMOW IS NULL
         AND z.PODM_ID_PODM = D.ID_PODM
         AND D.KLIE_ID_KLIE = k.ID_KLIE
         AND p.KLIE_ID_KLIE = k.ID_KLIE
         AND z.ID_ZDAR = WE_ID_ZDAR;
         EXCEPTION
              WHEN NO_DATA_FOUND THEN
              BEGIN
              SELECT NULL NUMER, NULL RODZAJ,NULL TYP_PRZY,NULL TYP_UBEZ, I.nazwisko, I.imie, I.imie_ojca, I.NAZWA NAZWA_FIRMY, I.NAZWA_SKR nazwa_firmy_skr
              INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
              FROM T_ZDARZENIA z, T_INSTYTUCJE I
              WHERE Z.TYP IN ('WFS526','WFS542','WFS553','WFS609','WFS611','WYP_KS','WYP_PO','WYP_SB','DI_ZAT')
              AND z.PODM_UMOW_ID_UMOW IS NULL
              AND Z.PODM_ID_PODM = I.ID_INST
              AND z.ID_ZDAR = WE_ID_ZDAR;
              EXCEPTION
                   WHEN NO_DATA_FOUND THEN
                   BEGIN
                   SELECT p.NUMER NUMER, DECODE(a.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(a.TYP_AGENTA,'P','R',a.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,a.nazwisko, a.imie, a.imie_ojca, a.nazwa_firmy, a.nazwa_firmy_skr
                   INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                   FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                   WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                   AND z.PODM_UMOW_ID_UMOW = p.ID_AGUM
                   AND z.ID_ZDAR = WE_ID_ZDAR;
                   EXCEPTION
                        WHEN NO_DATA_FOUND THEN
                        BEGIN
                        SELECT p.NUMER NUMER, DECODE(a.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(a.TYP_AGENTA,'P','R',a.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,a.nazwisko, a.imie, a.imie_ojca, a.nazwa_firmy, a.nazwa_firmy_skr
                        INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                        FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                        WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                        AND z.PODM_ID_PODM = a.ID_AGAG
                        AND z.PODM_UMOW_ID_UMOW IS NULL
                        AND z.ID_ZDAR = WE_ID_ZDAR;
                        EXCEPTION
                             WHEN NO_DATA_FOUND THEN
                             BEGIN
                             SELECT p.NUMER_UMOWY NUMER, DECODE(p.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(p.TYP_AGENTA,'P','R',p.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,p.nazwisko, p.imie_pierwsze, p.imie_ojca, p.nazwa_firmy, p.nazwa_firmy_skr
                             INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                             FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                             WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                             AND z.PODM_UMOW_ID_UMOW = p.TECH_ID_AGUMT
                             AND z.ID_ZDAR = WE_ID_ZDAR;
                             EXCEPTION
                                  WHEN NO_DATA_FOUND THEN
                                  BEGIN
                                  SELECT p.NUMER_UMOWY NUMER, DECODE(p.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(p.TYP_AGENTA,'P','R',p.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,p.nazwisko, p.imie_pierwsze, p.imie_ojca, p.nazwa_firmy, p.nazwa_firmy_skr
                                  INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                  FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                                  WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                                  AND z.PODM_ID_PODM = a.ID_AGKAN
                                  AND z.PODM_UMOW_ID_UMOW IS NULL
                                  AND z.ID_ZDAR = WE_ID_ZDAR;
                                  EXCEPTION
                                       WHEN NO_DATA_FOUND THEN
                                       BEGIN
                                       SELECT k.NUMER_UMOWY NUMER, DECODE(k.TYP_PRZYSTAPIENIA,'P','F','P') RODZAJ,k.TYP_PRZYSTAPIENIA TYP_PRZY,'NPO' TYP_UBEZ, k.nazwisko, k.imie_pierwsze, k.imie_ojca, k.nazwa_firmy nazwa_firmy, k.nazwa_firmy_skr nazwa_firmy_skr
                                       INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                       FROM T_WE_UM_NPO_TAB k, T_ZDARZENIA z
                                       WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                       AND k.TYP_PRZYSTAPIENIA IN ('P','W')
                                       AND z.PODM_ID_PODM IS NULL
                                       AND z.PODM_UMOW_ID_UMOW IS NULL
                                       AND z.ID_ZDAR = WE_ID_ZDAR;
                                       EXCEPTION
                                            WHEN NO_DATA_FOUND THEN
                                            BEGIN
                                            SELECT k.NUMER_UMOWY NUMER, 'F' RODZAJ,'-' TYP_PRZY,'OPS' TYP_UBEZ, k.nazwisko, k.imie_pierwsze, k.imie_ojca, NULL nazwa_firmy, NULL nazwa_firmy_skr
                                            INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                            FROM T_WE_UM_OPS_TAB k,T_ZDARZENIA z
                                            WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                            AND z.PODM_ID_PODM IS NULL
                                            AND z.PODM_UMOW_ID_UMOW IS NULL
                                            AND z.ID_ZDAR = WE_ID_ZDAR;
                                            EXCEPTION
                                                 WHEN NO_DATA_FOUND THEN
                                                 BEGIN
                                                 SELECT NULL NUMER, NULL RODZAJ,NULL TYP_PRZY,NULL TYP_UBEZ, NULL nazwisko, NULL imie_pierwsze, NULL imie_ojca, NULL nazwa_firmy, NULL nazwa_firmy_skr
                                                 INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                                 FROM T_ZDARZENIA z
                                                 WHERE z.TYP NOT IN ('UM_OPS','UM_NPO','NPO_OP','UZUP_U')
                                                 AND z.PODM_ID_PODM IS NULL
                                                 AND z.PODM_UMOW_ID_UMOW IS NULL
                                                 AND z.ID_ZDAR = WE_ID_ZDAR;
                                                 EXCEPTION
                                                      WHEN NO_DATA_FOUND THEN
                                                           --dbms_output.put_line('id zdar wykonania '||WE_ID_ZDAR||' ostatni wyjatek');
                                                           NULL;
                                                 END;
                                            END;
                                       END;
                                  END;
                             END;
                        END;
                   END;
              END;
         END;
    END;
    --raise c;
    IF WE_KOLUMNA = 'NUMER' THEN
    RETURN c_numer;
    ELSIF WE_KOLUMNA = 'RODZAJ' THEN
    RETURN c_rodzaj;
    ELSIF WE_KOLUMNA = 'TYP_PRZY' THEN
    RETURN c_typ_przy;
    ELSIF WE_KOLUMNA = 'TYP_UBEZ' THEN
    RETURN c_typ_ubez;
    ELSIF WE_KOLUMNA = 'NAZWISKO' THEN
    RETURN c_nazwisko;
    ELSIF WE_KOLUMNA = 'IMIE' THEN
    RETURN c_imie;
    ELSIF WE_KOLUMNA = 'IMIE_OJCA' THEN
    RETURN c_imie_ojca;
    ELSIF WE_KOLUMNA = 'NAZWA_FIRMY' THEN
    RETURN c_nazwa_firmy;
    ELSIF WE_KOLUMNA = 'NAZWA_FIRMY_SKR' THEN
    RETURN c_nazwa_firmy_skr;
    ELSIF WE_KOLUMNA = 'JEST' THEN
    RETURN c_jest;
    END IF;
    END;
    CREATE OR REPLACE FUNCTION F_Rej_Zdar_Date
    (WE_ID_ZDAR IN NUMBER
    ,WE_KOLUMNA IN VARCHAR2
    RETURN DATE
    IS
    d_data DATE;
    BEGIN
    BEGIN
    SELECT p.DATA_PODPISANIA
    INTO d_data
    FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D1, T_PODMIOTY D2
    WHERE p.KLIE_ID_KLIE = k.ID_KLIE
    AND z.PODM_ID_PODM = D1.ID_PODM
    AND D1.KLIE_ID_KLIE = p.KLIE_ID_KLIE
    AND Z.PODM_UMOW_ID_UMOW = D2.ID_PODM
    AND D2.PRZY_ID_PRZY = P.ID_PRZY
    AND z.ID_ZDAR = WE_ID_ZDAR;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
         BEGIN
         SELECT p.DATA_PODPISANIA
         INTO d_data
         FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D
         WHERE z.PODM_UMOW_ID_UMOW IS NULL
         AND z.PODM_ID_PODM = D.ID_PODM
         AND D.KLIE_ID_KLIE = k.ID_KLIE
         AND p.KLIE_ID_KLIE = k.ID_KLIE
         AND z.ID_ZDAR = WE_ID_ZDAR;
         EXCEPTION
              WHEN NO_DATA_FOUND THEN
              BEGIN
              SELECT NULL DATA_PODPISANIA
              INTO d_data
              FROM T_ZDARZENIA z, T_INSTYTUCJE I
              WHERE Z.TYP IN ('WFS526','WFS542','WFS553','WFS609','WFS611','WYP_KS','WYP_PO','WYP_SB','DI_ZAT')
              AND z.PODM_UMOW_ID_UMOW IS NULL
              AND Z.PODM_ID_PODM = I.ID_INST
              AND z.ID_ZDAR = WE_ID_ZDAR;
              EXCEPTION
                   WHEN NO_DATA_FOUND THEN
                   BEGIN
                   SELECT p.DATA_PODPISANIA DATA_PODPISANIA
                   INTO d_data
                   FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                   WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                   AND z.PODM_UMOW_ID_UMOW = p.ID_AGUM
                   AND z.ID_ZDAR = WE_ID_ZDAR;
                   EXCEPTION
                        WHEN NO_DATA_FOUND THEN
                        BEGIN
                        SELECT p.DATA_PODPISANIA DATA_PODPISANIA
                        INTO d_data
                        FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                        WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                        AND z.PODM_ID_PODM = a.ID_AGAG
                        AND z.PODM_UMOW_ID_UMOW IS NULL
                        AND z.ID_ZDAR = WE_ID_ZDAR;
                        EXCEPTION
                             WHEN NO_DATA_FOUND THEN
                             BEGIN
                             SELECT p.DATA_PODPISU_AGENTA DATA_PODPISANIA
                             INTO d_data
                             FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                             WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                             AND z.PODM_UMOW_ID_UMOW = p.TECH_ID_AGUMT
                             AND z.ID_ZDAR = WE_ID_ZDAR;
                             EXCEPTION
                                  WHEN NO_DATA_FOUND THEN
                                  BEGIN
                                  SELECT p.DATA_PODPISU_AGENTA DATA_PODPISANIA
                                  INTO d_data
                                  FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                                  WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                                  AND z.PODM_ID_PODM = a.ID_AGKAN
                                  AND z.PODM_UMOW_ID_UMOW IS NULL
                                  AND z.ID_ZDAR = WE_ID_ZDAR;
                                  EXCEPTION
                                       WHEN NO_DATA_FOUND THEN
                                       BEGIN
                                       SELECT k.DATA_PODPISANIA_UM DATA_PODPISANIA
                                       INTO d_data
                                       FROM T_WE_UM_NPO_TAB k, T_ZDARZENIA z
                                       WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                       AND k.TYP_PRZYSTAPIENIA IN ('P','W')
                                       AND z.PODM_ID_PODM IS NULL
                                       AND z.PODM_UMOW_ID_UMOW IS NULL
                                       AND z.ID_ZDAR = WE_ID_ZDAR;
                                       EXCEPTION
                                            WHEN NO_DATA_FOUND THEN
                                            BEGIN
                                            SELECT k.DATA_PODPISANIA_UM DATA_PODPISANIA
                                            INTO d_data
                                            FROM T_WE_UM_OPS_TAB k,T_ZDARZENIA z
                                            WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                            AND z.PODM_ID_PODM IS NULL
                                            AND z.PODM_UMOW_ID_UMOW IS NULL
                                            AND z.ID_ZDAR = WE_ID_ZDAR;
                                            EXCEPTION
                                                 WHEN NO_DATA_FOUND THEN
                                                 BEGIN
                                                 SELECT NULL DATA_PODPISANIA
                                                 INTO d_data
                                                 FROM T_ZDARZENIA z
                                                 WHERE z.TYP NOT IN ('UM_OPS','UM_NPO','NPO_OP','UZUP_U')
                                                 AND z.PODM_ID_PODM IS NULL
                                                 AND z.PODM_UMOW_ID_UMOW IS NULL
                                                 AND z.ID_ZDAR = WE_ID_ZDAR;
                                                 EXCEPTION
                                                      WHEN NO_DATA_FOUND THEN
                                                           d_data := NULL;
                                                 END;
                                            END;
                                       END;
                                  END;
                             END;
                        END;
                   END;
              END;
         END;
    END;
    IF WE_KOLUMNA = 'DATA_PODPISANIA' THEN
    RETURN d_data;
    END IF;
    END;

  • Virtual function problem with SC 4.2

    Hi
    I'm using SC CC 4.2
    [CC -V
    CC: WorkShop Compilers 4.2 18 Sep 1997 C++ 4.2 patch 104631-04]
    not the latest patch, I realize.
    The following bit of code:
    ProcessParameters *ppp = &(_config.process_params_);
    ppp->save_to_file(String("abc"));
    config.processparams_.save_to_file(String("xyz"));
    does not work as I'd expect it to!
    config.processparams_ is of type ProcessParametersEnhanced,
    and the definition of this, and its base class, looks like:
    class ProcessParameters
    public:
    virtual int save_to_file(String filename);
    and
    class ProcessParametersEnhanced : public ProcessParameters
    public:
    virtual int save_to_file(String filename);
    (I've cut everything else out of the class definitions for clarity, and I've changed the names a bit as well, hopefully without typos).
    ppp->save_to_file(String("abc"));
    calls ProcessParameters::save_to_file(String)
    even though ppp points to an instance of ProcessParametersEnhanced, and the function is virtual.
    I've tried building a small test application, using the minimum class interfaces, but this works as I'd expect (it also works fine with gcc).
    I'm getting deseperate. Is there a bug in SC4.2 whereby it fails to resolve virtual functions correctly?
    TIA
    Paul Floyd

    Oh well, it was an SC4.2 bug
    Patch-ID# 104631-07
    Keywords: C++ 4.2 SC4.2
    Synopsis: SPARCompiler C++ 4.2: C++ 4.2 patch for Solaris 2.x
    Date: Jul/17/98
    4066271 C++ has a problem with a copy constructor using virtual and multiple inheritance
    It seems as though the copy ctor doesn't copy the vtbl.
    Cheers
    Paul

  • Function problem...pls help??

    HELLO
    i have a fucntion
    FUNCTION GET_ABRV (PLAYERID NUMBER, MATCHID NUMBER)
    RETURN VARCHAR2 AS
    A VARCHAR2(100);
    BEGIN
         SELECT ' run out ('||table_col_1||' / '||table_col_2||')'
         INTO A
    FROM TABLE
    where PLAYER_ID = PLAYERID
    AND MATCH_ID = MATCHID;     
    RETURN (A);
    EXCEPTION WHEN NO_DATA_FOUND THEN RETURN NULL;
    END;
    This fucntion gives me the output in the following manner
    SQL> SELECT GET_ABRV(201, 10) FROM DUAL
    GET_DISMISSAL_9_DESCRIPTION(201,10)
    run out (S John / H Peal)
    that is ok!
    but the problem is that suppose if the value of the 'table_col_1' and 'table_col_2' is null either alone or
    combined in the table for any row then I want the output of the fucntion according to that
    suppose i call my fucntion
    SQL> SELECT GET_ABRV(321, 12) FROM DUAL
    now suppose the value of table_col_1 is null and the value of table_col_2 is not null the fucntion
    should give me the output like this...
    GET_DISMISSAL_9_DESCRIPTION(201,10)
    run out (A Smith)
    i.e. no slash before the name 'A Smith'
    at present it is giving me this output...
    GET_DISMISSAL_9_DESCRIPTION(201,10)
    run out ( / A Smith)
    but i want that if either value of the 'table_col_1' or 'table_col_2' is null then the fucntion should
    return me only the name (in brackets) and not any slash
    incase if both values 'table_col_1' and 'table_col_2' are null then the function should return me the
    value like this
    GET_DISMISSAL_9_DESCRIPTION(1011,20)
    run out
    i.e no brackets and the slash since table_col_1' and 'table_col_2' were null
    I want this to be done through the fucntion i pasted above...using only two input values that I have given in my fucntion i.e. (PLAYERID NUMBER, MATCHID NUMBER)
    hope this will clear my problem...
    regrds,
    Asim.

    SQL> create table runs(col_1 varchar2(10), col_2 varchar2(10)) ;
    Table created.
    SQL> insert into runs values (NULL, NULL) ;
    1 row created.
    SQL> insert into runs values (NULL, 'H Peal') ;
    1 row created.
    SQL> insert into runs values ('S John', 'H Peal') ;
    1 row created.
    SQL> insert into runs values ('S John', NULL) ;
    1 row created.
    SQL> CREATE OR REPLACE FUNCTION GET_ABRV (p_rowid ROWID)
      2  RETURN VARCHAR2 AS
      3    A VARCHAR2(100);
      4  BEGIN
      5    SELECT ' run out ('||
      6     LTRIM(RTRIM(col_1 || '/' || col_2, '/'), '/')||
      7     ')'
      8    INTO A
      9    FROM runs
    10    where ROWID = p_rowid;
    11    RETURN (A);
    12  EXCEPTION
    13  WHEN NO_DATA_FOUND
    14  THEN
    15    RETURN NULL;
    16  END;
    17  /
    Function created.
    SQL> show errors
    No errors.
    SQL> select REPLACE(get_abrv(rowid), '()') from runs ;
    REPLACE(GET_ABRV(ROWID),'()')
    run out
    run out (H Peal)
    run out (S John/H Peal)
    run out (S John)
    4 rows selected.
    SQL>

  • Message Mapping Split Function Problem

    Hi All,
    Could somebody plz help me on this problem of splitting the messege:
    Source Field:
    -MATMAS
      -Idoc
         -EMARAM
           -MTART: 1,
                            2,
                            3
    Target Required:
    Based on the occurrence of  Mtart, the target Idoc should be generated:
    -MATMAS
      -Idoc
         -EMARAM
           -MTART: 1
    -MATMAS
      -Idoc
         -EMARAM
           -MTART: 2
    -MATMAS
      -Idoc
         -EMARAM
           -MTART: 3.
    Should I use a User-def function for the same or a split by value is sufficient.
    I want to generate several idocs in my target if there are several Emaram segments in a single file in the source...!
    Thanks & Regards,

    Hi,
    You cannot use Multi Mapping as you have the Idoc adapter on the inbound side. There is a work around though.
    Use SAP note :  814393  and change the occurence of your IDOC from 1..1 to 0 to unbounded.
    Your mapping requirement is notvery clear though. Can you give some more detail?
    Regards,
    Bhavesh

  • Document() function problem in Cocoon

    Hi,
    I have a problem using document() function in xslt. Transformation is done via Cocoon. I know that document() function is problematic in Cocoon, but I think still it is possible to use document() in Cocoon or?
    Here is the simple code:I am getting Java NullPointerException.
    <xsl:variable name="myfile"
    select="document('file:///c:/Temp/temp.xml')" />
    <xsl:value-of select="$myfile/document/doc/@id" />
    If document() function is not possible in Cocoon, can anyone suggest me another way?
    thanks

    Are you sure that you can access a local file?

  • Substr function problem in oracle

    my requirement is that i am writing the stored procedure in which use
    *substr( source_string, start_position, [ length ] )*
    my 1 requirement
    i have i problem that the source_string is dynamically being passed as a parameter into the stored procedure
    means its length can vary
    and start_position is dynamically being passed as a parameter into the stored procedure should be that is should start from start of the sting and it can also vary
    my 2 requirement
    as in SQL Server we have left and Right function
    if we use left like this
    this is code from SQL Server
    note: in SQL Server left function Returns the left part of a character string with the specified number of characters.
    *@FinalCode = left(@TempCode,Len(@TempCode)-1)*
    *@FinalCode : this user declared local variable in stored procedure*
    *@TempCode:this is the dynamic string i am passing in stored procedure*
    when we use left it starts the reading string from left side
    note: in SQL Server right function Returns the right part of a character string with the specified number of characters.
    Set @FinalCode = Right(@FinalCode,len(@FinalCode)-1)
    when we use Right it starts the reading string from Right side
    my requirement is how to do this oracle as i am new to oracle 10g with the use of
    *substr( source_string, start_position, [ length ] )*
    Edited by: user21354 on Feb 8, 2011 4:06 AM

    when we use Right it starts the reading string from Right sideStart from left:
    SQL> select substr('abc', 1, 1) from dual;
    S
    aStart from right:
    SQL> select substr('abc', -1, 1) from dual;
    S
    c

  • CRM_ORDER_MAINTAIN Save Function problem

    Hi
    We are trying to create Grantor applications in SAPM CRM 6.0 using Function Module CRM_ORDER_MAINTAIN.      
    From an ABAP program we are passing the parameters in order to recreate the same scenario that is used in the Standard SAP CRM Web to create this type of applications.
    When the CRM_ORDER_MAINTAIN function is called the returned code is 0 (zero), we think that is no problem. Then, the CRM_ORDER_SAVE function needs to be call passing the u201CGUID of a CRM Order Objectu201D as parameter that is generated with the last order. But in this case the returned code is 1 which means u201Cdocument_not_saveu201D.
    We also tried calling the CRM_ORDER_MAINTAIN function passing as parameters only the u201Cct_orderadm_hu201D table with the value u201CGAPu201D in the field u201Cprocess_typeu201D, and the table u201Cct_input_fieldsu201D with the value u201Corderadm_hu201D in the field u201Cobjectnameu201D; all this in order to create the u201CGUID of a CRM Order Objectu201D. And then use that GUID again in the CRM_ORDER_MAINTAIN function.
    When calling the CRM_ORDER_MAINTAIN function a DUMP is generated because of the data contained in the table CT_DOC_FLOW. This dump has the type of message u201CCRM_DOC_FLOW No. 010u201D u201CDocument flow record could not be generatedu201D. The table result is:
    4ABA4D7B372E0194E1008000AC137072 (Grantor ID in which the application will remain)
    BUS2100010 (Business Transaction Type of Grantor application)
    4AEA377815A301E6E1008000AC137072 (ID generated for the application)
    BUS2000270 (Business Transaction Type)
    If the ID is not sent, no error message is generated but also the record is not created.
    We also test the CRM_TEST_ORDER_MAINTAIN function with the standard program passing the operation type u201CGAPu201D as parameter. But the execution of the program generates a DUMP. If the function is test with another type of operation as parameter, the program executes correctly generating the corresponding records.
    If the u201CGUID of a CRM Order Objectu201D is generated calling the GUID_CREATE function, when calling the CRM_ORDER_SAVE function a DUMP is generated with type message X of class CRM_ORDER Nol 009  u201CIncorrect values in interface parametersu201D.
    Please any idea to solve it.
    Thanks in advanced,
    Osmany

    Hi,
    concerning first part of your post - "document_not_save" is usually posted if some validations were not passed by new document.
    it could be for example implementation of badi order_save.
    You should debug function module crm_order_save and look for message with reason for not saving.
    Regards
    Radek

  • TileList Add/Remove function problems for a flex beginner

    I am starting up a new project for my university course which will allow users to drag and drop icons into their own area.
    I wanted to use a TileList to provide the buttons for the users to select their area i.e. when a user clicks on a button in the TileList their area will be shown then they can drag items into it from another area that will always be shown (these items will later act as links to websites effectively making this application an interactive favourites menu but I'm nowhere near that point yet).
    The thing is I also wanted the user's to have the ability to add a new user or remove a selected user by clicking buttons to either add a new user or click a button that will delete a selected user however after searching the internet for code and using it in my application it's a little but messed up.
    The problem is I have created an array of 5 profiles (slots for each user) but I only want each slot to be added once whereas at the moment I can remove buttons easily using the remove item button when a user button is selected but if i add a few profiles then delete one and add another sometimes there will be 2 instances of the same button added. I only want ONE of each profile button from the array to be viewable in the application at any one time. It's hard for me to explain this so heres my full code for the applicattion. I'm sure it just needs slightly tweaking but if someone could edit it for me it would be greatly appreciated as I'm totally stuck:-
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:components="components.*" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#545351, #E3DFDF]">
       <mx:Script>
          <![CDATA[
             import mx.managers.*;
               private var _dragManager:DragManager;
               private var _historyManager:HistoryManager;
               private var _popupManager:PopUpManager;
               import flash.net.navigateToURL;
               import flash.net.URLRequest;
               import flash.net.URLVariables; 
               import mx.events.ListEvent; 
               import mx.controls.Button;
                import mx.collections.*;
                import mx.controls.Alert;
          ]]>
       </mx:Script>
        <mx:Script>
            <![CDATA[
                import mx.effects.easing.Elastic;
                import mx.collections.ArrayCollection;
                [Bindable]
                private var myDP:ArrayCollection = new ArrayCollection(
                private var dpArr:Array = [{label: "New Profile 1", data:1},{label: "New Profile 2", data:2}, {label: "New Profile 3", data:3},{label: "New Profile 4", data:4}, {label: "New Profile 5", data:5}];
                private function deleteItem():void {
                    // Remove item from Array Collection
                    if(myDP.length > 0){
                        var toRemove:Array = [];
                    for (var i:int = 0; i < tlist0.selectedItems.length; i++)
                        toRemove.push(tlist0.selectedItems);
                    for (i = 0; i < toRemove.length; i++)
                        myDP.removeItemAt(myDP.getItemIndex(toRemove));
                private var zcount:int = 0;
                private function addItem():void {
                    // Add item from source Array to Array Collection
                    if(myDP.length < dpArr.length){
                        myDP.addItemAt(dpArr[myDP.length],myDP.length);
                 private function tileList_itemClick(event:ListEvent):void {
                private function showAlert(event:ListEvent):void{
                  Alert.show("You clicked button #"+event.currentTarget.selectedItem.data);
            ]]>
        </mx:Script>
        <mx:Sequence id="itemsChangeEffect1">
            <mx:Blur blurYTo="12" blurXTo="12" duration="300" perElementOffset="150" filter="removeItem"/>
            <mx:Parallel>
                <mx:Move duration="750" easingFunction="{Elastic.easeOut}" perElementOffset="20"/>
                <mx:RemoveItemAction startDelay="400" filter="removeItem"/>
                <mx:AddItemAction startDelay="400" filter="addItem"/>
                <mx:Blur startDelay="410" blurXFrom="18" blurYFrom="18" blurXTo="0" blurYTo="0" duration="300" filter="addItem"/>
            </mx:Parallel>
        </mx:Sequence>
       <mx:Canvas width="1168" height="716" backgroundColor="#0219FB" horizontalCenter="0" verticalCenter="0" borderColor="#000000" borderStyle="solid" borderThickness="1" cornerRadius="20"  backgroundAlpha="0.8">
          <mx:Canvas id="UserArea" left="10" x="0" y="49" width="670" height="594" backgroundColor="#000000" cornerRadius="20" borderStyle="solid">
               <mx:TileList id="tlist0" itemClick="{showAlert(event)}" itemRenderer="mx.controls.Button" top="10" left="10" right="10"  color="#FFFFFF" height="50" width="100%" fontSize="12" fontStyle="bold" columnCount="5" rowCount="2" direction="horizontal" dataProvider="{myDP}" itemsChangeEffect="{itemsChangeEffect1}" backgroundColor="#000000" fontWeight="bold" borderStyle="none"/>
               <mx:Canvas x="63" y="129" width="200" height="200" fontSize="36" borderColor="#FFFFFF" id="Canvas1" visible="false">
                  <mx:Label x="27" y="25" text="Profile 1"/>
               </mx:Canvas>
          </mx:Canvas>
          <mx:Button label="Remove item" click="deleteItem();" color="0x323232" x="96" y="10"/>
          <mx:Button label="Add item" click="addItem();" color="0x323232" x="10" y="10"/>
       </mx:Canvas>
    </mx:Application>

    I've changed the code for the additem function to this but it only works to an extent now:-
    private function addItem():void
    // Add item from source Array to Array Collection
    if (myDP.length < dpArr.length && !myDP.contains(dpArr[myDP.length])){
         myDP.addItemAt(dpArr[myDP.length],myDP.length);
    It does only allow 1 of only the 5 profiles from the array to be added to the tilelist as I wanted but it appears that it is now impossible to add buttons anymore in certain situations.
    For example if i run the application add all the profile buttons so all profile buttons are shown in the tile list and then remove profile buttons 2 3 and 4 and then click the add item button 3 times buttons 2 3 and 4 should be added however only 3 and 4 appear after profile 5 and 2 doesn't appear no matter how many times I click 'add item'.
    What I want is for all 5 buttons from the array to be addable at any time but only one of each number should be shown. This may be to do with other code but I'm not sure.

  • Analytic function problem

    Hi,
    I have a problem using analytic function: when I execute this query
    SELECT TSIUPSITE, TSIUPCEAN , TSIUPDATE, sum(TSIUPCA) TSIUPCA, TSIUPCTVA,TSIUPP4N,TSIUPPIEC,
    sum(TSIUPQTE) TSIUPQTE,sum(TSIUPQTEP) TSIUPQTEP, TSIUPMDIU,TSIUPMDar,
    sum(TSIUPCRIU) TSIUPCRIU,sum(TSIUPCRAR) TSIUPCRAR, trunc(TSIUPDCRE) TSIUPDCRE ,trunc(TSIUPDMAJ) TSIUPDMAJ ,
    TSIUPUTIL,TSIUPTRT,TSIUPNERR,TSIUPMESS,
    TSIUPTMVT,TSIUPSMAN, TSIUPMOTIF, sum(TSIUPMHT) TSIUPMHT, 0 vtanfisc,
    TSIUPDATEVERIF,TSIUPNSEQ,TSIUPCINV ,count(*) over (partition by TSIUPSITE,TSIUPCEAN,TSIUP_TRT ) CONTA_ARTICOLO
    FROM TST_FLIISR_VTEREMART
    WHERE 1=1 --TSIUP_TRT = 1
    AND TSIUPDATE=to_date('27082012','ddmmyyyy')
    and TSIUP_NTRX =172
    AND TSIUPSITE = 10025
    AND TSIUPCEAN = '8012452018825'
    GROUP BY TSIUPSITE, TSIUPCEAN , TSIUPDATE, TSIUPCTVA,TSIUPP4N,TSIUPPIEC,
    TSIUPMDIU,TSIUPMDar, trunc(TSIUPDCRE),trunc(TSIUPDMAJ),TSIUPUTIL,TSIUPTRT,TSIUPNERR,TSIUPMESS,
    TSIUPTMVT,TSIUPSMAN, TSIUPMOTIF, 0,
    TSIUPDATEVERIF,TSIUPNSEQ,TSIUPCINV
    ORDER BY TSIUPSITE,TSIUPDATE ;
    I have the error ORA-00979: not a GROUP BY expression related to TSIUP_TRT field,infact, if I execute this one
    SELECT TSIUPSITE, TSIUPCEAN , TSIUPDATE, sum(TSIUPCA) TSIUPCA, TSIUPCTVA,TSIUPP4N,TSIUPPIEC,
    sum(TSIUPQTE) TSIUPQTE,sum(TSIUPQTEP) TSIUPQTEP, TSIUPMDIU,TSIUPMDar,
    sum(TSIUPCRIU) TSIUPCRIU,sum(TSIUPCRAR) TSIUPCRAR, trunc(TSIUPDCRE) TSIUPDCRE ,trunc(TSIUPDMAJ) TSIUPDMAJ ,
    TSIUPUTIL,TSIUPTRT,TSIUPNERR,TSIUPMESS,
    TSIUPTMVT,TSIUPSMAN, TSIUPMOTIF, sum(TSIUPMHT) TSIUPMHT, 0 vtanfisc,
    TSIUPDATEVERIF,TSIUPNSEQ,TSIUPCINV ,count(*) over (partition by TSIUPSITE,TSIUPCEAN ) CONTA_ARTICOLO
    FROM TST_FLIISR_VTEREMART
    WHERE 1=1 --TSIUP_TRT = 1
    AND TSIUPDATE=to_date('27082012','ddmmyyyy')
    and TSIUP_NTRX =172
    AND TSIUPSITE = 10025
    AND TSIUPCEAN = '8012452018825'
    GROUP BY TSIUPSITE, TSIUPCEAN , TSIUPDATE, TSIUPCTVA,TSIUPP4N,TSIUPPIEC,
    TSIUPMDIU,TSIUPMDar, trunc(TSIUPDCRE),trunc(TSIUPDMAJ),TSIUPUTIL,TSIUPTRT,TSIUPNERR,TSIUPMESS,
    TSIUPTMVT,TSIUPSMAN, TSIUPMOTIF, 0,
    TSIUPDATEVERIF,TSIUPNSEQ,TSIUPCINV
    ORDER BY TSIUPSITE,TSIUPDATE ;
    I have no problem. Now the difference between TSIUPCEAN ( or TSIUPSITE) and TSIUP_TRT is that TSIUP_TRT is not in Group By clause, but, to be honest, I don't know why I have this problem using using an analitic function.
    Thanks for help

    Hi,
    I think you are not using analytic function properly.
    Analytical functions will execute for each row. Where as Group BY will execute for groups of data.
    See below example for you reference.
    Example 1:
    -- Below query displays number of employees for each department. Since we have used analytical function for each row you are getting the number of employees based on the department id.
    SQL> SELECT e.department_id,count(*) OVER (PARTITION BY e.department_id) cnt_analytic
      2  FROM employees e
      3  WHERE e.department_id IN (10,20,30);
    DEPARTMENT_ID CNT_ANALYTIC
               10            1
               20            2
               20            2
               30            6
               30            6
               30            6
               30            6
               30            6
               30            6
    9 rows selected.
    Example 2:
    -- Since I have used GROUP BY clause I'm getting only single row for each department.
    SQL> SELECT e.department_id, count(*) cnt_group
      2  FROM employees e
      3  WHERE e.department_id IN (10,20,30)
      4  GROUP BY e.department_id;
    DEPARTMENT_ID  CNT_GROUP
               10          1
               20          2
               30          6Finally, what I'm trying to explain you is - If you use Analytical function with GROUP BY clause, the query will not give the menaing ful result set.
    See below
    SQL> SELECT e.department_id,count(*) OVER (PARTITION BY e.department_id) cnt_analytic, count(*) cnt_grp
      2  FROM employees e
      3  WHERE e.department_id IN (10,20,30)
      4  GROUP BY e.department_id;
    DEPARTMENT_ID CNT_ANALYTIC    CNT_GRP
               10            1          1
               20            1          2
               30            1          6

  • Evaluate function problem

    I have a problem with EVALUATE function in OBIEE.
    I passed two parameters. Number is numeric and Name is varchar.
    Evaluate('DWH.PKG_ITEM_FUNCTION.PS_LAW(%1,%2)', "Book"."Item"."Number", "Book"."Item"."Name" )
    I get the following error:
    [nQSError: 22027] Union of non-compatible types.
    How can I solve this?
    Many thanks in advance.

    hi stanisa,
    It is a bug in 10g,here it goes
    --> While using Evaluate function, common errors like “Union of non-compatible types. (HY000)”.
    I believe this is a bug in the Evaluate function implementation. One must cast all the arguments to the same data type before passing them as arguments.
    Courtesy :- http://oraclebizint.wordpress.com/2007/10/18/oracle-bi-ee-101332-top-10-common-errors/
    hope helps you.
    Cheers,
    KK

  • AGO function problem 10.1.3.4

    Hi,
    Anyone have any suggestions on this please???
    Still hoping for suggestions from anyone who has had similar problem with AGO function yielding strange results at certain levels of hierarchy??
    I have a facts folder with both AGO and 'regular' columns of data.
    I create a simple query with filters on period name and expense type.
    When I add 'regular' columns (default aggregate SUM) - it works okay.
    I then remove all 'regular' facts columns.
    When I add AGO based columns - it works fine.
    When I try any combination of AGO and 'regular' suddenly a lot of my data disappears.
    I have tried experimenting with report based totals off and setting the function aggregation to SUM for the AGO columns, but nothing works.
    i.e. AGO is pointing at previous period, so I have Yr, Qtr, Period in my time dimension and the AGO is linked to Period level (like a calendar month, but financial) and the AGO is -1.
    Filter is on period name - so for example "PERIOD NAME" is equal to / is in 'NOV-11'
    Any suggestions please??
    thanks,
    Robert.
    Edited by: Robert Angel on 08-Dec-2011 06:02 to clarify ago usage
    Further information; -
    I have just discovered that this strange behaviour only manifests when the 2nd segment of our five segment chart of accounts structure is present.
    I have checked the properties of this field and can see nothing strange, when compared to its (working) peers.
    Could it be a problem related to the dimension hierarchy that is associated with this chart of accounts dimension>??
    thanks for your input,
    Robert.
    Edited by: Robert Angel on 08-Dec-2011 07:30 additional detail
    Edited by: Robert Angel on 12-Dec-2011 07:33
    Edited by: Robert Angel on 19-Dec-2011 08:07

    To explain the structure first; -
    Chart of Accounts Dimension
    Trust Id
    Cost Centre
    Expense Type
    Sub Expense Type
    External Organisation
    Each level of the hierarchy is from the same phyical table 'Chart of Accounts'. The dimension references the underlying field as the Key at each level.
    Financial Periods Dimension
    Year
    Quarter
    Period
    Again all are from the same physical table, again all use the underlying field as the key at each level.
    FACTS table has; -
    Actual in Month, Budget In Month, Month Ago Actual in Month
    Working scenario ; -
    Add; -
    Cost Centre, Actual in Month, Budget In Month, Month Ago Actual in Month
    Filter on period_name = 'NOV-11'
    Cost Centre in ('801040','801041')
    results; - (works fine!)
    Cost Centre, Actual in Month, Budget In Month, Month Ago Actual in Month
    801040                 50000          65000                    55000
    801041                 15000          18000                    19000To the above scenario I can add any of the other Chart of accounts segments and it works.
    When I add Expense Type I get
    Cost Centre,   Expense Type, Actual in Month, Budget In Month, Month Ago Actual in Month
    801040                3001                    50000          65000                   55000i.e. I still get results, but less cost centres than I had when only cost centre was included.... all other things being equal??!!
    I can workaround this by pulling my concatenated version of all codes to get the full chart of account 'string' and then use substring to pull expense type only out of it, but this is less than ideal to suggest to a user community when it should work as is...
    Anyone seen anything like this before, can give me anything to investigate that might be making the difference??
    Edited by: Robert Angel on 13-Dec-2011 02:20
    Edited by: Robert Angel on 14-Dec-2011 08:28

Maybe you are looking for

  • HT204003 why does passbook not work on my iphone 4 with ios6?

    It has never changed off of the screen that tells me the features of passbook, even though i have multiple apps that are passbook compatible

  • Submit to SAP button

    Hi folks, Would like to know, how 'Submit to SAP' button working in Adobe interactive forms.how this button is synchronised with outlook(IXOS server). For example, if a travel request created, click on this button it will take us to a new mail with t

  • Elements 9 and Nikon D7100 NEF (RAW) problem

    I'm running elements 9 and have upgraded to a Nikon D7100 when I try and open a NEF (RAW) file it gives me an error message saying file type not recognised. This used to work fine with my D90, does this mean elements 9 will not support a Nikon D7100

  • Need to transfer data from one external hd to another hd

    Hi, I need to transfer movies from one external hd to another external hd - destination hd is formatted currently as NTSC, source hd is formatted currently as Mac OSx extended (journalled). I believe I need to transfer data across to different hd bef

  • My folders are locked on a shared Buffalo NAS Drive. How do I unlock them?

    I have an Imac 27" running snow leopard and Im connected to a shared Buffalo NAS drive. Some of the folders are locked. I ran a test on an empty folder and selected get info, and changed the priviledge to "Read & Write" from "Read Only" and the folde