YTD function problem
Hi,
I got error when I try to calculate YTD sales by using "TODATE" function.
TODATE("Facts - Contract Value"."Total Value USD","Dim - Contract Date"."Fiscal Year")
[nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 27037] Unresolved level: "Dim - Contract Date"."Fiscal Year".
How can fix it? Is there another way to get YTD?
Thanks in advance!
Oh ;) those are rpd columns
in Answers pull
metric 'Total Value USD'->fx->Filter button->select 'Fiscal Year'
Add button>SQL Expression then use YEAR(CURRENT_DATE)
just in case if you get any datatype issues then
you have to do something like below
FILTER("Total Value USD" USING cast("Fiscal Year" as int) =YEAR(CURRENT_DATE))
Similar Messages
-
OBIEE 11g Time Hierarchy with YTD function problem
Hi all,
Platform: OBIEE 11.1.1.5.0.
We have a Calendar dimension (*time dimension*), that includes the usual time hierarchy (Year > Semester > Quarter> Month > Day).
Creating a Pivot Table with a YTD measure, using also the Calendar Table hierarchy, everything works fine, and we can drill up & down always getting the right YTD values.
But, if we add to this analysis, a year and month prompts (filters), we only receive true YTD values, at the day and month levels of the hierarchy. Above this, values will sum up instead of getting the right YTD aggregated value.
YTD logical column definition = TODATE(Table A.Measure B , Hieararchy.Year)
Example of pivot values returned:
*2011*=1192812 (Sum of the 3 Semester not the YTD value)
Semester 1 = 377305 (Sum of the 4 Quarter not the YTD value)
Quarter 1= 107460 (Sum of the 3 months not the YTD value)
Jan = 18507 (YTD value)
Feb = 35223 (YTD value)
Mar = 53730 (YTD value)
Is there anything that we might be doing wrong?
Thanks in advance,
RicardoRicardo,
You might be aggregatign values twice either at RPD level or at reprot level. Please check on that. -
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
rashCommon 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 -
Dear All,
I have used YTD function but it is not working properly.
I have data from 2008 till 2010. When I should give prompt as 01-Jun-2010, it should show all the data from the day when the Business starts till 01-Jun-2010. Suppose My business starts on 01-Sept-2008, it should show the data from 01-Sept-2008 till 01-Jun-2010. For this I have used a YTD Function as
TODATE(VIVA.LOYALTY_POINT_FACT."Total Point Earn(Sum All)", VIVA."Time"."Year")
But when I used to give date prompt as 01-Jun-2010, it shows the data from 01-Jan-2010 till 01-Jun-2010. But I need it should show me data from 01-Sept-2008 ( when the business starts) till 01-Jun-2010.
I have even data in my table and when I used to fire the query, i used to get desired result.
Could anyone help me out?
Regards,
JanTODATE(VIVA.LOYALTY_POINT_FACT."Total Point Earn(Sum All)", VIVA."Time"."Year")
But when I used to give date prompt as 01-Jun-2010, it shows the data from 01-Jan-2010 till 01-Jun-2010. But I need it should show me data from 01-Sept-2008 ( when the business starts) till 01-Jun-2010.That's the meaning of YTD ...
It'll give data from year starting of selected period, i.e. 01-jan of the selected date's year.
if you want o retrieve all data from your history..
you better apply filter on date using between operator..
Time.Date between BusinessStartDate and SelectedDate if you want you can keep BusinessStartDate value in one variable and can refer that in above filter -
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 lalaOh, 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 -
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 FloydOh 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?
thanksAre 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 AMwhen 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,
OsmanyHi,
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.
Maybe you are looking for
-
Design problem with the cube.
hi, i need to maintain two fields in the cube, first field hold data month wise(like M1,M2,M3) and the second field hold the data in the year to month wise. eg. M1 M2 M3 FIELD1 10 20
-
How do i transfer songs from my itunes music library to my new ipad mini?
I have numerous songs in my itunes account and now i want to transfer them to my new ipad mini. I can not figure out how to do this. Can anyone explain this process to me?
-
Error while running PL/SQL XML Parser Samples
every time try to run the PL/SQL XML Parser Sample program i get this error no file or directory, though the file and dir exists, i have the permissions setup as in readme.txt do i need to do any chnages to init.ora, pls advice Thanks, SQL> exec test
-
Issues exporting out of lightroom 4
I've recently encounterd a problem while trying to export images out of Lightroom 4. I keep getting an error messge "File canot be written." This is happening whether I'm exporting a Jpeg or a raw file. Cannot figure what has happend but it's doi
-
Field Status Group for Special G/L Indicators
Could you define different field status group for special G/L indicators? My problem is I am using two different special G/L indicators but their recon accounts are assigned with the same field status group. I used the same posting keys as well. But