Problem In Query PLD
Hi All
We have problem while generating the query pld in SAP B1 2005 PL 34. We have given query for Goods Receipt PO with batch/serial no details. The details of batch no and serial no is working properly. When we execute the query if query pld comes to second page it is not displaying the details of GRN PO no, date, etc...
Our customer require GRN PO details in the suceessive pages. How to achieve this?
Thanks in Advance
hi Consultant,
Where did you put the GRN PO No, Date and Details?
Did you Use of Group by method in Repetetive Area (or) Repetetive Area Footer?
Do you want GRN PO No., Date and Other GRN Details in Header Level?
Try this,
1. Select GRN No. in Row Level and Copy (GRN No.) Field ID on Properties Area Window.
2. Create 1 Formula Field in Page Header and Put GRN No. Field ID.
Regards,
Madhan.
Edited by: Madhan Babu C on Aug 3, 2009 1:36 PM
Similar Messages
-
Hi All
Iam designing a PLD for Query Report
*In the PLD iam designing the Report for Open Purchase Order Status Report Query run fine but the problem came under designing the Document.My Query as above.
My Client have requirement not repeat the PO No, PO Date,Due Date and Vendor Name that's row level record not repeated.(Under that row level record repeat (For Eg : Item Code,Item Description,Order Qty,PO Amount etc) But it is possible from me in Query PLD.
SELECT
T1.DocNum,T1.CardName as "Vendor Name",t0.[Itemcode],t0.[dscription],T0.[Project] as "Project Name",
T1.[DocDate] as "PO Date",
T0.[ShipDate] as "Due Date",
Sum(T0.[Quantity]) as "Order Qty",
Sum(T0.[LineTotal]) as "PO Amount",
Sum(T0.[OpenQty]) as "Pending Qty",
Sum(((T0.[OpenQty]) * (T0.[Price]))) as "Pending Amount"
FROM
[dbo].[POR1] T0 INNER JOIN [dbo].[OPOR] T1 ON T0.DocEntry = T1.DocEntry left join OPDN T2 ON T2.DocEntry = T0.TrgetEntry
WHERE
T1.[DocDate] >=[%0] and T1.[DocDate] <= [%1] and t1.[Docstatus] = 'O' and t0.[linestatus] = 'O'
Group By
t0.[Itemcode],t0.[dscription],T1.[CardName], T1.[DocNum], T1.[DocDate], T0.[ShipDate],
T0.[Project], T2.[DocDate]
order by
T1.DocDate
Regards
AmolHi Amol,
Note: All SELECT statement fields will be Stored and Display in Repetetive Area1. and
Parameter Fields are in Repetetive Area0 so you can Try to Copy & Paste the Field_ID's to Repetetive Area Header (or) Repetetive Area Footer.
for example.
Try this,
->> Open the QPLD and Goto Field index Window, then
->> Select the Repetetive Area Header & Repetetive Area Footer increase the Height on Properties Window.
->> Create the Formula fields in Repetetive Area Header & Repetetive Area Footer.
->> Which Field you want to print in header or footer. Drag the Field ID(in Repetetive Area) Copy & Paste to Formula Field.
->> Select the Repetetive Area 1 on Field Index Window.
->> Goto the Print Layout Designer on Tool bar.
->> Click Repetetive Area. -> Sort...
->> Open the Sort Widnow and Select the Requrie fields by sort.
ELSE Try this,
->> Click the Repetetive Area Footer 1.
->> then, Right Click in Repetetive Area Footer 1.
->> Choose the GROUP -> 1. then,
->> Create the Formula Fields in Repetetive Area Footer 1 and copy paste field ID's from Repetetive Area 1.
->> Select the Repetetive Area 1 on Field Index Window.
->> Goto the Print Layout Designer on Tool bar.
->> Click Repetetive Area. -> Sort...
->> Open the Sort Widnow and Select the Requrie fields by sort.
Ex.
->> Select Field Name, Sort by, Order, Summary, New Page.
->Select Field Name (Sort by) -> DocNo or CardCode,
Sort Type - Alpha.
Order -> Descending (or) Ascending.
Summary -> Select the Tick Mark.
New Page -> UnCheck the Tick Mark because if you need the second page Print of GROUP BY.
You can select the Tick Mark in New Page.
SAVE IT and see the Print Preview. it will be get exact Print. .
Check the below thread, You will be get some idea or solution.
Re: Two Repetitive areas in one PLD
Regards,
Madhan. -
Hi All,
I have designed query pld for a screen in which i have few user defined fields also.
When i excute a query pld with values in user defined field it is not giving any out put. Same query with out user defined field values is working problem.
Can some one help on this.Please post your query here so that we get an idea of what you are referring to?
One think to understand about QPLD's..is
If you have a Query in which you select 4 fields and then create a PLD for the same..after this if you add fields to the query they will not reflect in your PLD.
This is because the query is stored in a table and PLD is linked to it. Therefore in such cases you will need to delete the original QPLD and create a new one -
Distinct count of GRN's in Query PLD
hi all,
We have developed a daily grn report and designed report
using Query PLD.
Report contains
(grn no,date,vendor name,vendor ref no,item code,item
description,quanity & line total)
We want to display no of grn's(distinct count)
@ repetitive area footer.
Is there any function available in formula field to display
distinct count of no. of grn's ? / It should done thru query.
Thanks,
with regards,
A.Jeyakanthanit will be hard from PLD, instead u can have ur query like,
SELECT 'Details', ' ',T0.Docnum, T0.CardName, .... FROM OPDN T0 WHERE Month( T0.DocDate ) = Month ('{%0]')
Union
SELECT 'Counts', count(T0.DocNum) as 'Doc(s) No', ' ', ' ', ... FROM OPDN T0 WHERE Month( T0.DocDate ) = Month ('{%0]')
(Replace { with [ )
Note ' ' is a gap in order to fill the other fields. in first query have given tht ' ' gap purposely so tht the display will not affect ur designing part
union is used b'coz Count() fn is like aggregate, so wont allow further individual fields coming along with it.
the 2nd query will occupy only one row, which by grouping u can separate and can hide from repetitive and take the value via formula field by writing that field's id to it into Footer Area.
Regards,
Dhana.
Edited by: Dhanalakshmi C on Mar 5, 2008 1:31 PM -
Problem loading Query Designer Add-in
Hi All,
Can anyone please help me on my below issue.
Whenever user is trying to start a new query in Essbase , he is getting below error message. It will not allow user to build a fresh Essbase pull
Problem loading Query Designer Add-in. Workbook Activate,open & close operations may not be fully propogated
Thanks in advance.
Regards
VishalHi Vishal,
1) Try to remove the addin and then add again.(Before doing this close all the excel process from the task Manager)
2) Check weather essexcln.xll and essxleqd.xla are corrupted. -
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; -
Getting default value in query PLD
Hi Experts,
I have made a query PLD.When I preview the pld,I shows me someother value.
For eg
If I want to see preview of vendor let say V0007 but in preview I can see only for V002.V002 is default in pld.If I use any vendor code instead of v0007,it give preview of v0002 only.
So pls help me out in this regard.
Thanks,
Saurabh JainHi
From what I understand, my suggestion would be to create a Customer Exit variable to read from the table RSECVAL for i_step = 1. U can get the user from system variable -.sy-uname.
Could u also check the below document on Dynamic Authorization?
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f0f9f33c-0f17-2d10-d3a2-ae52ccd00780
Regards,
Aparna -
hello experts,
I dont know how to create normal pld and query pld . Anyone tell me step by step procedure of normal pld and query pldHi Perinba
for query pld you need to create your query and save it and select query manager -->select your query then click on the create report button on the bottom right. A create user report window will appear, click on the base template (User Report (System)) then click ok.
To modify the report double click the report name that you just created and that will give you your designer view.
For Normal pld select the document you want like marketing documents , e.g. PO then select pen icon next to the form settings icon , select the report and click edit report button.
you can also check this link
https://websmp209.sap-ag.de/smb/sbo/pld
Bongani Dlamini -
Hello Experts,
I have done a query pld in which item code , description, is repeating. How to restrict this?
My Current out put is
Itemcode Item Desc Qty Rate Batch No. Batch Qty
001 ABC 10 15000 01 05
001 ABC 10 15000 02 03
001 ABC 10 15000 03 02
My desired out put should be
Itemcode Item Desc Qty Rate Batch No. Batch Qty
001 ABC 10 15000 01 05
02 03
03 02Hi Consultant
For this no need to Create Crystal Report, It can be possible through Group by and Sort by in PLD.
For Using Sort By
Click on the repetative area in field index
Go to Printlayout designer on menu bar - repetative area - sort
It will open another window sort
1.In the field name give item no. and second Item Name
2.sort type alpha numeric
3.Check summary and uncheck new page
All the items with item code 001 will come in series.
Now we have to use group by
For Using Group By
Place Two formula fields in repetative area Above
001 ABC 10 15000 01 05
Put SortValue() for first
and also Sort Value for Second also.
Select two fields then go to Print Layout designer group. Select group 1 over there
Then the out put will be as
001 ABC
001 ABC 10 15000 01 05
001 ABC 10 15000 02 03
001 ABC 10 15000 03 02
Hide the field ItemCode and Name.
We can have
001 ABC
10 15000 01 05
10 15000 02 03
10 15000 03 02
Thanks & Regards
Siva Reddy -
Problem in query with the u0091Document numberu0092
Hi,
I got problem in query with the Document number
There are three columns in the cube 1) Document number 2) Country 3) Count
In the cube there are multiple entries for same document number as below.
Document number country Count
10000 US 1
10001 US 1
10002 US 1
10002 US 1
10002 US 1
10003 UK 1
10004 IN 1
10004 IN 1
When I ran the query on this cube for country US it shows count as 5 but I want count as 3 (i.e. it has to take count only once for the same document nos)
Similarly for country IN I want count as 1Hi,
You have to create a counter based on the document number (exception aggregation). There is a How-to paper available for this. It is called: How-to...count the occurences of a characteristic.
Regards,
P. -
hi
i m having problem in query please help me
here data is not coming
SELECT HBKID FROM PAYR INTO CORRESPONDING FIELDS OF TABLE INT_PAYR WHERE
ZBUKR = P_BUKRS
AND UBHKT IN (P_OHKONT).
loop at int_payr.
OUT_HBKID = int_payr-W_hbkid .
MODIFY INT_PAYR.
endloop.
give me advice.
thanks .This example will help you ...
data: begin of i_mara occurs 0,
matnr like mara-matnr,
maktx like makt-maktx,
end of i_mara.
data: wa_maktx type maktx.
select matnr into table i_mara from mara where matnr =
'000000000000000001'.
select maktx into wa_maktx from makt
for all entries in i_mara where matnr = i_mara-matnr.
endselect.
loop at i_mara.
i_mara-maktx = wa_maktx.
modify i_mara transporting maktx .
endloop.
Regards,
Jayant
Please award if helpful -
Qyery problem in query generator
Hi friends,
I have one problem regarding query generator.
I want to take the field value from the active form for query generator. I got in the demo that u have to use $[table.field]. But still I got the error.
Query which I tried.
SELECT 'TRUE' FROM OCRD T0 WHERE $[OCRD.CardCode] = '[%0]'
any one who take the value from active form as a parameter and pass to the query in the query generator please send my the sample query.
Thanks in advance.hi,
Thanks for your reply.
When I try to execute the first query from the query generator I got the error.
Error :-
Incorrect syntax near $4.0.0
statement 'Received Alerts' could not be prepared.
When I try to execute the second query from the query generator I got the error.
Error :-
Incorrect syntax near 'Ocrd.cardcode'
Statement 'Search function (CSHS)' could not bne prepared.
What would be the reason.
Please help me in solving this problem. -
Problem when querying OLAP for Value based hierarchy
Hi I have problem when querying OLAP for value based hierarchy , for level based dimension it work fine
the strange part is if I only put one value, it will work perfectly
for example if I put only 1 value for that value base hierarchy like CF_HIER::426362, then it will get the correct value for that id 426362
but if I put multiple value to the list
CF_HIER::426362
CF_HIER::424470
CF_HIER::429073
CF_HIER::424230
then only some value will come out correctly, some of them will be 0, I wonder why because if I query using each value, then it show correct value
for multiple value usually only the top in hirarchy give correct value, but the leaf will give 0, but if I query only the leaf, the leaf will give correct value
this problem only happen for my value based hierarchy, for the level based hierarchy it work fine both for each value or multiple value in the list
this is the code how I guery
////the "elementIdList" is where the value is (CF_HIER::426362,CF_HIER::424470,CF_HIER::429073,CF_HIER::424230), if I only put single value in this list the query work fine, but if I put multiple value then some value give correct result, some will give 0
String[] elementIdArr = new String[elementIdList.size()];
int i = 0;
for (Long elementId: elementIdList) {
String elementIdStr ="";
if (hierarchy instanceof MdmLevelHierarchy)
elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
level.getName()+dimension.getValueSeparationString()+
level.getName()+"_"+elementId;
else
elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
elementId;
elementIdArr[i++] = elementIdStr;
Source myList = dp.createListSource(elementIdArr);
result = hierarchy.getSource().selectValues(myList);
Source joinedSource = measure.getSource();
joinedSource = joinedSource.join(result );
is there any suggestion where I'm doing wrong?or is it different between querying value based hier with level based hier?
thanksHi I have problem when querying OLAP for value based hierarchy , for level based dimension it work fine
the strange part is if I only put one value, it will work perfectly
for example if I put only 1 value for that value base hierarchy like CF_HIER::426362, then it will get the correct value for that id 426362
but if I put multiple value to the list
CF_HIER::426362
CF_HIER::424470
CF_HIER::429073
CF_HIER::424230
then only some value will come out correctly, some of them will be 0, I wonder why because if I query using each value, then it show correct value
for multiple value usually only the top in hirarchy give correct value, but the leaf will give 0, but if I query only the leaf, the leaf will give correct value
this problem only happen for my value based hierarchy, for the level based hierarchy it work fine both for each value or multiple value in the list
this is the code how I guery
////the "elementIdList" is where the value is (CF_HIER::426362,CF_HIER::424470,CF_HIER::429073,CF_HIER::424230), if I only put single value in this list the query work fine, but if I put multiple value then some value give correct result, some will give 0
String[] elementIdArr = new String[elementIdList.size()];
int i = 0;
for (Long elementId: elementIdList) {
String elementIdStr ="";
if (hierarchy instanceof MdmLevelHierarchy)
elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
level.getName()+dimension.getValueSeparationString()+
level.getName()+"_"+elementId;
else
elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
elementId;
elementIdArr[i++] = elementIdStr;
Source myList = dp.createListSource(elementIdArr);
result = hierarchy.getSource().selectValues(myList);
Source joinedSource = measure.getSource();
joinedSource = joinedSource.join(result );
is there any suggestion where I'm doing wrong?or is it different between querying value based hier with level based hier?
thanks -
Problems about query filter (BEx).
Hello there,
I have some problems about query filter (BEx).
I have master data and I want to use attribute in this master data to dynamic filter in query(BEx).
But this attribute is key figure. I can't done it now. TT
Is this possible? If yes, could anyone advise how this is to be done?
Thanks in advance.Hi
In BEx there is option as 'Exceptions' & 'Conditions'. If you go in condition, you can specify range for key figure output. This is either predefined or by user selection. You create the condition as per your requirement & it will show you filtered data.
How to create conditions you will find easily on this site.
You can create as many conditions as no of filters you want. You can create these at query level also at report output level. -
Hi all,
I have made query on PLD below :
SELECT T0.DocNum, LTRIM(LEFT(T0.JrnlMemo,17)) AS Tipe, (T0.CardCode' - 'T0.CardName) AS Nama, T0.CashSum, T0.CheckSum, T0.TrsfrSum,(SELECT CreditSum FROM RCT3
WHERE RCT3.DocNum=T0.DocNum AND RCT3.CreditCard=4) AS Debit,(SELECT CreditSum FROM RCT3
WHERE RCT3.DocNum=T0.DocNum AND NOT(RCT3.CreditCard=4)) AS Kredit,(SELECT SUM(CashSum) FROM ORCT T1 WHERE T1.Canceled='Y' AND T1.DocNum=T0.DocNum) As R_Cash,(SELECT SUM(TrsfrSum) FROM ORCT T1 WHERE T1.Canceled='Y' AND T1.DocNum=T0.DocNum) As R_Trans,(SELECT SUM(CreditSum) FROM RCT3 WHERE RCT3.DocNum=T0.DocNum AND (T0.Canceled='Y') AND RCT3.CreditCard=4) AS R_Debit,(SELECT SUM(CreditSum) FROM RCT3
WHERE RCT3.DocNum=T0.DocNum AND (T0.Canceled='Y') AND NOT(RCT3.CreditCard=4)) AS R_Kredit,(SELECT RCT2.DocEntry FROM RCT2
WHERE RCT2.DocNum=T0.DocNum) AS No_Invoice
FROM ORCT T0
WHERE (T0.DocDate >= [%0]) AND (T0.DocDate <= [%1]) AND T0.CashAcct = [%2]
ORDER BY T0.DocNum
We tried that query in Tools --> Query print Layout and the screen msg error after that query run. The message is "Internal Error (8153) occured (message 131-183)".
Why is the message error appeared? How to solve this error? Because the query if we run on SQL enterprise manager did not problem. It can be run normally.
Please help me about this matter.
Thanks a lot,
AgungHi,
Add dbo. infront of the table name in from clause.
As shown below.
SELECT T0.DocNum, LTRIM(LEFT(T0.JrnlMemo,17)) AS Tipe, (T0.CardCode' - 'T0.CardName) AS Nama, T0.CashSum, T0.CheckSum, T0.TrsfrSum,(SELECT CreditSum FROM dbo.RCT3
WHERE RCT3.DocNum=T0.DocNum AND RCT3.CreditCard=4) AS Debit,(SELECT CreditSum FROM dbo.RCT3
WHERE RCT3.DocNum=T0.DocNum AND NOT(RCT3.CreditCard=4)) AS Kredit,(SELECT SUM(CashSum) FROM dbo.ORCT T1 WHERE T1.Canceled='Y' AND T1.DocNum=T0.DocNum) As R_Cash,(SELECT SUM(TrsfrSum) FROM dbo.ORCT T1 WHERE T1.Canceled='Y' AND T1.DocNum=T0.DocNum) As R_Trans,(SELECT SUM(CreditSum) FROM dbo.RCT3 WHERE RCT3.DocNum=T0.DocNum AND (T0.Canceled='Y') AND RCT3.CreditCard=4) AS R_Debit,(SELECT SUM(CreditSum) FROM dbo.RCT3
WHERE RCT3.DocNum=T0.DocNum AND (T0.Canceled='Y') AND NOT(RCT3.CreditCard=4)) AS R_Kredit,(SELECT RCT2.DocEntry FROM dbo.RCT2
WHERE RCT2.DocNum=T0.DocNum) AS No_Invoice
FROM dbo.ORCT T0
WHERE (T0.DocDate >= %0) AND (T0.DocDate <= %1) AND T0.CashAcct = %2
ORDER BY T0.DocNum
This clue was given by suda from the same forum and it worked for me.
Tell me whether this has worked or not for you.
Thanks
Ravi
Maybe you are looking for
-
Hi, I'm checking the MSDE of the uccx and trying to register to an external SQL But all trials fail The external SQL require an authentication, I entered the administrator user and password of the uccx windows machine but failed I don't know if it ne
-
Passing 900 character value into a Single line
Hi Experts, I have a scenario that i have to pass 900 character value to a single field. After that i need to download this internal table into an text file. What happening after some characters the values are not getting passed into my varaibale. So
-
Oracle 10g Release 2 and Ubuntu 7.10 Install
Hello: I just successfully installed Ubuntu 7.10. I need to install Oracle 10g for Ubuntu. Does anyone know where I can find documentation on a complete install of Oracle 10g onto Ubuntu 7.10? I am new to Ubuntu so the more info the better. Thank you
-
Pop=up windows in iweb 08...
i noticed that in o8 we have the option to have links open in a new window. i'm curious if anyone here knows of a way to decide the size of the window that pops up? i'd like to make some pop-up pages that are a certain size. there must be some way to
-
How to retrieve user custom attributes in OID programmatically
Hi, I created a custom attribute named "location" in OID. Could someone give indication/portion of code showing how to retrieve this custom attribute "location" of a user programmatically? For the moment, I just found sample code (using oracle.ldap.*