OBIEE not selecting columns from all LTS of a Conforming Degener@teDimen$ion
Hello everyone
I have a Degener@teDimen$ion Dimension A it has 4 LTS ( Fact1, Fact1A ,Fact2 and FACT2A).--> FACTS from
Physical Layer.. FACTS in BMM are FACT_ONe and FACT_TWO.
columns in Degener@teDimen$ion Dimension A
col1 --> mapped to all 4 LTS(logical source). It is the key column.
col2 --> mapped to all 4 LTS(logical source)
col3 --> mapped to all 4 LTS(logical source)
The content Tab of the LTS for this Dimension are mapped to Detail of
Dimension Hierarchy name is DDimension A
Dimension Hierarchy name is DDimension A, Levels in it are
Total --> This has all the fact columns from FACT1 and FACT2. Basically dragged dropped from facts to
this level.
& Detail ---> It has col1,col2 and col3 and Degener@teDimen$ion Dimension A.
FACT_ONE --> Fact1, Fact1A are LTS for this fact
FACT_TWO --> Fact2 and FACT2A are LTS for this fact.
When i am doing a analysis with
Year, Degener@teDimen$ion_Dimension A_COL2 , FACT_ONE.measure1, FACT_TWO.measure1
It is basically showing the dimension value of FACT_TWO.measure1 only...
even the select statement is not having column from FACT_ONE...
Like
select x,y, col2 from fact_two full outer join select x,y from fact_one...> I just provided this
syntax just for an idea.. the this fact_one is not having that column in the select..
I referred this link
"http://www.rittmanmead.com/2010/01/oracle-bi-ee-10-1-3-4-1-modeling-degenerate-dimensions-fact-attributes/"
and others but i am not able to find the reason why it is not issuing a select...
Just to add more in the Total level of the hierarchy, if i added FACT_TWO only removed FACT_ONE measures..
it is showing only fact_one value (this time the FACT_ONE SELECT is having col2 but not FACT_TWO)...
the behaviuor is vice versa as well...
I resolved this. The Issue is, when using Degener@teDimen$ion ( this is !nner joned to FACT tables in BMM) and if any of the dimensions {other than the Degener@teDimen$ion (Let us say Dim X) } have an ()uter join to any of the fact tables, and you were doing your analysis using Degener@teDimen$ion, Dim X, Measure value you will face the following issues.
when filtering the analysis on the ()uter join dimension ( Dim X), the IN filter will not work. Reason is that the filter is getting applied to both the Dimension and FACT tables and the values that exist in Dimension Dim X but not in FACT table wont show up.
The above issue can be fixed by changing the join between the fact and Degener@teDimen$ion from inner to outer. I think this is a bug.. because it is supposed to filter the fact table after the entire outer joined result is obtained but not filter the fact table for the Dim X values and do a outer join. I think the BI should be intelligent enough.
In order to solve the filtering issue what i did was mentioned in my Initial post. I think if we have the measures at the Totals level of dimension, it is picking the Degener@teDimen$ion,from the table that has less number of rows or the query from one of the two facts that gets submitted to database.. I couldn't find the relevant information in the oracle document though . . . .
Similar Messages
-
Select data from all the table names in the view
Hi,
"I have some tables with names T_SRI_MMYYYY in my database.
I created a view ,Say "Summary_View" for all the table names
with "T_SRI_%".
Now i want to select data from all the tables in the view
Summary_View.
How can i do that ? Please throw some light on the same?
Thanks and Regards
Srinivas CheboluSrinivas,
There are a couple of things that I am unsure of here.
Firstly, does your view definition say something like ...
Select ...
From "T_SRI_%"
If so, it is not valid. Oracle won't allow this.
The second thing is that your naming convention for the
tables suggests to me that each table is the same except
that they store data for different time periods. This would be
a very bad design methodology. You should have a single
table with an extra column to state what period is referred to,
although you can partition it into segments for each period if
appropriate.
Apologies if i am misinterpreting your question, but perhaps
you could post your view definition and table definitions
here. -
How to insert select columns from one internal table to another
Hi,
How to insert select columns from one internal table to another based on condition as we do from a standart table to internal table.
regards,
SriramHi,
If your question is for copying data from 1 int table to other ;
we can use
APPEND LINES OF it_1 TO it_2.
or if they have different columns then:
loop at it_1 into wa_it1.
move wa_it1-data to wa_it2-d1.
apped wa_it2 to it_2.
clear wa_it2.
endloop.
thnxz -
How can I select columns from a table EMP, using Select statement?.
Hi Friends,
How can I select columns from a table EMP?.
I want to select columns of EMP table, using select statement.
Please reply me urgently.
ShahzadSomething like this:
scott@DBA> select empno,ename,job from emp;
EMPNO ENAME JOB
7369 SMITH CLERK
7499 ALLEN SALESMAN
7521 WARD SALESMAN
7566 JONES MANAGER
7654 MARTIN SALESMAN
7698 BLAKE MANAGER
7782 CLARK MANAGER
7788 SCOTT ANALYST
7839 KING PRESIDENT
7844 TURNER SALESMAN
7876 ADAMS CLERK
7900 JAMES CLERK
7902 FORD ANALYST
7934 MILLER CLERK
14 rows selected.Check the documentation:
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#sthref9697
Message was edited by:
Delfino Nunez -
How can I unsync email so deleting from one device will not remove it from all devices?
How do I unsync email so deleting from one device will not remove it from all devices?
Sounds like you have an IMAP/Exchange mail account (vice a POP3 account). By design, an IMPA/Exchange account synchronized your mail boxes among different devices. That behavior can't be changed.
-
Select columns from table for display in alvgrid.
Hi all,
i have the following:
i do select a tablename and pass it as a parameter. then this table is loaded into an internal table and displayed in an alv-grid.
what i now want to do is a step between the both:
after the internal table with its structure is loaded, i want to display the field columns and i want them to be selectable so that in the next step the alv - grid is selected only with the selected columns ( just now it allways runs with all columns - even the not needed ).
Any ideas for that would be appreciated. Is there some tutorial on that or some sample ?hi
chk this sample code:
*REPORT zdemo_alvgrid .
TABLES: ekko.
type-pools: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid,
gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform build_events.
perform build_print_params.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
form build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but can
also allow you more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such as
total. You may need to provide more information than if you were
simply displaying the result
I.e. Field type may be required in-order for
the 'TOTAL' function to work.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-datatype = 'CURR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
gd_layout-totals_only = 'X'.
gd_layout-f2code = 'DISP'. "Sets fcode for when double
"click(press f2)
gd_layout-zebra = 'X'.
gd_layout-group_change_edit = 'X'.
gd_layout-header_text = 'helllllo'.
endform. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
is_variant = z_template
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
from ekpo
into table it_ekko.
endform. " DATA_RETRIEVAL
Form TOP-OF-PAGE *
ALV Report Header *
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
endform.
FORM USER_COMMAND *
--> R_UCOMM *
--> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Check function code
CASE r_ucomm.
WHEN '&IC1'.
Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'EBELN'.
Read data table, using index of row user clicked on
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM.
*& Form BUILD_EVENTS
Build events table
form build_events.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gt_events[].
read table gt_events with key name = slis_ev_end_of_page
into ls_event.
if sy-subrc = 0.
move 'END_OF_PAGE' to ls_event-form.
append ls_event to gt_events.
endif.
read table gt_events with key name = slis_ev_end_of_list
into ls_event.
if sy-subrc = 0.
move 'END_OF_LIST' to ls_event-form.
append ls_event to gt_events.
endif.
endform. " BUILD_EVENTS
*& Form BUILD_PRINT_PARAMS
Setup print parameters
form build_print_params.
gd_prntparams-reserve_lines = '3'. "Lines reserved for footer
gd_prntparams-no_coverpage = 'X'.
endform. " BUILD_PRINT_PARAMS
*& Form END_OF_PAGE
form END_OF_PAGE.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
write: sy-uline(50).
skip.
write:/40 'Page:', sy-pagno .
endform.
*& Form END_OF_LIST
form END_OF_LIST.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
skip.
write:/40 'Page:', sy-pagno .
endform.
**reward if helpful
regards,
madhu -
Select column from user.table
Hi,
I have 100 users. Each one has same table let's say tableA. I want a query that return back the value of a given column in that table for all users with their names. I thought about a join between dba_users (username) and that table. Basically I generate a script by this :
select 'SELECT CULOMN FROM '||owner||'.'||TABLE_NAME||';' from all_tables where table_name='TABLEA';
I execute the result script as sysdba.
But when executed it does not show the name of each user. I mean we can not see which value belongs to whom.
How can I do that ?
many thanks before.
Message was edited by:
user522961Or perhaps you just want some dynamic SQL like this:
SQL> ed
Wrote file afiedt.buf
1 DECLARE
2 CURSOR u IS
3 SELECT username
4 FROM all_users
5 ORDER BY username;
6 v_cnt1 NUMBER;
7 v_cnt2 NUMBER;
8 v_tbl VARCHAR2(30) := 'EMP';
9 BEGIN
10 FOR users IN u
11 LOOP
12 SELECT count(*)
13 INTO v_cnt1
14 FROM ALL_TABLES
15 WHERE owner = users.username
16 AND table_name = v_tbl;
17 IF v_cnt1 > 0 THEN
18 EXECUTE IMMEDIATE 'SELECT count(*) FROM '||users.username||'.'||v_tbl INTO v_cnt2;
19 DBMS_OUTPUT.PUT_LINE('User: '||users.username||' Count on '||v_tbl||':'||v_cnt2);
20 END IF;
21 END LOOP;
22* END;
SQL> /
User: FRED Count on EMP:27
User: BOB Count on EMP:34
PL/SQL procedure successfully completed.
SQL> -
Script to add not null columns to all tables in database
Hello,
I need to add 5 not null columns to my existing database (all tables).
The problem is that i do not want to loose the current data.
I need a script so that i need not do this manually for each table.
Can u suggest?
VishalHello,
I need to add 5 not null columns to my existing database (all tables).
The problem is that i do not want to loose the current data.
I need a script so that i need not do this manually for each table.
Can u suggest?
Vishal I always follow this step
1) Alter table <<tablename>> add(<<columnname>> <<datatype>>)
2) Update <<tablename>> set <<columnname>>=<<anyvalue>>
3) Alter table <<tablename>> modify(<<columnname>> <<datatype>> not null)
else
1) rename <<tablename>> to <<tablenamebk>>
2) drop table <<tablename>>
3) Alter table <<tablenamebk>> add(<<columnname>> <<datatype>>)
4) update <<tablenamebk>> set <<columnname>>=<<anyvalue>>
5) create table <<tablename>> (with additional columns with not null)
6) insert into <<tablename>> select * from <<tablenamebk>> -
Pl sql join and selecting columns from join."t"."c": invalid at debug time
I noticed the error at cc.Country that is shown because cc is not yet there at compile time (got that
from searching this forum).
Isnt that a bit weak of oracle sql developer that it doesnt compile from the outside to the inside /core but
rather form top to bottom?
Am I right with my conclusion? If so, how to do it otherwise i.e. specifying that cc.country is
a column from countrycodes joined with table6 ?
SELECT DISTINCT 0,
2,
SUBSTR('metable', 0, 1) || '_ABC',
'ABC_' || 'metable',
'ABC ' ||cc.Country ,
'+'
FROM table6
LEFT JOIN COUNTRYCODE cc
ON cc.Code = metable
WHERE metable IS NOT NULL
AND metable <> ''metalray wrote:
hi Boneist
thanks for your reply
its in a plsql procedure (10g). well as you see cc is the alias
of the table COUNTRYCODE. which does exists. the error is at 'ABC ' ||cc.Country'
telling me"PL/SQL: ORA-01747: invalid user.table.column,..."
when I put COUNTRYCODE next to table6 in the FROM it works but thats not what I want
since I want to join both tables not just select from both.Can you give us your exact code and exact error message.
I'm not finding any problem with using alias names in the query..
SQL> select d.dname
2 ,'EMPNAME : '||e.ename
3 from dept d LEFT JOIN emp e ON e.deptno = d.deptno;
DNAME 'EMPNAME:'||E.ENAME
RESEARCH EMPNAME : SMITH
SALES EMPNAME : ALLEN
SALES EMPNAME : WARD
RESEARCH EMPNAME : JONES
SALES EMPNAME : MARTIN
SALES EMPNAME : BLAKE
ACCOUNTING EMPNAME : CLARK
RESEARCH EMPNAME : SCOTT
ACCOUNTING EMPNAME : KING
SALES EMPNAME : TURNER
RESEARCH EMPNAME : ADAMS
SALES EMPNAME : JAMES
RESEARCH EMPNAME : FORD
ACCOUNTING EMPNAME : MILLER
OPERATIONS EMPNAME :
15 rows selected.
SQL> -
Selecting string from all the tables in databse
Hi All,
I need a help in finding the data from all the database tables at one time using single query.
For e.g. I wanna search a string 'ABC' in all the database tables for a schema.
I want to find out,which all tables (in either of its columns) contain this string strored inside themselves.
For brand name changing,I need to find out all the tables and in turn all the columns containing that string where databse consisting of 1000 tables.
Could anyone suggest me some option for this?Is it possible to avoid this tedious task to search individual table?Why is it necessary to search every column? Does your data model permit the brand name to be stored in any column?
Whatever.
I suggest starting with dba_tab_columns (where owner = 'WHATEVER') and look for those tables/columns that could possibly hold the brand name. You can eliminate NUMBER and DATE columns and VARCHAR columns that are too short.
Spool that out to another script where each select statement is like this:
SELECT 'TABLE_NAME.COLUMN_NAME', column_name
FROM table_name
WHERE UPPER(COLUMN_NAME) LIKE '%BRAND NAME%'
AND rownum = 1; -
How to select data from all HR Master Tables(PA0000 to PA****)
Hi Gurus!
My requirement is to pick the changedon(AEDTM) , changedby(UNAME) and reason for change(PREAS) from all tables (pa0000 to pa****)of HR in which he made any change during a specific date.
Now if it is specific for two or three tables then inner join can solve it. but now it is the matter of picking data from maximum 9999 tables for which inner join will not be accurate.
plz suggest me any appropriate way to solve it out. or there is any table which store the changes in All HR Master Tables.
Thanking in Advance.
Tahir NaqqashHi,
it is very tidious to get it in one go, as u know hr tables contains huge data.
You can chack my wiki in https://wiki.sdn.sap.com/wiki/x/XYC0Aw .
Here you need to make the following modification.
1. in the selection screen set on date range with select option.
2. in the select query, change select * by ur specified fields.
3. change dynamic internal table and ALV as per ur required fields
In this way you have to put the table name and the date range and will get the data.
for repeation u can call the same job in background again and again store data in a seperate internal table and display finaly ..... but huge chance of getting 'Time Out ' error in that case for comparetively large day gap.
Regards,
Anirban -
Selectall checkbox not selecting rows in all pages
Hi guys,
Please help
what is the best way to select all the pages when i click on select all checkbox in the first page. Currently my code is selecting only 1st page of rows.
Please help me.
I have region with sql query(pl/sql function body returning sql query) with the following code. Repot is conditional.
DECLARE
l_query VARCHAR2(32676);
BEGIN
l_query := q'! SELECT DISTINCT
apex_item.checkbox( 1
,wo.wip_entity_id
,'onchange="javascript:CheckedAll(); setChkboxVal(this);"'
,:P0_CHK_LIST
) AS selecter
-- ,wo.work_order_status AS Status
,NVL((select DISTINCT STATUS from xxdl.xxdl_eam_its_pta_rollover WHERE wip_entity_id = wo.wip_entity_id),'') AS Status
,wo.wip_entity_name AS "Work Order Number"
,msn.asset_group_description AS "Asset Group"
,wo.asset_number AS "Asset Number"
,cust_prof.name As "Profile Class"
,wo.wip_entity_id As "wip_entity_id"
,wo.asset_group_id
,budget_department.project_id
,budget_department.project_number
,budget_department.task_id
,budget_department.task_number
,budget_department.award_id
,budget_department.award_number
FROM xxdl.xxdl_eam_wo_txn_accounts txn_acct
,apps.eam_work_orders_v wo
,apps.mtl_eam_asset_numbers_v msn
,apps.hz_cust_profile_classes cust_prof
,(SELECT tasks.task_id
,tasks.project_id
,valid_pta.award_id
,valid_pta.award_number
,(SELECT DISTINCT project_number
FROM xxdl.xxdl_valid_pta_combinations
WHERE project_id = tasks.project_id
) project_number
,tasks.task_number
,tasks.task_name
,tasks.description
,tasks.service_type_code
,orgs.organization_id
,orgs.name department_code
,orgs.attribute1 department_name
,orgs.attribute4 budget_unit
FROM pa.pa_tasks tasks
,xxdl.xxdl_valid_pta_combinations valid_pta
,hr.hr_all_organization_units orgs
WHERE orgs.organization_id = tasks.carrying_out_organization_id
AND valid_pta.task_id = tasks.task_id
) budget_department
WHERE txn_acct.organization_id = wo.organization_id
AND msn.current_organization_id = wo.organization_id
AND wo.organization_id = :app_organization_id
AND txn_acct.cost_bucket ='MATERIAL'
AND txn_acct.work_order_id = wo.wip_entity_id
AND msn.serial_number = wo.asset_number
-- AND wo.work_order_status = 'Draft'
AND budget_department.project_id = txn_acct.project_id
AND budget_department.task_id = txn_acct.task_id
AND budget_department.award_id = txn_acct.award_id
AND cust_prof.attribute1 (+) = budget_department.budget_unit
AND cust_prof.status = 'A'
AND NVL(cust_prof.attribute2,budget_department.department_code) = budget_department.department_code
AND wo.wip_entity_id not in (select wip_entity_id from xxdl.xxdl_eam_its_pta_rollover where status != 'DRAFT')!';
IF :P2_PROJECT IS NOT NULL THEN
l_query := l_query ||q'[ AND trim(budget_department.project_ID) = :P2_PROJECT ]';
END IF;
IF :P2_TASK IS NOT NULL THEN
l_query := l_query ||q'[ AND trim(budget_department.task_ID) = :P2_TASK ]';
END IF;
IF :P2_award IS NOT NULL THEN
l_query := l_query ||q'[ AND trim(budget_department.award_id) = :P2_AWARD ]';
END IF;
RETURN l_query;
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20001,'The system faced an unhandled exception. Please contact System Administrators for resolution with the following error code :ITS-201 ('''||SQLERRM||''').' );
END;
Conditional query of region
pl/sql body returning boolean
IF :P2_PROJECT IS NOT NULL and :P2_task IS NOT NULL and :p2_award IS NOT NULL and :p2_PTA IS NOT NULL THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;Selecting all rows will never work if you have more than one page. Instead of that, you could set some kind of a flag item to a value if the select all checkbox is checked (set it to null if unchecked). If this flag is selected, your process expecting that should go over the whole resultset and process it.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.apress.com/9781430235125
http://apex.oracle.com/pls/otn/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
------------------------------------------------------------------- -
FI-CA - Automatic payment FPY1 not selecting docs from Payment Specificatio
Hi,
I have created a payment specification containing 2 documents to be paid and then ran FPY1 to pay those payment specifications number. However the payment list is empty and not selecting the 2 documents from the payment specifications.
If i enter those documents without a payment specification then its being included in the payment list.
What is the problem here?
Edited by: Raja Kumar on Mar 30, 2010 3:03 PMHi Raja,
There could be problem with the programme error. please check with SAP OSS note.
Alternatively, check whether document number is used to include the same in payment program.
Deven. -
Printing selected page from all pages
Hello,
I'm working on web based oracle technology.
I'm facaing one problem when i'm printing any report direct to printer then it asks to select printer from available printer in network. But the problem is that it do not the ask how many pages to print , means, do not show dilouge box for selection of pages to be printed.
Pls if anybody knows then do reply me
Parag Shah
S/W Engineer
IndiaIf u r printing the report directly from ur coding then pass parameter list to run_product(). In that parameter list create parameter PRINTJOB and set it to YES.
e.g
declare
pl_id paramlist;
begin
pl_id:=get_parameter_list('tmpdata');
if not id_null(pl_id) then
destroy_parameter_list(pl_id);
end if;
pl_id:=create_parameter_list('tmpdata');
add_parameter(pl_id,'PRINTJOB',TEXT_PARAMETER,'YES');
RUN_PRODUCT (REPORTS,'report.REP',ASYNCHRONOUS,RUNTIME,FILESYSTEM,PL_ID,NULL);
end;
Regards
Kashif -
Selecting columns from two table is slow but same
I am selecting 27 columns from two tables
which running for more than 30 minutes. but
if I select count(*) with the same query
except the columns it is coming in seconds.
Where is the error?If you post
1) The table definitions for the underlying tables
2) The indexes that are on the tables
3) The two SQL statements you're running
4) The explain plan for both statements
we can probably be of some assistance.
My guess is that the count(*) is able to return much more quickly because the optimizer is able to use a significantly faster query plan that is based on an index which the longer-running query cannot utilize. Without the information I've requested, though, it's hard to do more than speculate.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC
Maybe you are looking for
-
Acrobat Reader 11.0.03 causes all programs to open in Reader
I installed 11.0.03 update, and all my other computer programs are being forced to open in Acrobat Reader. I had to uninstall Reader to be able to open my other programs. Now I am without a pdf reader. Any solutions?
-
Count all rows of a Database table
I want to count all the rows of a table. I have made correctly the connection with the database and all the other things (make a statement, make the query and the resultSet), I use the MySQL server v4.0.17 Here is the code I use: int count=0; String
-
Inserting record in IT0000 : Actions
Hi All, I wanted to add new action in IT000 with the reason code. Currently I am trying the same by using function module HR_INFOTYPE_OPERATION but it is giving me an error as Action does not exists in the specified start date. Plea
-
EDI 850: one vendor, multiple purchasing orgs
We have sussessfully implemented EDI 850 (purchase order) interface by using PO output, IDoc ORDERS05 and ABAP-PI port with a custom function module, which writes the IDoc data into a file and sends it to a third-party software (Gentran). Now the pro
-
Standerd BI Content DataSources and Cubes used for Cement industry
HI, Kindly any one sugest the list of standerd BI Content DataSources, and standerd BI Content Cubes used for Cement industry related projects. Standerd BI Content Datasources and cubes for modules SD, Product costing , Inventry, and GL