Create View taking time
Hi,
We are creating a view jusing the following query which is taking time. The query is as below,
SELECT
A.ICD_CODE AS ICD_CODE,
A.ICD_DESC AS ICD_DESC,
B.COMPL_ICD_CODE AS COMPL_ICD_CODE,
B.COMPL_GRP_TXT AS COMPL_GRP_TXT,
C.PROC_TYPE AS PROC_TYPE ,
C.I_O_IND AS I_O_IND,
C.DISC_MON AS QUARTER ,
B.PAT_KEY AS PAT_KEY ,
D.COMPL_TYPE_TXT AS COMPL_TYPE_TXT ,
C.PROV_ID AS PROV_ID ,
A.SPECIALTY AS SPECIALTY
FROM
EES_ICD_9_CODE A ,
EES_CLINICAL_COMPL_DATA B,
EES_CLINICAL_DATA C ,
EES_CLINCL_COMPL_ICD D
WHERE A.ICD_CODE= B.ICD_CODE
AND A. ICD_CODE= C.ICD_CODE
AND B.ICD_CODE=D.ICD_9_CD
AND B.COMPL_GRP_TXT=D.COMPL_GRP_TXT
AND B.COMPL_ICD_CODE<>B.ICD_CODE
AND C.PROC_TYPE <>'L'
AND B.COMPL_GRP_TXT<>'Reoperations'
AND D.COMPL_TYPE_TXT<>'Intra-operative Misadventure'
UNION
SELECT
A.ICD_CODE AS ICD_CODE,
A.ICD_DESC AS ICD_DESC,
B.COMPL_ICD_CODE AS COMPL_ICD_CODE,
B.COMPL_GRP_TXT AS COMPL_GRP_TXT,
C.PROC_TYPE AS PROC_TYPE ,
C.I_O_IND AS I_O_IND,
C.DISC_MON AS QUARTER ,
B.PAT_KEY AS PAT_KEY ,
D.COMPL_TYPE_TXT AS COMPL_TYPE_TXT ,
C.PROV_ID AS PROV_ID ,
A.SPECIALTY AS SPECIALTY
FROM
EES_ICD_9_CODE A ,
EES_CLINICAL_COMPL_DATA B,
EES_CLINICAL_DATA C ,
EES_CLINCL_COMPL_ICD D
WHERE A.ICD_CODE= B.ICD_CODE
AND A. ICD_CODE= C.ICD_CODE
AND B.ICD_CODE=D.ICD_9_CD
AND B.COMPL_GRP_TXT=D.COMPL_GRP_TXT
AND B.COMPL_ICD_CODE<>B.ICD_CODE
AND C.PROC_TYPE <>'L'
AND D.COMPL_TYPE_TXT = 'Intra-operative Misadventure'
AND B.PROC_DAY=C.PROC_DAY
UNION
SELECT
A.ICD_CODE AS ICD_CODE,
A.ICD_DESC AS ICD_DESC,
B.COMPL_ICD_CODE AS COMPL_ICD_CODE,
B.COMPL_GRP_TXT AS COMPL_GRP_TXT,
C.PROC_TYPE AS PROC_TYPE ,
C.I_O_IND AS I_O_IND,
C.DISC_MON AS QUARTER ,
B.PAT_KEY AS PAT_KEY ,
D.COMPL_TYPE_TXT AS COMPL_TYPE_TXT ,
C.PROV_ID AS PROV_ID ,
A.SPECIALTY AS SPECIALTY
FROM
EES_ICD_9_CODE A ,
EES_CLINICAL_COMPL_DATA B,
EES_CLINICAL_DATA C ,
EES_CLINCL_COMPL_ICD D
WHERE A.ICD_CODE= B.ICD_CODE
AND A. ICD_CODE= C.ICD_CODE
AND B.ICD_CODE=D.ICD_9_CD
AND B.COMPL_GRP_TXT=D.COMPL_GRP_TXT
AND B.COMPL_ICD_CODE<>B.ICD_CODE
AND C.PROC_TYPE <>'L'
AND B.COMPL_GRP_TXT='Reoperations'
AND B.PROC_DAY>C.PROC_DAY
AND (B.COMPL_ICD_CODE LIKE '45.%' OR B.COMPL_ICD_CODE LIKE '46.%' OR B.COMPL_ICD_CODE LIKE '48.%' OR B.COMPL_ICD_CODE LIKE '49.%')
)Here is the explain plan
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost |
| 0 | SELECT STATEMENT | | 5443M| 710G| | 1687M|
| 1 | SORT UNIQUE | | 5443M| 710G| 1598G| 1687M|
| 2 | UNION-ALL | | | | | |
|* 3 | HASH JOIN | | 5371M| 700G| 34M| 11709 |
|* 4 | HASH JOIN | | 281K| 31M| 4568K| 4679 |
| 5 | MERGE JOIN CARTESIAN | | 50225 | 3972K| | 248 |
| 6 | TABLE ACCESS FULL | EES_ICD_9_CODE | 123 | 5289 | | 2 |
| 7 | BUFFER SORT | | 408 | 15504 | | 246 |
|* 8 | TABLE ACCESS FULL | EES_CLINCL_COMPL_ICD | 408 | 15504 | | 2 |
|* 9 | TABLE ACCESS FULL | EES_CLINICAL_COMPL_DATA | 2088K| 71M| | 1860 |
|* 10 | TABLE ACCESS FULL | EES_CLINICAL_DATA | 1911K| 41M| | 2855 |
|* 11 | HASH JOIN | | 5973K| 831M| 7216K| 9081 |
| 12 | TABLE ACCESS BY INDEX ROWID | EES_ICD_9_CODE | 1 | 43 | | 1 |
| 13 | NESTED LOOPS | | 55969 | 6558K| | 4265 |
| 14 | NESTED LOOPS | | 55970 | 4208K| | 3146 |
|* 15 | TABLE ACCESS FULL | EES_CLINCL_COMPL_ICD | 36 | 1368 | | 2 |
|* 16 | TABLE ACCESS BY INDEX ROWID| EES_CLINICAL_COMPL_DATA | 1555 | 60645 | | 88 |
|* 17 | INDEX RANGE SCAN | COMPL_IND_ICD_CODE | 56875 | | | 248 |
|* 18 | INDEX RANGE SCAN | ICD_CODE_INDEX_1 | 1 | | | 1 |
|* 19 | TABLE ACCESS FULL | EES_CLINICAL_DATA | 1911K| 47M| | 2855 |
|* 20 | HASH JOIN | | 65M| 9142M| 8864K| 8943 |
|* 21 | HASH JOIN | | 68740 | 8055K| 5432K| 2781 |
| 22 | MERGE JOIN CARTESIAN | | 59762 | 4727K| | 248 |
| 23 | TABLE ACCESS FULL | EES_ICD_9_CODE | 123 | 5289 | | 2 |
| 24 | BUFFER SORT | | 486 | 18468 | | 246 |
|* 25 | TABLE ACCESS FULL | EES_CLINCL_COMPL_ICD | 486 | 18468 | | 2 |
|* 26 | TABLE ACCESS FULL | EES_CLINICAL_COMPL_DATA | 429K| 15M| | 1860 |
|* 27 | TABLE ACCESS FULL | EES_CLINICAL_DATA | 1911K| 47M| | 2855 |
Predicate Information (identified by operation id):
3 - access("A"."ICD_CODE"="C"."ICD_CODE")
4 - access("A"."ICD_CODE"="B"."ICD_CODE" AND "B"."ICD_CODE"="D"."ICD_9_CD" AND
"B"."COMPL_GRP_TXT"="D"."COMPL_GRP_TXT")
8 - filter("D"."COMPL_TYPE_TXT"<>'Intra-operative Misadventure' AND
"D"."COMPL_GRP_TXT"<>'Reoperations')
9 - filter("B"."COMPL_ICD_CODE"<>"B"."ICD_CODE" AND "B"."COMPL_GRP_TXT"<>'Reoperations')
10 - filter("C"."PROC_TYPE"<>'L')
11 - access("A"."ICD_CODE"="C"."ICD_CODE" AND "B"."PROC_DAY"="C"."PROC_DAY")
15 - filter("D"."COMPL_TYPE_TXT"='Intra-operative Misadventure')
16 - filter("B"."COMPL_GRP_TXT"="D"."COMPL_GRP_TXT" AND "B"."COMPL_ICD_CODE"<>"B"."ICD_CODE")
17 - access("B"."ICD_CODE"="D"."ICD_9_CD")
18 - access("A"."ICD_CODE"="B"."ICD_CODE")
19 - filter("C"."PROC_TYPE"<>'L')
20 - access("A"."ICD_CODE"="C"."ICD_CODE")
filter("B"."PROC_DAY">"C"."PROC_DAY")
21 - access("A"."ICD_CODE"="B"."ICD_CODE" AND "B"."ICD_CODE"="D"."ICD_9_CD" AND
"B"."COMPL_GRP_TXT"="D"."COMPL_GRP_TXT")
25 - filter("D"."COMPL_GRP_TXT"='Reoperations')
26 - filter("B"."COMPL_ICD_CODE"<>"B"."ICD_CODE" AND "B"."COMPL_GRP_TXT"='Reoperations' AND
("B"."COMPL_ICD_CODE" LIKE '45.%' OR "B"."COMPL_ICD_CODE" LIKE '46.%' OR "B"."COMPL_ICD_CODE"
'48.%' OR "B"."COMPL_ICD_CODE" LIKE '49.%'))
27 - filter("C"."PROC_TYPE"<>'L')
Note: cpu costing is off
61 rows selected.Please suggest any change for the query and where are the bottlenecks ?
Same question as above:
But how are you using the view?
You're presumably not planning to just do a select * from view with no additional views or predicates are you?Views that are that big and resource intensive would rarely be used in just a select * from view.
Presuambly that explain plan is from just the entire view source query or from the view actually being used in a SQL statement with further joins or predicates?
Those statements are what you need to get execution plans from to check that you're getting a predicate pushdown, etc
Otherwise, if the stats are accurate and the estimates are accurate and you are just doing a select * from view, where's the performance surprise?
Similar Messages
-
Hi All,
When I run "create view" command, it takes long time on Oracle 10.2.0.5 and Db mode is Physical Standby (Read-Write). I tried some configuration for tuning but didn't reach to solution.
What can be reasons of this latency ? Have you any ideas ?
B.R.
Edited by: ozgurumut on Mar 6, 2013 1:03 AMEveryday, We create flashback point then activate Standby DB, finally Open DB for internal user. End of day DB returns to flashback point (flasback restore) to morning. So Read write :) That you haven't mentioned earlier ;)
You can find ASH report on this link http://www.2shared.com/document/VwEVound/ASH_Rpt_-_mngdb1.html
Reviewed ASH report, Am not sure when you took the ASH report. Lets suppose you have given "Create view" command around 9:10 AM and completed by 9:20 AM, Take ASH report only from start date and time of 9:10 AM to 9:20 AM. If you took based on the same then i cannot see any query which is executing "create view",
Or else you can try again as below.
1) Connect to the session where you are going to give command "create view"
2) Gather sid from v$session
3) from the other session check
SQL> select event, total_waits, Total_timeouts, time_waited, max_wait from v$session where sid=<>;
Here you have to mention sid you gathered from the step 2.
Then you can see where it is waiting exactly, Moreover i dont think it is issue with Standby database[read-write] -
Using Materilaized view in a query .. query is taking time????
Hi I have a query :-
SELECT rownum as id, u.last_name, u.first_name,u.phone phone, u.empid,u.supervisor id
FROM emp_view u -- using view
CONNECT BY PRIOR u.empid = u.supervisor_id
START WITH u.sbcuid = 'ph2755';
here emp_view is a view .
------ The above query is taking 3 sec to execute.
Then I created Materialuized view emp_mv and the the MV query is same as emp_view view query.
After this i executed following sql
SELECT rownum as id, u.last_name, u.first_name,u.phone phone, u.empid,u.supervisor id
FROM emp_mv u -- using materialized view
CONNECT BY PRIOR u.empid = u.supervisor_id
START WITH u.sbcuid = 'ph2755';
this query is taking 15 sec to execute..... :(
can anyone please tell me why MV query is taking time????Hi,
In your first case you query a view, meaning that you query the underlying tables. These probably have indexes and stats are updated.
In you second case you query a materialized view, meaning that you query the underlying base table of that mview.
This probably do not have the same indexes to support that query.
But of course, I'm just guessing based on the little information provided.
If you want to take this further, please search for "When your query takes too long" and "How to post a tuning request".
These two threads holds valuable information, not only on how to ask this kind of question, but also how to start solving it on your own.
Regards
Peter -
A dynamic table based on run-time created view object -- please help!
Hello!
I'm trying to create a dynamic table based on an run-time created view object. All go ok, but table binding component take the first view/iterator state and don't reflect changes they have. Please, take a look:
1. At run-time the view is being replaced by new red-only one based on query in application module:
getQueryView().remove();
createViewObjectFromQueryStmt("QueryView", statement);
2. Page definition file contains an iterator (using iterator or methodIterator - doesn't matter) binding and table, which binds to the iterator, like:
<methodIterator id="distributeQuery1Iter" Binds="distributeQuery1.result"
DataControl="QueryServiceDataControl" RangeSize="10"/>
<table id="distributeQuery11" IterBinding="distributeQuery1Iter"/>
3. The page code uses <af:table>. But, if I use table binding (it's right) like this:
<af:table var="row" value="#{bindings.distributeQuery11.collectionModel}">
<af:forEach items="#{bindings.distributeQuery11.attributeDefs}" var="def">
the table will never changed (i.e. still show the first view instance).
When I tried to use iterator binding directly (it's bad and cannot provide all needed features unlike CollectionModel from table binding) I saw that table works!
(Code is somehing like:
<af:table var="row" value="#{bindings.myIterator.allRowsInRange}">
<af:forEach items="#{bindings.myIterator.attributeDefs}" var="def">
Why the table binding do not reflect changes in iterator? Or should I use different approach?
Thanks in advance!
Ilya.I got it to work! I used a hybrid approach comprised of some of your code and some of Steve Muench's AcceessAppModuleInBackingBean example.
In the setBindings method, I execute an app module method that redefines the query, then I used your code to delete and recreate bindings and iterator:
public void setBindingContainer(DCBindingContainer bc) {
this.bindingContainer = bc;
rebuildVO();
The rebuildVO() method looks like the code you provided in your example:
private void rebuildVO() {
DCDataControl dc;
DispatchAppModule dApp;
DCBindingContainer bc;
DCIteratorBinding it;
OperationBinding operationBinding;
ViewObject vo;
DCControlBinding cb;
try {
bc = getBindingContainer();
dc = bc.findDataControl(DATACONTROL);
dApp = (DispatchAppModule)dc.getDataProvider();
// Execute App Module Method to rebuild VO based upon new SQL Statement.
dApp.setDispatchViewSQL();
vo = dApp.findViewObject(DYNAMIC_VIEW_NAME);
it = bc.findIteratorBinding(DYNAMIC_VO_ITER_NAME);
it.bindRowSetIterator(vo, true);
// logger.info("Remove value binding...");
cb = bc.findCtrlBinding(DYNAMIC_VIEW_NAME);
cb.getDCIteratorBinding().removeValueBinding(cb);
bc.removeControlBinding(cb);
// logger.info("Creating new value binding...");
FacesCtrlRangeBinding dynamicRangeBinding =
new FacesCtrlRangeBinding(null,
bc.findIteratorBinding(DYNAMIC_VO_ITER_NAME), null);
// logger.info("Add control binding...");
bc.addControlBinding(DYNAMIC_VIEW_NAME, dynamicRangeBinding);
} catch (Exception e) {
e.printStackTrace();
And my App Module method that redefines the view object looks like this:
public void setDispatchViewSQL() {
String SQL =
"begin ? := PK_BUsiNESS.F_GETDISPATCHVIEWSQL();end;";
CallableStatement st = null;
String ViewSQL = null;
try {
st = getDBTransaction().createCallableStatement(SQL,
DBTransaction.DEFAULT);
* Register the first bind parameter as our return value of type LONGVARCHAR
st.registerOutParameter(1, OracleTypes.LONGVARCHAR);
st.execute();
ViewSQL = ((OracleCallableStatement) st).getString(1);
findViewObject(DYNAMIC_VO_NAME).remove();
ViewObject vo = createViewObjectFromQueryStmt(DYNAMIC_VO_NAME, ViewSQL);
vo.executeQuery();
} catch (SQLException s) {
throw new JboException(s);
} finally {
try {
st.close();
} catch (SQLException s) {
s.printStackTrace();
When I run it I get my desired results. One thing I don't quite understand is why when the page is first rendered it shows the last set of records rather than the first. Now I have to figure out how to put navigation URLS in each of the table cells.
Thanks for your help; I would not have gotten this far without it,
Jeff -
Problem with creating/viewing PDF's from InDesign CS3
I have a problem with our PDF workflow and just cannot seem to resolve it.
The problem is as follows: My coworker and I (both designers running CS3 on iMac's running 10.5.6 Leopard) work daily on producing documents and graphic layouts.
Internally we can view and print PDF documents we create just fine with no troubles with the exception of our supervisor, who is running a mac with Tiger operating system. Our office environment is both Mac and PC. On may occasions he cannot print PDF's we create. Many times his prints will contain garbled characters, drop italics and formatting, replace fonts, or just print slowly.
This problem is also happening to our editor who is offsite. This is a fairly serious problem for her, considering her job relies heavily on being able to view and open PDF files we create. She was able to send a PDF file which shows the garbled mess her printer spit out when she printed. Apparently there were pages upon pages of messy garbled text. When documents do print from her, they are usually very slow in printing, taking up to a minute or more to print each page.
The sample of what she sent me is attached, and can also be found on my MobileMe iDisk at: http://public.me.com/rlcollier (document entitled Print Results.PDF)
My question really to the community is obviously what might be causing these problems. Its very frustrating not being able to determine if its something we're doing ourselves thats causing some incompatability or corruption in these files, or if its the users systems themselves. I can say that Debra our editor has can have a garbled mess of a 4 page file from us, and then turn around and print a graphic heavy 90 page PDF with ease from Boeing. Our PDF's seem to be the only ones she struggles with. That being said, my inclination is that its something on our end.
Any ideas of where to start looking? Any help at all would be greatly appreciated and welcomed. Thanks!I currently had our editor test printing of some of our files using both Foxit and Adobe Reader (as was suggested) in order to see if either made a difference in her printing ability and here is what she came back with:
I tried to print out both these pdfs (David's is the one you reworked and Lisa's HESSM-3, both sent yesterday).
With Adobe: David's first page printed quickly, but it had errors (part of his pants didn't print, and there's an arbitrary shaded box in the text). Page 2 didn't print--every time I tried it had a different "offending command" code. Printing Lisa's HESSM made it up to page 7 before problems showed up (stock photo only partially printed), and it stopped on page 8 (with the random "offending command" code).
With Foxit: Both David's and the HESSM pdfs printed completely and without error...but it took a long time. David's 2 pages took about 3 to 4 minutes, and HESSM's 16 pages took close to 20 minutes. The time is in the transfer of data to the printer; the physical printing goes pretty quickly.
I cant say that I believe email is the problem, although I cant rule it out. I've tested emailing vs. passing through our workgroup with my supervisor, and it does not make any difference in his ability (or lack of ability) to print our files. He was able to print to a different printer (an HP 4650 as opposed to a 4100) without troubles. He refuses to believe its a printer problem however because PDF files originating from our office are the only ones he has trouble with. Never has he had any trouble with a single PDF file produced from any other source. This is also the case for our editor who only has trouble with PDF files originating from either mine, or my coworkers systems.
PS: I've attached both files that were referenced by our editor above for viewing/testing. -
Database View ---- Execution Time
Dear experts,
I hv to improve the performance of a report in which a view has been used.
I hv debugged the program, when control goes to query that is fetching data from view, taking very long time.
Can anything be done to improve the performance of the database view.
In view , MKPF , MSEG and MAKT tables has been used.
Regards,
Jaspal KumarMKPF and MSEG are big tables as they store header and item data of material documents created in process...
please zoom in the 'Selection condition used in programs'
also if require, you can try with secondary index (although too much use of secondary index can decrease performance)
You can look the time duration in ST05 trace...
Thanks -
Insert statement taking time on oracle 10g
Hi,
My procedure taking time in following statement while database upgrading from oracle 9i to oracle 10g.
I m using oracle version 10.2.0.4.0.
cust_item is matiralize view in procedure and it is refreshing in the procedure
Index is dropping before inserting data into cust_item_tbl TABLE and after inserting data index is created.
There are almost 6 lac records into MV which are going to insert into TABLE.
In 9i below insert statement is taking 1 hr time to insert while in 10g it is taking 2.30 hrs.
EXECUTE IMMEDIATE 'ALTER SESSION ENABLE PARALLEL QUERY';
EXECUTE IMMEDIATE 'ALTER SESSION ENABLE PARALLEL DML';
INSERT INTO /*+ APPEND PARALLEL */ cust_item_tbl NOLOGGING
(SELECT /*+ PARALLEL */
ctry_code, co_code, srce_loc_nbr, srce_loc_type_code,
cust_nbr, item_nbr, lu_eff_dt,
0, 0, 0, lu_end_dt,
bus_seg_code, 0, rt_nbr, 0, '', 0, '', SYSDATE, '', SYSDATE,
'', 0, ' ',
case
when cust_nbr in (select distinct cust_nbr from aml.log_t where CTRY_CODE = p_country_code and co_code = p_company_code)
THEN
case
when trunc(sysdate) NOT BETWEEN trunc(lu_eff_dt) AND trunc(lu_end_dt)
then NVL((select cases_per_pallet from cust_item c where c.ctry_code = a.ctry_code and c.co_code = a.co_code
and c.cust_nbr = a.cust_nbr and c.GTIN_CO_PREFX = a.GTIN_CO_PREFX and c.GTIN_ITEM_REF_NBR = a.GTIN_ITEM_REF_NBR
and c.GTIN_CK_DIGIT = a.GTIN_CK_DIGIT and trunc(sysdate) BETWEEN trunc(c.lu_eff_dt) AND trunc(c.lu_end_dt) and rownum = 1),
a.cases_per_pallet)
else cases_per_pallet
end
else cases_per_pallet
END cases_per_pallet,
cases_per_layer
FROM cust_item a
WHERE a.ctry_code = p_country_code ----varible passing by procedure
AND a.co_code = p_company_code ----varible passing by procedure
AND a.ROWID =
(SELECT MAX (b.ROWID)
FROM cust_item b
WHERE b.ctry_code = a.ctry_code
AND b.co_code = a.co_code
AND b.ctry_code = p_country_code ----varible passing by procedure
AND b.co_code = p_company_code ----varible passing by procedure
AND b.srce_loc_nbr = a.srce_loc_nbr
AND b.srce_loc_type_code = a.srce_loc_type_code
AND b.cust_nbr = a.cust_nbr
AND b.item_nbr = a.item_nbr
AND b.lu_eff_dt = a.lu_eff_dt));explain plan of oracle 10g
Plan
INSERT STATEMENT CHOOSECost: 133,310 Bytes: 248 Cardinality: 1
5 FILTER
4 HASH GROUP BY Cost: 133,310 Bytes: 248 Cardinality: 1
3 HASH JOIN Cost: 132,424 Bytes: 1,273,090,640 Cardinality: 5,133,430
1 INDEX FAST FULL SCAN INDEX MFIPROCESS.INDX_TEMP_CUST_AUTH_PERF_MV Cost: 10,026 Bytes: 554,410,440 Cardinality: 5,133,430
2 MAT_VIEW ACCESS FULL MAT_VIEW MFIPROCESS.TEMP_CUST_AUTH_PERF_MV Cost: 24,570 Bytes: 718,680,200 Cardinality: 5,133,430 can you please look into the issue?
Thanks.According to the execution plan you posted parallelism is not taking place - no parallel operations listed
Check the hint syntax. In particular, "PARALLEL" does not look right.
Running queries in parallel can either help performance, hurt performance, or do nothing for performance. In your case a parallel index scan on MFIPROCESS.INDX_TEMP_CUST_AUTH_PERF_MV using the PARALLEL_INDEX hint and the PARALLEL hint specifying the table for MAT_VIEW MFIPROCESS.TEMP_CUST_AUTH_PERF_MV Cost might help, something like (untested)
select /*+ PARALLEL_INDEX(INDX_TEMP_CST_AUTH_PERF_MV) PARALLEL(TEMP_CUST_AUTHPERF_MV) */Is query rewrite causing the MVs to be read? If so hinting the query will be tricky -
Problem with embeding the same view in dynamically created view container
Hello Experts,
I am getiing a dump when i try to embed the same view inside the dynamically created view container of
dynamically created tabs of a tabstrip
The requirement go like this, i have 2 views in which i have have to embed the 2nd view to view1 where i have an empty
tabstrip without tabs. During runtime i create tabs as well as view containers accordingly and then try to embed view2 in tabs.
I have put the below mentioned code in HANDLEIN,
DATA: lref_vcntlr TYPE REF TO if_wd_view_controller,
lref_comp TYPE REF TO if_wd_component_usage,
lv_embed_pos TYPE string.
lref_vcntlr = wd_this->wd_get_api( ).
lv_embed_pos = 'FILE_PERS_EDIT/VC_GENERAL'.
TRY.
CALL METHOD lref_vcntlr->do_dynamic_navigation
EXPORTING
source_window_name = 'FILE_PERSISTENCE_WND' " Window
source_vusage_name = 'FILE_PERS_EDIT_USAGE_1' " Source View usage
source_plug_name = 'TO_EDIT_LAYOUT' " Outbound plug
target_view_name = 'PERS_EDIT_LAYOUT' " Second view to be embedded
target_plug_name = 'IN' " Second view inboun plug
target_embedding_position = lv_embed_pos
RECEIVING
component_usage = lref_comp.
CATCH cx_wd_runtime_repository .
ENDTRY.
wd_this->fire_to_edit_layout_plg( ).
This works fine for the first time.
However onaction tab select i change the embeding position( 'FILE_PERS_EDIT/view container name of different tab') of the view2 an try to embed view2 in a different tab.
At this point i get a dump stating View2 already present in the window 'FILE_PERSISTENCE_WND' of component.
I think, the view2 embediing has to be removed before i add the view2 in a different tab
Kindly let me know how to remove view2 embedding from tab1 before i add a view2 to a different tab or is there any other
means to handle this problem?
Thanks & Best Regards,
Srini.Hello Srini,
I found a solution to your problem, because I had a similar task.
In WDDOINIT I changed the method do_dynamic_navigation to if_wd_navigation_services_new~prepare_dynamic_navigation:
DATA:
l_view_controller_api TYPE REF TO if_wd_view_controller.
l_view_controller_api = wd_this->wd_get_api( ).
TRY.
CALL METHOD l_view_controller_api->if_wd_navigation_services_new~prepare_dynamic_navigation
EXPORTING
source_window_name = 'WDW_MAIN'
source_vusage_name = 'VW_SUB_USAGE_1'
source_plug_name = 'TO_VW_CONTENT'
target_component_name = 'ZTEST_DYNAMIC'
target_view_name = 'VW_CONTENT'
target_plug_name = 'DEFAULT'
target_embedding_position = 'VW_MAIN/VC_TAB.VW_SUB/TAB1_VC'
RECEIVING
repository_handle = wd_this->g_rep_handle.
CATCH cx_wd_runtime_repository .
ENDTRY.
wd_this->fire_to_vw_content_plg( param1 = 'TAB1' ).
In the action I first deleted the navigation targets, then navigated to the empty-view and last I called my target view:
DATA:
lv_position TYPE string,
l_view_controller_api TYPE REF TO if_wd_view_controller,
lr_view_usage TYPE REF TO if_wd_rr_view_usage,
lr_view_***_t TYPE wdrr_vca_objects,
lr_view_*** LIKE LINE OF lr_view_***_t.
l_view_controller_api = wd_this->wd_get_api( ).
lr_view_usage = wd_this->g_view->get_view_usage( ).
lr_view_usage->delete_all_navigation_targets( plug_name = 'TO_VW_CONTENT' ).
CLEAR lv_position.
CONCATENATE 'VW_MAIN/VC_TAB.VW_SUB/' old_tab '_VC' INTO lv_position.
TRY.
l_view_controller_api->if_wd_navigation_services_new~do_dynamic_navigation(
source_window_name = 'WDW_MAIN'
source_vusage_name = 'VW_SUB_USAGE_1'
source_plug_name = 'TO_EMPTYVIEW'
target_component_name = 'ZTEST_DYNAMIC'
target_view_name = 'EMPTYVIEW'
target_plug_name = 'DEFAULT'
target_embedding_position = lv_position ).
CATCH cx_wd_runtime_repository.
ENDTRY.
CLEAR lv_position.
CONCATENATE 'VW_MAIN/VC_TAB.VW_SUB/' tab '_VC' INTO lv_position.
TRY.
wd_this->g_rep_handle = l_view_controller_api->if_wd_navigation_services_new~prepare_dynamic_navigation(
source_window_name = 'WDW_MAIN'
source_vusage_name = 'VW_SUB_USAGE_1'
source_plug_name = 'TO_VW_CONTENT'
target_component_name = 'ZTEST_DYNAMIC'
target_view_name = 'VW_CONTENT'
target_plug_name = 'DEFAULT'
target_embedding_position = lv_position ).
CATCH cx_wd_runtime_repository.
ENDTRY.
wd_this->fire_to_vw_content_plg( param1 = tab ).
Ann.: I my example, I had 3 views: VW_MAIN which embedds VW_SUB. VW_SUB has the tabs in it and VW_SUB embedds VW_CONTENT.
BR,
Roland -
Non-sense error message trying to create view
Greetings All,
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production on Windows 2008R2
I am getting an error while trying to create a view. The error makes no sense in that no attempt to change a user name or password as the error message being produced suggests.
I can execute the entire select statement fine, I get results back.
If I comment out the line indicated as being in error, the problem moves to the line prior to the one commented out. The 4 lines prior to the line indicated by the error message are similar. The error is occurring on the last of the 5 similar lines of code.
If I move all 5 lines further up in the code the error moves accordingly.
The function validate_number (near where the error is identified) under certain conditions will issue a execute immediate 'alter session set nls_numeric_characters = ''.,''';
The column number identified in the error message is 2 spaces prior to the validate_number function call.
Below is the syntax for the creation of the view, the error message is at the bottom.
The numbers to the far left indicate the line number. I put 2 blank lines before and after the line of code identified by the error message.
The error points to the 2-spaces in front of the VALIDATE_NUMBER function call on line 350. just before the sql code ==> validate_number(Spend_Qty,'')),0) <==
Thanks for your time,
Bob
CREATE OR REPLACE VIEW REPORT_STAGING_V AS
- SELECT
- SPEND_STAGING.INPUT_FILE_ID,
- SPEND_STAGING.SPEND_ID,
- SPEND_STAGING.SPEND_DOC_NUM,
- SPEND_STAGING.SPEND_DOC_ITM_NUM,
- SPEND_STAGING.SPEND_DOC_YR_NUM,
- SPEND_STAGING.ACCT_PYBL_INV_DOC_NUM,
- SPEND_STAGING.ACCT_PYBL_INV_FSCL_YR_NUM,
- SPEND_STAGING.COMPANY_CODE,
- SPEND_STAGING.ACCT_PYBL_INV_LN_ITM_NUM,
- SPEND_STAGING.SPEND_DOC_TYPE_CD,
- SPEND_STAGING.SPEND_MTHD_TXT,
- NVL(SPEND_STAGING.SRC_SYS_CD, '<BLANK>') SRS_SYS_CD,
- SPEND_STAGING.SPEND_SAVING_DT,
- SPEND_STAGING.SPEND_SAVING_FSCL_WK_NUM,
- SPEND_STAGING.SPEND_SAVING_FSCL_MTH_NUM,
- SPEND_STAGING.SPEND_SAVING_FSCL_QTR_NUM,
- SPEND_STAGING.SPEND_SAVING_FSCL_YR_NUM,
- SPEND_STAGING.MTRL_GRP_CD,
- SPEND_STAGING.MTRL_GRP_DESC_TXT,
- SPEND_STAGING.MTRL_GRP_LVL_1_TXT,
- SPEND_STAGING.MTRL_GRP_LVL_2_TXT,
- SPEND_STAGING.MTRL_GRP_LVL_3_TXT,
- SPEND_STAGING.MTRL_GRP_LVL_4_TXT,
- SPEND_STAGING.MTRL_GRP_LVL_5_TXT,
- SPEND_STAGING.MTRL_GRP_LVL_6_TXT,
- SPEND_STAGING.MTRL_GRP_LVL_7_TXT,
- SPEND_STAGING.MTRL_GRP_LVL_8_TXT,
- SPEND_STAGING.GL_ACCT_NUM,
- SPEND_STAGING.GL_ACCT_DESC,
- SPEND_STAGING.COST_CENTR_CD,
- SPEND_STAGING.PRFT_CENTR_CD,
- SPEND_STAGING.FUNCNL_AREA_CD,
- SPEND_STAGING.PURCH_GRP_CD,
- SPEND_STAGING.PURCH_GRP_NAM,
- SPEND_STAGING.PURCH_ORG_CD,
- SPEND_STAGING.PURCH_ORG_NAM,
- SPEND_STAGING.REGION_CODE,
- SPEND_STAGING.VNDR_ACCT_ROOT_NUM,
- SPEND_STAGING.VNDR_CORP_NAM,
- SPEND_STAGING.VNDR_CORP_TICKER_SYMBL_CD,
- SPEND_STAGING.BUYPOINT_VNDR_ACCT_NUM,
- SPEND_STAGING.BUYPOINT_VNDR_FIRST_NAM,
- SPEND_STAGING.PAYPOINT_VNDR_ACCT_NUM,
- SPEND_STAGING.PAYPOINT_VNDR_FIRST_NAM,
- SPEND_STAGING.SPEND_PYMNT_TERM_CD,
- SPEND_STAGING.SPEND_PYMNT_TERM_DESC,
- SPEND_STAGING.SPEND_PYMNT_BSLN_DT,
-50 SPEND_STAGING.SPEND_PYMNT_CLRNG_DT,
- SPEND_STAGING.CONTRACTUAL_PYMNT_TERM_DY_CNT,
- SPEND_STAGING.VNDR_MTRL_NUM,
- SPEND_STAGING.MTRL_ID_1280,
- SPEND_STAGING.MTRL_DESC,
- SPEND_STAGING.BAT_NUM,
- SPEND_STAGING.SPCL_STOCK_IND,
- SPEND_STAGING.INVTY_MVMNT_TYPE_CD,
- SPEND_STAGING.GOODS_RCPNT_NAM,
- SPEND_STAGING.MFG_PART_NUM,
- SPEND_STAGING.PLANT_CD,
- SPEND_STAGING.PLANT_DESC,
- SPEND_STAGING.STORAGE_LOC_CD,
- SPEND_STAGING.STORAGE_LOC_DESC,
- SPEND_STAGING.UNLOADING_PT_DESC,
- SPEND_STAGING.PO_NUM,
- SPEND_STAGING.PO_LN_ITM_NUM,
- SPEND_STAGING.PO_LN_ITM_LAST_CHNG_DT,
- SPEND_STAGING.PO_DOC_DT,
- SPEND_STAGING.PO_TYPE_CD,
- SPEND_STAGING.PO_TYPE_DESC,
- SPEND_STAGING.PO_UOM_CD,
- SPEND_STAGING.PO_PYMNT_TERM_CD,
- SPEND_STAGING.ASGND_ACCT_CTGRY_TYPE_CD,
- SPEND_STAGING.PO_SHORT_TXT,
- SPEND_STAGING.GR_MTRL_DOC_TXT,
- SPEND_STAGING.ACCT_PYBL_INV_ITM_TXT,
- SPEND_STAGING.PO_RCPT_INV_HST_DOC_POST_DT,
- SPEND_STAGING.APPRTN_NUM,
- SPEND_STAGING.REQTN_TRK_NUM,
- SPEND_STAGING.REQTN_LN_NUM,
- SPEND_STAGING.REQTN_LN_ITM_NUM,
- SPEND_STAGING.REQTN_PERSN_ACCT_ID,
- SPEND_STAGING.NTWRK_NUM,
- SPEND_STAGING.NTWRK_CTGRY_CD,
- SPEND_STAGING.PROJ_NAM,
- SPEND_STAGING.WBS_ELMNT_NAM,
- SPEND_STAGING.CPTL_PO_IND,
- LU_GAC_STAGING.TIER_SUPPLIER,
- CASE
- WHEN SPEND_STAGING.PRCRMNT_RPTNG_LVL_3_TXT = 'GAC'
- AND LU_GAC_STAGING.PO_SHORT_TXT = SPEND_STAGING.PO_SHORT_TXT
- AND SPEND_STAGING.SRC_SPLR_NAM IS NULL
- THEN LU_GAC_STAGING.TIER_SUPPLIER
- ELSE SRC_SPLR_NAM
- END SRC_SPLR_NAM,
- SPEND_STAGING.TAX_CD,
- SPEND_STAGING.TAX_CD_DESC,
- SPEND_STAGING.TAX_JURISDICTION_TXT,
- SPEND_STAGING.MTRL_DOC_PRCS_UOM_QTY,
-100 SPEND_STAGING.MTRL_DOC_UNIT_OF_ENTRY_QTY,
- SPEND_STAGING.PO_LN_ITM_QTY,
- SPEND_STAGING.PO_LN_ITM_NET_PRC_UNIT_QTY,
- SPEND_STAGING.PO_LN_ITM_NET_PRC_USD_AMT,
- SPEND_STAGING.PO_LN_ITM_NET_PRC_DC_AMT,
- SPEND_STAGING.PO_LN_ITM_NET_PRC_BDGT_USD_AMT,
- SPEND_STAGING.PO_LN_ITM_TOT_USD_AMT,
- SPEND_STAGING.SPEND_USD_AMT,
- SPEND_STAGING.SPEND_DOC_CURNCY_AMT,
- SPEND_STAGING.SPEND_LOCAL_CURNCY_AMT,
- SPEND_STAGING.SPEND_BDGT_USD_AMT,
- SPEND_STAGING.SPEND_QTY,
- SPEND_STAGING.SPEND_QTY_UOM_CD,
- SPEND_STAGING.SPEND_UNIT_OF_ENTRY_QTY,
- SPEND_STAGING.SPEND_UNIT_OF_ENTRY_UOM_CD,
- SPEND_STAGING.SPEND_DC_FX_MTH_CNVRSN_FCT_VAL,
- SPEND_STAGING.SPEND_DC_FX_BDG_CNVRSN_FCT_VAL,
- SPEND_STAGING.CMPNY_LOCAL_CURNCY_CD,
- SPEND_STAGING.DOC_CURNCY_CD,
- SPEND_STAGING.TRANSTN_TYPE_CD,
- SPEND_STAGING.ACCT_ASGNMT_SEQ_NUM,
- SPEND_STAGING.GLPCA_LN_ITM_REC_NUM,
- SPEND_STAGING.PCA_REF_DOC_NUM,
- SPEND_STAGING.CO_DOC_NUM,
- SPEND_STAGING.CO_FSCL_YR_NUM,
- SPEND_STAGING.CO_LN_ITM_NUM,
- SPEND_STAGING.VNDR_REF_DOC_NUM,
- SPEND_STAGING.SAVING_MTHD_TXT,
- SPEND_STAGING.SAVING_CMNT_TXT,
- SPEND_STAGING.SAVING_COND_NUM,
- SPEND_STAGING.SAVING_COND_ITM_NUM,
- SPEND_STAGING.SAVING_COND_TYPE_CD,
- SPEND_STAGING.SAVING_COND_TYPE_DESC,
- SPEND_STAGING.SAVING_COND_CURNCY_CD,
- SPEND_STAGING.SAVING_COND_PRC_UNIT_UOM_CD,
- SPEND_STAGING.SAVING_COND_PRC_UNIT_QTY,
- SPEND_STAGING.SAVING_COND_RTE_USD_AMT,
- SPEND_STAGING.SAVING_COND_CURNCY_CNVRSN_VAL,
- SPEND_STAGING.SAVING_COND_CURNCY_BDGT_CNVRSN,
- SPEND_STAGING.PO_TRANSTN_COND_DC_AMT,
- SPEND_STAGING.PO_TRANSTN_COND_USD_AMT,
- SPEND_STAGING.SAVING_RTE_PER_USD_AMT,
- SPEND_STAGING.SAVING_PER_USD_AMT,
- SPEND_STAGING.SAVING_PER_BDGT_USD_AMT,
- SPEND_STAGING.AVOIDANCE_USD_AMT,
- SPEND_STAGING.AVOIDANCE_BDGT_USD_AMT,
- SPEND_STAGING.SAVING_USD_AMT,
- SPEND_STAGING.SAVING_BDGT_USD_AMT,
- SPEND_STAGING.NO_FX_SAVING_USD_AMT,
- SPEND_STAGING.NO_FX_AVOIDANCE_USD_AMT,
-150 SPEND_STAGING.TOT_REDUCTN_USD_AMT,
- SPEND_STAGING.TOT_REDUCTN_BDGT_USD_AMT,
- SPEND_STAGING.TOT_NO_FX_REDUCTN_USD_AMT,
- SPEND_STAGING.PAYMENTNET_TRANSTN_NUM,
- SPEND_STAGING.PAYMENTNET_TRANSTN_LN_ITM_NUM,
- SPEND_STAGING.ROW_CRTE_GMT_DTTM,
- SPEND_STAGING.ROW_MODIFY_GMT_DTTM,
- SPEND_STAGING.ROW_CRTE_MST_DTTM,
- SPEND_STAGING.ROW_MODIFY_MST_DTTM,
- SPEND_STAGING.PRCRMNT_DIRECTOR_NAM,
- SPEND_STAGING.PRCRMNT_PLANT_DSGNTN,
- SPEND_STAGING.PRCRMNT_RPTNG_LVL_1_TXT,
- SPEND_STAGING.PRCRMNT_RPTNG_LVL_2_TXT,
- SPEND_STAGING.PRCRMNT_RPTNG_LVL_3_TXT,
- SPEND_STAGING.SPEND_CAT_ID,
- SPEND_STAGING.SPEND_RULE_ID,
- SPEND_STAGING.TRANSACTION_DATE,
- SPEND_STAGING.SPEND_AMOUNT,
- SPEND_STAGING.ITEM_DESCRIPTION,
- SPEND_STAGING.SUPPLIER_ID,
- CASE
- WHEN SPEND_STAGING.SOURCE ='SPEND'
- THEN 'Spend and Savings'
- WHEN SPEND_STAGING.SOURCE ='TRAVEL'
- THEN 'Travel'
- ELSE NULL
- END SOURCE,
- SPEND_STAGING.SUPPLIER_NUMBER,
- SPEND_STAGING.TRAVEL_PERSNO,
- SPEND_STAGING.TRIP,
- SPEND_STAGING.TRAVEL_DOC,
- SPEND_STAGING.TRAVEL_EXPTY,
- SPEND_STAGING.TRAVEL_EXP_TYPE_DESC,
- SPEND_STAGING.TRAVLE_CREDIT_CARD_TRAN_DESC TRAVEL_CREDIT_CARD_TRAN_DESC,
- SPEND_STAGING.COUNTRY_CODE,
- SPEND_STAGING.TRAVEL_INFO,
- SPEND_STAGING.TRAVEL_ID,
- SPEND_STAGING.TRAVEL_DOCUMENT_NUMBER,
- SPEND_STAGING.TRAVEL_LAST_NAME_FIRST_NAME,
- SPEND_STAGING.TRAVEL_TRIP_REASON,
- SPEND_STAGING.TRAVEL_TRIP_STATUS,
- SPEND_STAGING.TRAVEL_RATE,
- SPEND_STAGING.FINANCE_ORG,
- SPEND_STAGING.ASSOCIATED_MG_CODE,
- SPEND_STAGING.COUNTRY_DESC,
- SPEND_STAGING.TRAVEL_ID_DESC_BANKCARD,
- SPEND_STAGING.COMPANY_CODE_DESC,
- SPEND_STAGING.COST_CENTER_DESC,
- 'Q'||TO_CHAR(SPEND_STAGING.TRANSACTION_DATE,'Q') QUARTERNAME,
- TO_CHAR(SPEND_STAGING.TRANSACTION_DATE,'YYYY') YEARNAME,
-200 CASE
- WHEN SPEND_STAGING.SRC_SYS_CD = 'P-CARD'
- THEN SS2.CLEANSED_PARENT_NAME
- ELSE SS1.CLEANSED_PARENT_NAME
- END CLEANSED_PARENT_NAME,
- CASE
- WHEN SPEND_STAGING.SRC_SYS_CD = 'P-CARD'
- THEN SS2.cleansed_name_1
- ELSE SS1.cleansed_name_1
- END CLEANSED_NAME1,
- CASE
- WHEN SPEND_STAGING.MTRL_ID_1280 IS NULL
- AND SPEND_STAGING.VNDR_MTRL_NUM IS NOT NULL
- THEN SPEND_STAGING.VNDR_MTRL_NUM
- WHEN SPEND_STAGING.MTRL_ID_1280 IS NULL
- AND SPEND_STAGING.VNDR_MTRL_NUM IS NULL
- AND SPEND_STAGING.MFG_PART_NUM IS NOT NULL
- THEN SPEND_STAGING.MFG_PART_NUM
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EFM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZAR'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280||'-MIX'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EWM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZAR'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-MIX'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EWM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZSA'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-ASMBLY'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EFM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZSA'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-ASMBLY'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EFM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZST'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-TEST'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EWM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZST'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-TEST'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EFM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZBI'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
-250 THEN SPEND_STAGING.MTRL_ID_1280
- ||'-BURN-IN'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EWM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZBI'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-BURN-IN'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EFM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZRJ'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-REJECT'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EWM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZRJ'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-REJECT'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EFM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZPR'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-PROBE'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EWM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZPR'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-PROBE'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EFM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZEF'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-ENG'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EWM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZEF'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-ENG'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EFM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZEM'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-ENG'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EWM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZEM'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-ENG'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EFM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZEU'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
-300 THEN SPEND_STAGING.MTRL_ID_1280
- ||'-ENGWFR'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EWM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZEU'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-ENGWFR'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EFM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZSF'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-WFR'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EWM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZSF'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-WFR'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EFM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZEF'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-ENG'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EWM'
- AND SPEND_STAGING.PO_TYPE_CD = 'ZEF'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-ENG'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EFM'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-POTypeCode'
- WHEN SPEND_STAGING.MTRL_GRP_LVL_4_TXT = 'EWM'
- AND SPEND_STAGING.MTRL_ID_1280 IS NOT NULL
- THEN SPEND_STAGING.MTRL_ID_1280
- ||'-POTypeCode'
- ELSE SPEND_STAGING.MTRL_ID_1280
- END ReportingPartNum,
- LU_PCARD_STAGING.COST_CENTR_CD PCARD_COST_CENTR_CD,
- LU_PCARD_STAGING.CTY_NAM PCARD_CTY_NAM,
- LU_PCARD_STAGING.DISABLE_LINE PCARD_DISABLE_LINE,
- LU_PCARD_STAGING.DISABLED_OWNED_BIZ_FLG PCARD_DISABLED_OWNED_BIZ_FLG,
- LU_PCARD_STAGING.DIVERSITY_VNDR_FLG PCARD_DIVERSITY_VNDR_FLG,
- LU_PCARD_STAGING.FIELD PCARD_FIELD,
- LU_PCARD_STAGING.GL_ACCT_NUM PCARD_GL_ACCT_NUM,
- LU_PCARD_STAGING.HUB_ZONE_SMALL_BIZ_CONCERN_FLG PCARD_HUB_ZONE,
- LU_PCARD_STAGING.MINORITY_OWNED_BIZ_FLG PCARD_MINORITY_OWNED_BIZ_FLG,
- NVL(validate_number(Po_Ln_Itm_Net_Prc_Usd_Amt,'')/DECODE(validate_number(Po_Ln_Itm_Net_Prc_Unit_Qty,''),0,1,validate_number(Po_Ln_Itm_Net_Prc_Unit_Qty,'')),0) po_unit_price_per_1_usd,
- NVL(validate_number(Po_Ln_Itm_Net_Prc_Dc_Amt,'') /DECODE(validate_number(Po_Ln_Itm_Net_Prc_Unit_Qty,''),0,1,validate_number(Po_Ln_Itm_Net_Prc_Unit_Qty,'')),0) po_unit_price_per_1_doc_cur,
- NVL(validate_number(Spend_Bdgt_Usd_Amt,'') /DECODE(validate_number(Spend_Qty,''),0,1, validate_number(Spend_Qty,'')),0) spend_up_per_1_usd_budgt_rate,
- NVL(validate_number(Spend_Usd_Amt,'') /DECODE(validate_number(Spend_Qty,''),0,1, validate_number(Spend_Qty,'')),0) spend_up_per_1_usd_mon_rate,
-350 NVL(validate_number(Spend_Doc_Curncy_Amt,'') /DECODE(validate_number(Spend_Qty,''),0,1, validate_number(Spend_Qty,'')),0) Spend_UP_per_1_Doc_Curr,
- TO_CHAR(TRANSACTION_DATE,'MM-YYYY') MONTH_YEAR,
- LU_PCARD_STAGING.MTRL_GRP_CD PCARD_MTRL_GRP_CD,
- LU_PCARD_STAGING.PAYMENTNET_TRANSTN_LN_ITM_NUM PCARD_PAY_TRANSTN_LN_ITM_NUM,
- LU_PCARD_STAGING.PAYMENTNET_TRANSTN_NUM PCARD_PAY_TRANSTN_NUM,
- LU_PCARD_STAGING.PAYMENTNET_TRANSTN_POST_DT PCARD_PAY_TRANSTN_POST_DT,
- LU_PCARD_STAGING.PCARD_INV_AMT PCARD_INV_AMT,
- LU_PCARD_STAGING.PCARD_INV_CURNCY_CD PCARD_INV_CURNCY_CD,
- LU_PCARD_STAGING.PCARD_INV_DT PCARD_INV_DT,
- LU_PCARD_STAGING.PCARD_INV_LN_ITM_AMT PCARD_INV_LN_ITM_AMT,
- LU_PCARD_STAGING.PCARD_INV_LN_ITM_TAX_AMT PCARD_INV_LN_ITM_TAX_AMT,
- LU_PCARD_STAGING.PCARD_INV_LN_ITM_TAX_CD PCARD_INV_LN_ITM_TAX_CD,
- LU_PCARD_STAGING.PCARD_INV_REF_NUM PCARD_INV_REF_NUM,
- LU_PCARD_STAGING.PCARD_INV_TAX_AMT PCARD_INV_TAX_AMT,
- LU_PCARD_STAGING.PCARD_MERCHANT_NAM PCARD_MERCHANT_NAM,
- LU_PCARD_STAGING.PCARD_OWNR_ID PCARD_OWNR_ID,
- LU_PCARD_STAGING.PCARD_SHORT_TXT PCARD_SHORT_TXT,
- LU_PCARD_STAGING.PCARD_SRC_FILE_NAM PCARD_SRC_FILE_NAM,
- LU_PCARD_STAGING.PLANT_CD PCARD_PLANT_CD,
- LU_PCARD_STAGING.PURCH_GRP_CD PCARD_PURCH_GRP_CD,
- LU_PCARD_STAGING.RCPNT_ID PCARD_RCPNT_ID,
- LU_PCARD_STAGING.REQTN_CRTE_BY_ID PCARD_REQTN_CRTE_BY_ID,
- LU_PCARD_STAGING.REQTN_LN_ITM_NUM PCARD_REQTN_LN_ITM_NUM,
- LU_PCARD_STAGING.REQTN_NUM PCARD_REQTN_NUM,
- LU_PCARD_STAGING.SERV_DISABLE_VETERAN_BIZ_FLG PCARD_SERV_DIS_VET_BIZ_FLG,
- LU_PCARD_STAGING.STATE_CD PCARD_STATE_CD,
- LU_PCARD_STAGING.STATE_CD,
- LU_PCARD_STAGING.VETERAN_OWNED_BIZ_FLG PCARD_VETERAN_OWNED_BIZ_FLG,
- LU_PCARD_STAGING.VNDR_ACCT_NUM PCARD_VNDR_ACCT_NUM,
- LU_PCARD_STAGING.WOMAN_OWNED_BIZ_FLG PCARD_WOMAN_OWNED_BIZ_FLG2,
- DENSE_RANK() OVER (ORDER BY NVL(TO_CHAR(TRANSACTION_DATE, 'YYYYMM'),'190010') DESC) AS DATE_RANK,
- LU_PRICE_BY_UNIT_STAGING.MTRL_GRP PBU_MTRL_GRP,
- LU_PRICE_BY_UNIT_STAGING.MTRL_GRP_DES PBU_MTRL_GRP_DES,
- LU_PRICE_BY_UNIT_STAGING.MTRL_ID PBU_MTRL_ID,
- LU_PRICE_BY_UNIT_STAGING.PLANT PBU_PLANT,
- LU_PRICE_BY_UNIT_STAGING.PLANT_DESC PBU_PLANT_DESC,
- LU_PRICE_BY_UNIT_STAGING.SUPPLIER PBU_SUPPLIER,
- LU_PRICE_BY_UNIT_STAGING.DESCRIPTION PBU_DESCRIPTION,
- LU_PRICE_BY_UNIT_STAGING.UOM PBU_UOM,
- LU_PRICE_BY_UNIT_STAGING.CONTENT_VOLUME PBU_CONTENT_VOLUME,
- LU_PRICE_BY_UNIT_STAGING.UOM_CONTENT_VOLUME PBU_UOM_CONTENT_VOLUME,
- LU_PRICE_BY_UNIT_STAGING.CONTENT_WEIGHT PBU_CONTENT_WEIGHT,
- LU_PRICE_BY_UNIT_STAGING.UOM_CONTENT_WT PBU_UOM_CONTENT_WT,
- LU_PRICE_BY_UNIT_STAGING.PRICE__PACKAGE PBU_PRICE__PACKAGE,
- LU_PRICE_BY_UNIT_STAGING.PRICE_PER_UOM_WT PBU_PRICE_PER_UOM_WT,
- LU_PRICE_BY_UNIT_STAGING.PRICE_PER_UOM_VOL PBU_PRICE_PER_UOM_VOL,
- LU_PRICE_BY_UNIT_STAGING.COMMON_NAME PBU_COMMON_NAME,
- LU_GAC_UOM_REFERENCE_STAGING.LU_GAC_UOM_REFERENCE_ID,
- LU_GAC_UOM_REFERENCE_STAGING.FSL_PART_NUMBER,
- LU_GAC_UOM_REFERENCE_STAGING.SUPPLIER LU_GAC_SUPPLIER,
-400 LU_GAC_UOM_REFERENCE_STAGING.DESCRIPTION LU_GAC_DESCRIPTION,
- LU_GAC_UOM_REFERENCE_STAGING.GAC_MAT_SUBGROUP LU_GAC_MAT_SUBGROUP ,
- LU_GAC_UOM_REFERENCE_STAGING.ACTUAL_FILL LU_GAC_ACTUAL_FILL,
- LU_GAC_UOM_REFERENCE_STAGING.COMMON__UOM LU_GAC_COMMON_UOM,
- LU_GAC_UOM_REFERENCE_STAGING.PACKAGE LU_GAC_PACKAGE
- FROM
- SPEND_STAGING,
- SUPPLIER_STAGING SS1,
- SUPPLIER_STAGING SS2,
- LU_GAC_STAGING,
- lu_card_code_staging,
- LU_PCARD_STAGING,
- LU_PRICE_BY_UNIT_STAGING,
- LU_GAC_UOM_REFERENCE_STAGING
- WHERE SS1.SUPPLIER_ID(+) = SPEND_STAGING.SUPPLIER_ID
- AND SS2.PCARD_INV_REF_NUM(+) = SPEND_STAGING.PCARD_INV_REF_NUM
- AND SS2.PAYMENTNET_TRANSTN_NUM(+) = SPEND_STAGING.PAYMENTNET_TRANSTN_NUM
- AND SS2.PAYMENTNET_TRANSTN_LN_ITM_NUM(+) =
- SPEND_STAGING.PAYMENTNET_TRANSTN_LN_ITM_NUM
- AND lu_card_code_staging.card_code(+) = spend_staging.travel_id
- AND lu_gac_staging.po_short_txt(+) = spend_staging.po_short_txt
- AND LU_PCARD_STAGING.PCARD_INV_REF_NUM(+) = SPEND_STAGING.PCARD_INV_REF_NUM
- AND LU_PCARD_STAGING.PAYMENTNET_TRANSTN_NUM(+) =
- SPEND_STAGING.PAYMENTNET_TRANSTN_NUM
- AND LU_PCARD_STAGING.PAYMENTNET_TRANSTN_LN_ITM_NUM(+) =
- SPEND_STAGING.PAYMENTNET_TRANSTN_LN_ITM_NUM
- AND LU_PRICE_BY_UNIT_STAGING.MTRL_ID(+) = SPEND_STAGING.MTRL_ID_1280
- AND LU_PRICE_BY_UNIT_STAGING.PLANT(+) = SPEND_STAGING.PLANT_CD
- AND lu_gac_uom_REFERENCE_STAGING.fsl_part_number(+) =
-431 SPEND_STAGING.MTRL_ID_1280;Error at Command Line:350 Column:112
Error report:
SQL Error: ORA-01031: insufficient privileges
01031. 00000 - "insufficient privileges"
*Cause: An attempt was made to change the current username or password
without the appropriate privilege. This error also occurs if
attempting to install a database without the necessary operating
system privileges.
When Trusted Oracle is configure in DBMS MAC, this error may occur
if the user was granted the necessary privilege at a higher label
than the current login.
*Action: Ask the database administrator to perform the operation or grant
the required privileges.
For Trusted Oracle users getting this error although granted the
the appropriate privilege at a higher label, ask the database
administrator to regrant the privilege at the appropriate label.
Edited by: Snyds on May 24, 2012 7:46 AMChecking for privileges was the first thing I did.
User has create view and create any view.
Also has alter session privilege which is needed within the validate_number function (see below).
I was able to create the view you suggested.
I believe there is a privilege problem, just cant figure which.
create or replace function validate_number(p_number in varchar2,
p_format_mask in varchar2)
return number
AUTHID CURRENT_USER is
v_number number;
v_mask varchar2(100) := '999999999999999999999.00000000000000000000';
cursor get_number_masks is
select mask,upper(is_i18n) is_i18n from cm_master.format_mask
where type = 'NUMBER' order by sequence, is_i18n;
begin
if p_format_mask is not null then
begin
return to_number(p_number, p_format_mask);
exception
when others then null;
end;
end if;
for a in get_number_masks
loop
if a.is_i18n = 'Y' then
-- We are applying an international number format mask
begin
-- Attempt #1
-- Set the decimal to a ',' and the group separator to a '.'
execute immediate 'alter session set nls_numeric_characters = '',.''';
v_number := to_number(ltrim(rtrim(to_char(to_number(p_number, a.mask),v_mask))),v_mask);
execute immediate 'alter session set nls_numeric_characters = ''.,''';
return v_number;
exception
when others then
-- First Attempt Failed - Attempt #2
-- Set the decimal to a ',' and the group separator to a ' '
begin
execute immediate 'alter session set nls_numeric_characters = '', ''';
v_number := to_number(ltrim(rtrim(to_char(to_number(p_number, a.mask),v_mask))),v_mask);
execute immediate 'alter session set nls_numeric_characters = ''.,''';
return v_number;
exception
when others then
-- Second Attempt Failed - Attempt #3
-- Set the decimal to a '.' and the group separator to a ' '
begin
execute immediate 'alter session set nls_numeric_characters = ''. ''';
v_number := to_number(ltrim(rtrim(to_char(to_number(p_number, a.mask),v_mask))),v_mask);
execute immediate 'alter session set nls_numeric_characters = ''.,''';
return v_number;
exception
when others then null;
end;
end;
end;
else
begin
return to_number(p_number, a.mask);
exception
when others then null;
end;
end if;
end loop;
return null;
exception
when others then return null;
end validate_number;Edited by: Snyds on May 24, 2012 7:48 AM -
Create view link programatically
Hi all,
I am working on this weird requirement.
Basically, I have to create a detail table on a search resullt table. The search result is seeded search, for Item Advance search in Oracle PIM module which is not based upon a VO. The search result table is dynamically built at run time in the EgoItemSearchHelper class and that's where they build the search result VO (EgoItemSearchResultsVO).
Now, I need to access this VO in the controller class, and create a view link programatically between details table VO and this VO. The problem is since I do not have Impl class for the EgoItemSearchResultsVO, how do I accees the column that is the key attribute. Second I do not know how to create view link between the two VOs programatically.
Please help it's urgent.
ThanksPratap, My problem is the seeded VO is in seeded AM and my details VO will be in my custom AM, I don't know if we can have a view link between View objects that are in different AMs.
To bypass that problem, I tried to create a VO in the seeded AM programatically and then created a view link. Now since the AM is seeded, and I am adding my details VO to this AM programatically, I thought of creating a table also programatically on the detais VO.
In the end it does not work, I end up getting a show button on the main table, but when I click I get an error (Cannot find <null> attribute in the EOGITEMSEARCHRESULTVO) which is the seeded VO class. Unfortunately there is no boolean variable on the dynamic seeded VO, so don't know what to put in oatablebean.setDetailViewAttributeName("") method;
Any clues on this, appreciate all responses from the forum gurus.
ViewObject voEmp = oaapplicationmodule.createViewObject("MyEmp", "xxuss.oracle.apps.ego.item.eu.server.DetailsOrderLinesVO");
ViewObject voEmp = am.createViewObject("MyEmp", "xxuss.oracle.apps.ego.item.eu.server.DetailsOrderLinesVO");
AttributeDef[] prjLinkAttrs = new AttributeDef[]{oaapplicationmodule.findViewObject("EgoItemSearchResultsVO").findAttributeDef("INVENTORY_ITEM_ID_B")};
System.out.println("definition for attr = "+ prjLinkAttrs[0]);
AttributeDef[] taskLinkAttrs = new AttributeDef[]{voEmp.findAttributeDef("InvId") };
ViewLink vl = am.createViewLinkBetweenViewObjects("MyLink3",
"DetailInv", // accessor name--more on this below
am.findViewObject("EgoItemSearchResultsVO"), // master
prjLinkAttrs, // department attributes
voEmp, // detail
taskLinkAttrs, // employee attributes
null); // assoc clause
System.out.println("view link =" + vl.getName());
OATableBean tb = (OATableBean)createWebBean(oapagecontext,TABLE_BEAN,null,"table");
tb.setViewUsageName("MyEmp");
OAMessageStyledTextBean beans = (OAMessageStyledTextBean)createWebBean(oapagecontext,MESSAGE_STYLED_TEXT_BEAN,OAWebBeanConstants.VARCHAR2_DATATYPE,"number");
beans.setPrompt("column1");
beans.setViewUsageName("MyEmp");
beans.setViewAttributeName("InvId");
tb.addIndexedChild(beans);
oatablebean.setDetail((OAWebBean)tb);
oatablebean.setDetailViewAttributeName("SelectFlag"); // I just tried this, SelectFlag is not a boolean attribute though, is there a way to create a boolean attribute programatically for seeded VO EGOITEMSEARCHRESULTVO and set it here, will it help
oatablebean.setAllDetailsEnabled(true); -
Hi,
I've a question about best practice to develop a large application with many complex views.
Typically at each time only one views is displayed. User can go from a view to another using a menu bar.
Every view is build with fxml, so my question is about how to create views and how switch from one to another.
Actually I load fxml every time the view is required:
FXMLLoader loader = new FXMLLoader();
InputStream in = MyController.class.getResourceAsStream("MyView.fxml");
loader.setBuilderFactory(new JavaFXBuilderFactory());
loader.setLocation(OptixController.class.getResource("MyView.fxml"));
BorderPane page;
try {
page = (BorderPane) loader.load(in);
} finally {
if (in != null) {
in.close();
// appController = loader.getController();
Scene scene = new Scene(page, MINIMUM_WINDOW_WIDTH, MINIMUM_WINDOW_HEIGHT);
scene.getStylesheets().add("it/myapp/Mycss.css");
stage.setScene(scene);
stage.sizeToScene();
stage.setScene(scene);
stage.sizeToScene();
stage.centerOnScreen();
stage.show();My questions:
1- is a good practice reload every time the fxml to design the view?
2- is a good practice create every time a new Scene or to have an unique scene in the app and every time clear all elements in it and set the new view?
3- the views should be keep in memory to avoid performace issue or it is a mistake? I think that every time a view should be destroy in order to free memory.
Thanks very much
Edited by: drenda81 on 21-mar-2013 10.41>
>
My questions:
1- is a good practice reload every time the fxml to design the view?
2- is a good practice create every time a new Scene or to have an unique scene in the app and every time clear all elements in it and set the new view?
3- the views should be keep in memory to avoid performace issue or it is a mistake? I think that every time a view should be destroy in order to free memory.
In choosing between 1 and 3 above, I think either is fine. Loading the FXML on demand every time will be slightly slower, but assuming you are not doing something unusual such as loading over a network connection it won't be noticeable to the user. Loading all views at startup and keeping them in memory uses more memory, but again, it's unlikely to be an issue. I would choose whichever is easier to code (probably loading on demand).
In choosing between reusing a Scene or creating a new one each time, I would reuse the Scene. "Clearing all elements in it" only needs you to call scene.setRoot(...) and pass in the new view. Since the Scene has a mutable root property, you may as well make use of it and save the (small) overhead of instantiating a new Scene each time. You might consider exposing a currentView property somewhere (say, in your main controller, or model if you have a separate model class) and binding the Scene's root property to it. Something like:
public class MainController {
private final ObjectProperty<Parent> currentView ;
public MainController() {
currentView = new SimpleObjectProperty<Parent>(this, "currentView");
public void initialize() {
currentView.set(loadView("StartView.fxml"));
public ObjectProperty<Parent> currentViewProperty() {
return currentView ;
// event handler to load View1:
@FXML
private void loadView1() {
currentView.set(loadView("View1.fxml"));
// similarly for other views...
private Parent loadView(String fxmlFile) {
try {
Parent view = FXMLLoader.load(getClass().getResource(fxmlFile));
return view ;
} catch (...) { ... }
}Then your application can do this:
@Override
public void start(Stage primaryStage) {
Scene scene = new Scene();
FXMLLoader loader = new FXMLLoader(getClass().getResource("Main.fxml"));
MainController controller = (MainController) loader.getController();
scene.rootProperty().bind(controller.currentViewProperty());
// set scene in stage, etc...
}This means your Controller doesn't need to know about the Scene, which maintains a nice decoupling. -
Hello
I have a dataset that was created at design time
but - after I run the app, it randomly creates a table based on The Users name
since I do not know the users name before had, the table is not part of my existing dataset
(I actually used an insert into sql nonquery to just make this table a copy of the masterUserTable)
Now - I have a binding navigator on my form, that is originally bound to masterUserTable, but my goal is to make it bound to the users table (let's say GabrielUserTable)
I thought I did so with this code:
'TODO: This line of code loads data into the 'MyLearningDBDataSet.masterUserTable' table. You can move, or remove it, as needed.
Me.MyMainDBTableAdapter.Fill(Me.MyLearningDBDataSet.masterUserTable)
Dim ThisNewVariable As String = MyUserNameIs & "UserTable"
Dim ThisNewTableName As New DataTable
Me.MyLearningDBDataSet.masterUserTable.TableName = ThisNewVariable
Me.MyMainDBTableAdapter.Fill(Me.MyLearningDBDataSet.masterUserTable)
that appeared to do the trick (but if it is incorrect please advice on the proper way to add a table made at runtime to a users existing datset)
Else where in my code I successfully execute the following NonQuery :
SqlString= "DELETE FROM " & MyUserNameIs & "UserTable" & vbCrLf &
"WHERE vState='" & txtStateInfo.Text & "';"
I check in Visual Studio 2013 that the row was deleted from the "GabrielUserTable" (Gabriel is the current value of MyUserNameIs) by using the Server Explorer and right clicking
on the table and choosing show talbe data
But the MyMainDBBindingNavigator is still showing the item I deleted.
So after searching for answers - I created a new button for testing and added the following code to test if it would work
Me.Validate()
Me.MyMainDBBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.MyLearningDBDataSet)
but the data is still shwoing after deleting it with my NonQuery
Please Help!Hi genterprise,
>> Now - I have a binding navigator on my form, that is originally bound to masterUserTable, but my goal is to make it bound to the users table (let's say GabrielUserTable)
In my option, if you want to rebind the users table to the navigator, you need to set the BindingNavigator.BindingSource. Based on your description, it seems that you did not reset the datasoure of the MyMainDBBindingNavigator. It was the original datasource
of the masterUserTable. For more details about BindingNavigator.BindingSource Property. You could refer the link below:
# BindingNavigator.BindingSource Property
https://msdn.microsoft.com/en-us/library/system.windows.forms.bindingnavigator.bindingsource%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
Best Regards,
Edward
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey. -
How to generate auto incremented ID using a user who has create,view permissions only
Hi
i am using the builtin ID
field to achieve generate sequence no in a list
every time a new item created in list
for this i used update list item action in workflow, its working fine but
i have a problem here user who login into sharepoint site and create a new list item
has only Create ,View Permissions only,
i created a Requesters permissions level with (Create,view ) rights only i did not added Edit Rights
because this user only create list items only he will not edit the list item.
adilHello adil,
If user is having "Add Items" rights then item ID should be created automatically and this is auto generate column in list.
Why you are using "update list item action"? Are you updating any other field?
If updating any other column value then add Impersonation steps in your code to update item.
http://sharepoint.stackexchange.com/questions/16232/impersonation-step-in-sharepoint-designer-2010
http://sharepointgroup.wordpress.com/2012/05/10/how-to-use-work-flow-to-change-list-item-permissions-by-sharepoint-designer-2010/
Hope it could help
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help -
DB6 Installation - error on phase VIEW (CREATE VIEW "/BEV1/LAVMVA1_V)
Dear all,
I install LNX X86_64, DB6 - ERP 6.0 EHP4, during phase IMPORT ABAP I've got error in SAPVIEW.log:
usr/sap/SID/SYS/exe/run/R3load: sccsid @(#) $Id: //bas/701_REL/src/R3ld/R3load/R3ldmain.c#8 $ SAP
/usr/sap/SID/SYS/exe/run/R3load: version R7.01/V1.4 [UNICODE]
Compiled Dec 25 2009 23:46:01
/usr/sap/SID/SYS/exe/run/R3load -i SAPVIEW.cmd -dbcodepage 4103 -l SAPVIEW.log -stop_on_error -loadprocedure fast LOAD
(DB) INFO: connected to DB
(DB) ERROR: DDL statement failed
( DROP VIEW "/BEV1/LAVMVA1_V" )
dsql_exec_immediate returned DS_DBOBJECTUNKNOWN
(IMP) INFO: a failed DROP attempt is not necessarily a problem
(DB) ERROR: DDL statement failed
( CREATE VIEW "/BEV1/LAVMVA1_V" ( "MANDT", "BSTNK", "VKORG", "VTWEG", "SPART", "VKBUR", "VKGRP", "KUNNR", "ERNAM", "BSTDK", "AUART", "VBELN" ) AS SELECT T0001."MANDT", T0001."BSTNK", T0001."VKORG", T0001."VTWEG", T0001."SPART", T0001."VKBUR", T0001."VKGRP", T0001."KUNNR", T0001."ERNAM", T0001."BSTDK", T0001."AUART", T0002."VBELN" FROM "VBAK" T0001, "VBUK" T0002 WHERE T0002."MANDT" = T0001."MANDT" AND T0002."VBELN" = T0001."VBELN" AND ( T0002."VBOBJ" = 'A' OR T0002."VBOBJ" = 'L' ) )
dsql_exec_immediate returned DS_DBOBJECTUNKNOWN
(DB) INFO: disconnected from DB
/usr/sap/SID/SYS/exe/run/R3load: job finished with 1 error(s)
/usr/sap/SID/SYS/exe/run/R3load: END OF LOG: 20100119153412
I have changed R3load, sapinst to newest version, space is enough, tablespaces are not full.
Do you have any idea what is cause of error and how to solve it?
Any help is appreciated.
Regards,
RomanHi Frank,
thanks for your very fast hints.
I have checked .log files SAPxxxx.log (SAP0000, SAPAPPL0, SAPAPPL1, ...) but there isnt any entry with VBAK.
When I entered under <sid>adm command: db2 describe table sap<sid>.VBAK it takes a long time wihtout any result.
Thanks a lot for your help.
Roman
Edited by: Roman Mikolas on Jan 19, 2010 4:27 PM
Edited by: Roman Mikolas on Jan 19, 2010 4:27 PM -
Create View Object programattically from XML input
Hi,
I have requirement to create view object from xml at run time in ADF application. is there any way to create view object dynamically in java program from xml?
My requirement is to call a webservice and generate view object from the response of the web service call.
ThanksI want to create view objects from different web services and the same will be available to the developer at the time of development. I don't want to create web service proxies for each of the web service. this will simplify the developers task to create proxy and data controls. the one thing developer has to do is select the service and base on the service the view objects will be created to develop pages accordingly.
Maybe you are looking for
-
Urgent help required in creating matrix table report
Hi I need a report in the below format with subtotal and total and custom order of columns and rows. I tried in using grouping and conditional region format but i am not getting the exact result. product2 product 1 product 3 Total Asia
-
Variable size item formulla key funtion module,
I am developing user interface for manual reservation (cutsom development). User wants to calculate quantity of material if he enters size1, size2 and size3. Also he wants that a formula key option to be provided so that he can mention conversion for
-
DB link problem connecting to DB
tnsping is ok connect from client to DB server is ok using the connect string. But when i am using to connect to the database using database link i am getting the error. C:\>tnsping srvc1 TNS Ping Utility for 32-bit Windows: Version 10.1.0.2.0 - Prod
-
In preferences what does "Override automatic cache management" mean and do?
I was wondering what "Override automatic cache management" means and does.
-
Vibration Doesn't work with incoming Calls
On my iphone4 when I turn my Vibration ON it doesn't repond to normal calls, but it respond to rest. tried everything else except Restore. I dont want to restore coz I need all my messages, and other data. any ideas?????