Nested View Input
Hey guys, I'm confused about properly handling input with multiple views. Hopefully I can explain the situation clearly.
ViewA - a "root" view with various images and labels
ViewB - an "overlay" view that contains two UIButton elements (and nothing else)
If I set "viewController.view = ViewB" then, without ViewB handling touches directly, the buttons work. However if I do "(ViewA addsubview:ViewB); viewController.view = viewA" then I can see the two buttons from ViewB but I can not press them.
So how do I get the UIButton elements in ViewB to handle touch events when ViewA is a superview to ViewB? Thanks guys!
That's not it unfortunately. ={
ViewA only has a single subview, ViewB, so it must already be in the front. It appears that the events are going to ViewA but never to ViewB. Or, more specifically, never to the UIButton elements inside ViewB.
Similar Messages
-
We've got some performance problems when using a complex view that queries against a couple nested views.
We need to use views because we have two outer joins against the same table.
Here's a simplified version:
create or replace view_b as
select a1, b1, c1, d1
from table_c, table_d, view_a
where table_c.c1 = view_a.a1(+)
and table_c.c2= table_d.d1
create or replace view_a as
select a1
from table_a, table_b
where table_a.a1 = table_b.b1(+)
A query that may present problems with large amounts of data is:
select a1, b1
from view_b
where a1 = 1234;
Do indexes of nested views get utilized? Any suggestions?
ThanksHow selective is INSTRUMENT_ID? Is that a primary key? Or are there many rows in the INSTRUMENT table with an INSTRUMENT_ID of 1?
Are the statistics on your table and your index up to date? How, precisely, were statistics gathered?
What version of Oracle are you using? If you are using something earlier than 11.1, it's entirely possible that you have a bind variable peeking problem.
Realistically, you would want Oracle to use two different query plans for this statement depending on the value of the bind variable. If you pass in a NULL, you'd want Oracle to do a table scan. If you pass in a value, you'd want Oracle to do an index scan. Prior to 11.1, when this statement is first parsed, Oracle looks at the bind variable you passed in and picks the best plan for that bind variable value. When you subsequently execute this statement with other bind variable values, that first query plan is used. Thus, if the first time this code was executed you passed in a NULL, it would have made sense for Oracle to choose the table scan and all subsequent executions (until the query was aged out of the shared pool) would continue to use that query plan.
Oracle 11.1 introduced the ability to have multiple query plans for the same query depending on the bind variable values that were passed in which may well alleviate the problem you're seeing.
Justin -
Hello everyone, we are having a performance problem with oracle optimizing nested views. Some with outer joins. One of the guys just sent me the following statement and I'm wondering if anyone can tell me if it sounds correct. The query is about 300 lines long so I won't post it here, but hopefully someone can still help with sheding some light on the statement below.
When Oracle executes a view it optimizes the query plan only for the columns of the view which are used and eliminates unnecessary joins, function calls, etc.. In this case the join is a LEFT OUTER i.e. optional and since the columns are not used I would hope Oracle would eliminate this from the plan but… it didn’t.
Thanks for any help,
Michael CunninghamDepending on the version of Oracle (this was introduced in 10.2), it is possible that Oracle can eliminate a join. The Oracle Optimizer group has a nice blog post that discusses the requirements for join elimination to happen. Basically, Oracle has to be sure that the additional columns aren't being used but also that the join does not change the number of rows that might be returned.
Justin -
Using SXMB_MONI to view input and output messages
Within XI can I view both the input message and the output message ?
I have an IDOC Order being transformed into XML format. Using SXMB_MONI I can see the transaction and the input IDOC Order but cannot see the resulting output XML Order. Is it possible to do or is there some other transaction?Hi,
Check in SXMB_MONI for xml message it is appearing the pipeline steps , if not do the below setting to appearing piepline steps in moni.
Tcode : SXMB_ADM
Execute integration engine and configuration
click on specific configuration
go to change mode
Category : RUNTIME
Parameter : LOGGING
Current value : 1
then save..test the scenario once again.
now go to moni double click the message check the xml message has left hand side pipeline steps are appearing..
Expand Inbound mesage -> Expand the Payloads -> Double maindocument you will find the input payload
Expadn Technical routing -> Expand the Payloads -> Double maindocument you will find the output payload
then you will find the output xml payload.
Regards,
Venu. -
Push view, input data, Pop it and keep the data ... How ?
Simple example ...
I need to get data from one view into another as if the one view was a pop up.
example ...
I have a baseView with a button labeled 'SELECT DATE'.
When user clicks button, they see dateView and they input the date there.
When done selecting the date, they click OK on dateView which should take them back to baseView passing the selected date.
What is the best approach for this?
- use a sharedObject to store the date and pick it up when back on base?
- pop baseView then push dateView then on OK push baseView with data?
- don't use a dateView but rather a dateEntry popup (like a custom alert)?
There are many ways I could go with this, would like to know what the experts suggest though.
Thanks.OK. Looks like I found the answer and then some.
Glad to know I was not the only one looking for something like that.
http://remotesynthesis.com/post.cfm/passing-data-on-pop-methods-in-mobile-flex
and
http://www.remotesynthesis.com/post.cfm/passing-data-across-views-in-flex-mobile
Thanks RemoteSynthesis.com -
Problem in calling standard view in nested view container
Hi Experts,
We have a standard SAP component in which there is view containing a TABStrip. In one of the tabs there is a View container. This view container calls another view containing a view container, which in turn calls another standard view of standard component SALV_WD_TABLE. The whole structure is as below:
MAIN(View)->VC_container1(view container)->View1(called view)->VC_Container2(View container in called view)->Table(standard view of SALV_WD_TABLE).
Now we are trying to add one more tab in the same tabstrip and trying to call the the same TABLE view of component SALV_WD_TABLE in the same manner described above. It is allowing us to add the view but when we are activating the enhancement the standard view TABLE of component SALV_WD_TABLE gets disappeared. Can anybody suggest what to do.
Thanks and Regards,
Vaibhav Tiwari.Hi Vaibhav,
My Ques is that are your using the same component usage of salv_wd_table for the Second tab you have added.
Because you are using the component usage of salv_wd_table already in the first tab. So when you are goinig to use the same component usage for the second tab then this problem might will happn i.e. the table is disappeared in the second tab.
Regards
Manoj Kumar -
Hello,
I have a strange behavior in JDeveloper 10.1.3.1.0.
I have two View Objects, a parent and a child, that are linked by a View Link.
Although my Application Module instanciates only the parent View Object, I can still see the child View Object in the Data Control Palette.
I've checked in JDev 10.1.3 SU5 and this behavior doesn't occur.
Is this a bug ?
Thanks,
Seb.Hi,
I tried to reproduce but cannot. I created a m/d ViewObject that are linked by a ViewLink. I removed the detail from the master tree in the AppModule configuration so that only the master instance is left. Opening the DataControl palette, I only see the master view.
Is the project one that you upgraded from 10.1.3.0? If yes, please try and reproduce in a new workspace
Frank -
Does any one know how to wrap a view in Oracle, I know it is not possible, yet. Are there any third party software to wrap the logic in the view.
Thanks,
SanjayYour best bet is to write a view that queries the source tables and contains any necessary business logic
CREATE VIEW VBASE AS SELECT A.COLUMN_A FROM TABLE_1 A, TABLE_2 B, TABLE_3 C WHERE A.ID = B.ID AND B.ID = C.ID;
create a view for exposure to the user that queries the base view.
CREATE VIEW VSECURE AS SELECT COLUMN_B FROM VBASE;
and grant privileges to VSECURE.
GRANT SELECT ON VSECURE TO SECURE_USER;
This will allow the user to see, query, and describe VSECURE without seeing the definition for VBASE.
The advantage of the this approach is that the query engine can still push predicates down into the base view to optimize the performance or the query where as this is limited with the pipeline function and can become a tuning headache.
eg.
SQL> -----------------------------------------
SQL> -- create some tables
SQL> -----------------------------------------
SQL> CREATE TABLE table_1(ID NUMBER, MESSAGE VARCHAR2(100))
Table created.
SQL> CREATE TABLE table_2(ID NUMBER, message2 VARCHAR2(100))
Table created.
SQL> CREATE TABLE table_3(ID NUMBER, message3 VARCHAR2(100))
Table created.
SQL> -----------------------------------------
SQL> -- populate tables with some data
SQL> -----------------------------------------
SQL> INSERT INTO table_1
SELECT ROWNUM,
CASE
WHEN MOD ( ROWNUM, 50 ) = 0 THEN 'HELLO there joe'
ELSE 'goodbye joe'
END
FROM DUAL
CONNECT BY LEVEL < 1000000
999999 rows created.
SQL> INSERT INTO table_2
SELECT ROWNUM,
CASE
WHEN MOD ( ROWNUM, 50 ) = 0 THEN 'how are you joe'
ELSE 'good to see you joe'
END
FROM DUAL
CONNECT BY LEVEL < 1000000
999999 rows created.
SQL> INSERT INTO table_3
SELECT ROWNUM,
CASE
WHEN MOD ( ROWNUM, 50 ) = 0 THEN 'just some data'
ELSE 'other stuff'
END
FROM DUAL
CONNECT BY LEVEL < 1000000
999999 rows created.
SQL> -----------------------------------------
SQL> --create base view
SQL> -----------------------------------------
SQL> CREATE OR REPLACE VIEW vbase AS
SELECT a.MESSAGE,
c.message3
FROM table_1 a,
table_2 b,
table_3 c
WHERE a.ID = b.ID
AND b.ID = c.ID
View created.
SQL> -----------------------------------------
SQL> --create secure view using base view
SQL> -----------------------------------------
SQL> CREATE OR REPLACE VIEW vsecure AS
SELECT MESSAGE,
message3
FROM vbase
View created.
SQL> -----------------------------------------
SQL> -- create row type for pipeline function
SQL> -----------------------------------------
SQL> CREATE OR REPLACE TYPE vbase_row
AS OBJECT
message varchar2(100),
message3 varchar2(100)
Type created.
SQL> -----------------------------------------
SQL> -- create table type for pipeline function
SQL> -----------------------------------------
SQL> CREATE OR REPLACE TYPE vbase_table
AS TABLE OF vbase_row;
Type created.
SQL> -----------------------------------------
SQL> -- create package
SQL> -----------------------------------------
SQL> CREATE OR REPLACE PACKAGE pkg_getdata AS
FUNCTION f_get_vbase
RETURN vbase_table PIPELINED;
END;
Package created.
SQL> -----------------------------------------
SQL> -- create package body with pipeline function using same query as vbase
SQL> -----------------------------------------
SQL> CREATE OR REPLACE PACKAGE BODY pkg_getdata AS
FUNCTION f_get_vbase
RETURN vbase_table PIPELINED IS
CURSOR cur IS
SELECT a.MESSAGE,
c.message3
FROM table_1 a,
table_2 b,
table_3 c
WHERE a.ID = b.ID
AND b.ID = c.ID;
BEGIN
FOR rec IN cur
LOOP
PIPE ROW ( vbase_row ( rec.MESSAGE, rec.message3 ) );
END LOOP;
END;
END pkg_getdata;
Package body created.
SQL> -----------------------------------------
SQL> -- create secure view using pipeline function
SQL> -----------------------------------------
SQL> CREATE or replace VIEW vsecure_with_pipe AS
SELECT *
FROM TABLE ( pkg_getdata.f_get_vbase ( ) )
View created.
SQL> -----------------------------------------
SQL> -- this would grant select on the 2 views, one with nested view, one with nested pipeline function
SQL> -----------------------------------------
SQL> GRANT SELECT ON vsecure TO test_user
Grant complete.
SQL> GRANT SELECT ON vsecure_with_pipe TO test_user
Grant complete.
SQL> explain plan for
SELECT *
FROM vsecure
WHERE MESSAGE LIKE 'HELLO%'
Explain complete.
SQL> SELECT *
FROM TABLE ( DBMS_XPLAN.display ( ) )
PLAN_TABLE_OUTPUT
Plan hash value: 3905984671
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 16939 | 2365K| | 3098 (3)| 00:00:54 |
|* 1 | HASH JOIN | | 16939 | 2365K| 2120K| 3098 (3)| 00:00:54 |
|* 2 | HASH JOIN | | 24103 | 1835K| | 993 (5)| 00:00:18 |
|* 3 | TABLE ACCESS FULL| TABLE_1 | 24102 | 1529K| | 426 (5)| 00:00:08 |
| 4 | TABLE ACCESS FULL| TABLE_2 | 1175K| 14M| | 559 (3)| 00:00:10 |
| 5 | TABLE ACCESS FULL | TABLE_3 | 826K| 51M| | 415 (3)| 00:00:08 |
Predicate Information (identified by operation id):
1 - access("B"."ID"="C"."ID")
2 - access("A"."ID"="B"."ID")
3 - filter("A"."MESSAGE" LIKE 'HELLO%')
Note
PLAN_TABLE_OUTPUT
- dynamic sampling used for this statement
23 rows selected.
SQL> -----------------------------------------
SQL> -- note that the explain plan shows the predicate pushed down into the base view.
SQL> -----------------------------------------
SQL> explain plan for
SELECT count(*)
FROM vsecure_with_pipe
WHERE MESSAGE LIKE 'HELLO%'
Explain complete.
SQL> SELECT *
FROM TABLE ( DBMS_XPLAN.display ( ) )
PLAN_TABLE_OUTPUT
Plan hash value: 19045890
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 2 | 15 (0)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 2 | | |
|* 2 | COLLECTION ITERATOR PICKLER FETCH| F_GET_VBASE | | | | |
Predicate Information (identified by operation id):
2 - filter(VALUE(KOKBF$) LIKE 'HELLO%')
14 rows selected.
SQL> -----------------------------------------
SQL> -- note that the filter is applied on the results of the pipeline function
SQL> -----------------------------------------
SQL> set timing on
SQL> SELECT count(*)
FROM vsecure
WHERE MESSAGE LIKE 'HELLO%'
COUNT(*)
19999
1 row selected.
Elapsed: 00:00:01.42
SQL> SELECT count(*)
FROM vsecure_with_pipe
WHERE MESSAGE LIKE 'HELLO%'
COUNT(*)
19999
1 row selected.
Elapsed: 00:00:04.11
SQL> -----------------------------------------
SQL> -- note the difference in the execution times.
SQL> ----------------------------------------- -
How to get Input field value?
Hi All,
I have some problem in getting of input value from View to customcontroller.
My problem is I have created a Input field in the view and if Iam giving the value to that field I can capture the value from View to customcontroller and send it as BAPI input.But My input filed is in the view Context.
How can i capture InputFiled value from View to CustomController.
Advance thanks
Nageswara.
Message was edited by: nageswar mandapatiThanks for your response Patrick,
In my customcontrollerView all my BAPI mathods instances and execute methods are declared.All the attributes directly getting from model class.
But I have two views , in first view I created a input field(for that i created valueAttribute in that context).
Here I want give the conditions If the input field is empty then directly call the execute method of BAPI.
Otherwise give any input to the inputfiled then capture that value and send it input to BAPI from view to BAPI.
In my customcontroller
BAPI b = new BAPI();
b.Param1();
b.param2();
and
execute BAPI()
I done like this.
How can i capture the view input value how to send as a b.parama();
Please guide me .
Any snippests appriciate.
Thanks
nageswara. -
Passing multiple values to a single input parameter
Hi folks,
I have a Microstrategy query successfully passing input parameter to a calculation view. For example I can pass a movement type to a material movements calculation view input parameter. However if I try to pick more than one movement type the query then fails;
Generated SQL that works looks like this;
select
sum(a11.TOTALQUANTITY) WJXBFS1
from
"_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER"
('PLACEHOLDER' = ('$$MoveType$$', '101')
a11
When choosing more than one value in Microstrategy the SQL now fails and looks like this;
select
sum(a11.TOTALQUANTITY) WJXBFS1
from
"_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER"
('PLACEHOLDER' = ('$$MoveType$$', '101'),
'PLACEHOLDER' = ('$$MoveType$$', '103'))
a11
If I cut and paste the SQL and run directly in HANA studio the error is;
Could not execute 'select sum(a11.TOTALQUANTITY) WJXBFS1 from "_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER" ...' in 66 ms 361 µs .
SAP DBTech JDBC: [2048]: column store error: search parameter error: [2018] A received argument has an invalid value;TABLE/VIEW parameter: ( 'PLACEHOLDER'='$$MoveType$$, 103') not supported
Is it possible to pass multiple values in a single parameter? I'm using SP67 for this test.
Thanks,
-PatrickRavi, also to answer one of your questions about how this will work in Microstrategy; I just heard back from my Microstrategy developer and he is trying MSTR Freeform SQL query with syntax like this;
select (sumPAR_TEST.TOTALQUANTITY TOTALQUANTITY
from "_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER"
('PLACEHOLDER' =('$$MoveType$$', '[Movement Type]')) PAR_TEST
In this example [Movement Type] is the microstrategy prompt. Unfortunately though it translates like this which is missing extra single quotes around each value;
select sum(PAR_TEST.TOTALQUANTITY) TOTALQUANTITY
from "_SYS_BIC"."development.pr1959/CA_TEST_PASS_PARAMETER"
('PLACEHOLDER' = ('$$MoveType$$', ''101', '102'')) PAR_TEST
instead of what we need which is;
('PLACEHOLDER' = ('$$MoveType$$', '''101'', ''102''')) PAR_TEST
So at this point we are not sure if this will be possible or not.
-Patrick -
How to include one view into another view
Hi SDN's,
Could any please tell me,How to include one view into another view.
In my requirment.I want to create a 'Z' view for an interface .In that view i have to take,
1) Ship-to-email adrr by
LIKP-KUNNR -> KNA1-ADRNR
KNA1-ADRNR -> ADR6-ADDRESNUMBER.
2) E-mail addr of person who created the document.i.e
LIKP-ERNAM -> USR21-BNAME.
USR21-ADDRESNUMBER -> ADR6-ADDRESNUMBER
USR21-PERSNUMBER -> ADR6-PERSNUMBER.
In both the case we have to pass ADDRESSNUMBER to ADR6 table.
If we pass these condition it fails,B'Coz at a time it passes Two ADDRESSNUMBER and a PERSNUMBER.
So i created two which fetches only the email addr of person who created the document.and another view fetches Ship-to-email addr.
Now i want to include the second view into first view . Is it possible?or please
tell me someother way to get these email addresses in a single view.hi
as per my knowledge, nested views are not possible. However, while creating a new view, selection method will not giv u option to select the already created view(S) except the tables..i think so.
regards,
shamim -
Input Parameter Mapping is not working in Sap HANA
Hi, We created on ANALYTICAL view(A) with Input Parameters, on top of Analytical view created one Calculation view(B) and mapped Calculation view input parameter with Analytical view input paramter and its working fine. Finally we created one more calculation view on top existing calculation view(B) and mapped with corresponding input parameters. Input parameter mapping is working fine in between A(analytical view) and --------> B (first Calc view) but input parameter mapping is not working properly in between B(first Calc View)-----------C(second Calc View). it is giving all data whatever is coming from Calc View B. Kindly help us to resolve this.
Hi,
Write c in small for Command,
theButton.mappingOfOnAction().addParameter("command","Save");
Regards,
Murtuza -
Hi,
I've several views which i want to re-use but when i add a view which I have already used, i get the error:
Processing HTTP request to servlet [dispatcher] finished with error.
The error is: com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: duplicate usage of view .BasketView
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:515)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:397)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:554)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:397)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:554)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:397)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:554)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:421)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:41)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.displayToplevelComponent(ClientComponent.java:135)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:404)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:618)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Why cant I re-use my view?
much thanks,
HugoHallo Nikolay,
my "Modeling Web Dynpro View Composition" tutorial was removed from the Web Dynpro Java sample applications page on SDN because I applied ViewSets and ViewAreas inside windows instead of ViewContainer UI elements inside specific Web Dynpro layout views. Except this sub-optimal (as less flexible; you have more layout and sizing possibilities with ViewContainer UI Elements in virtual layout cells of container UI elements with Matrix or Grid layout in comparison to ViewAreas in ViewSets of a window) technique the tutorial is still very valuable for Web Dynpro application developers. As an example, it demonstrates the concept of creating multiple instances of the same visual component based on separate component usages. This principle is absolutely crucial for developing component-based Web Dynpro applications.
You can read the tutorial description with all related links below.
Regards, Bertram
View Compositions
This Web Dynpro sample application implements a complex view composition. The term view composition describes a set of all view assemblies that can be accessed by navigation. A view assembly consists of normal Web Dynpro views and interface views of Web Dynpro components within the browser window. You can model view compositions in the Navigation Modeler as part of the Web Dynpro tools.
The following options are applicable to model view compositions:
Embedding several views in view setsm, Embedding view sets in each other, Embedding visible Web Dynpro components using their component interface views
In this tutorial, a Web Dynpro component is embedded using two instances.
Embedding views and view sets in view layouts by using the ViewContainerUIElement
Code Sample
The ready-to-use project is available to download from SDN [13TutWD_ViewComposition.zip|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/business_packages/a1-8-4/13tutwd_viewcomposition.zip]
Corresponding Tutorial: [Modeling View Compositions in Web Dynpro|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/2cceb190-0201-0010-be88-acdbeb2ad65f]
Details
Project Template: The initial project (starting point for this tutorial) is available to download from SDN: [13TutWD_ViewComposition_Init.zip|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/business_packages/a1-8-4/13tutwd_viewcomposition_init.zip]
Level of complexity: Expert
Key features covered: view sets, view assembly, view composition, nested view sets, component interface view, component usage, component reuse, multi-instance capability of Web Dynpro components, UI element Image, UI element ViewContainerUIElement, calculated context attributes
Time required for completion: 2 hrs
Created by: SAP AG -
DML operations on multiple views
Hi all.
I can't understand updateing the data on views which created by multiple table joining. Which columns I can update and why I'm getting
ORA-01779: cannot modify a column which maps to a non key-preserved table error??
Can anybody show me explanation with examples??
Thanks...Modifying a Join View
A modifiable join view is a view that contains more than one table in the top
level FROM clause of the SELECT statement, and that does not contain any of
the following:
- DISTINCT operator
- aggregate functions: AVG, COUNT, GLB, MAX, MIN, STDDEV, SUM, or VARIANCE
- set operations: UNION, UNION ALL, INTERSECT, MINUS
- GROUP BY or HAVING clauses
- START WITH or CONNECT BY clauses
- ROWNUM pseudocolumn
With some restrictions, you can modify views that involve joins. If a view is
a join on other nested views, then the other nested views must be mergeable
into the top level view.
The examples in following sections use the EMP and DEPT tables. These examples
work only if you explicitly define the primary and foreign keys in these
tables, or define unique indexes. Following are the appropriately constrained
table definitions for EMP and DEPT:
CREATE TABLE dept
deptno NUMBER(4) PRIMARY KEY,
dname VARCHAR2(14),
loc VARCHAR2(13)
CREATE TABLE emp
empno NUMBER(4) PRIMARY KEY,
ename VARCHAR2(10),
job varchar2(9),
mgr NUMBER(4),
hiredate DATE,
sal NUMBER(7,2),
comm NUMBER(7,2),
deptno NUMBER(2),
FOREIGN KEY (DEPTNO) REFERENCES DEPT(DEPTNO)
You could also omit the primary and foreign key constraints listed above, and
create a UNIQUE INDEX on DEPT (DEPTNO) to make the following examples work.
CREATE OR REPLACE VIEW emp_dept AS
SELECT empno, ename, sal, e.deptno, dname, loc
FROM EMP e, DEPT d
WHERE e.deptno = d.deptno;
Key-Preserved Tables
The concept of a key-preserved table is fundamental to understanding the
restrictions on modifying join views. A table is key preserved if every key of
the table can also be a key of the result of the join. So, a key-preserved
table has its keys preserved through a join.
Note: It is not necessary that the key or keys of a table be selected for it
to be key preserved. It is sufficient that if the key or keys were selected,
then they would also be key(s) of the result of the join.
Attention: The key-preserving property of a table does not depend on the
actual data in the table. It is, rather, a property of its schema and not of
the data in the table. For example, if in the EMP table there was at most one
employee in each department, then DEPT.DEPTNO would be unique in the result of
a join of EMP and DEPT, but DEPT would still not be a key-preserved table.
If you SELECT all rows from EMP_DEPT view, the results are:
SELECT * FROM EMP_DEPT;
EMPNO ENAME SAL DEPTNO DNAME LOC
7369 SMITH 800 20 RESEARCH DALLAS
7499 ALLEN 1600 30 SALES CHICAGO
7521 WARD 1250 30 SALES CHICAGO
7566 JONES 2975 20 RESEARCH DALLAS
7654 MARTIN 1250 30 SALES CHICAGO
7698 BLAKE 2850 30 SALES CHICAGO
7782 CLARK 2695 10 ACCOUNTING NEW YORK
7788 SCOTT 3000 20 RESEARCH DALLAS
7839 KING 5500 10 ACCOUNTING NEW YORK
7844 TURNER 1500 30 SALES CHICAGO
7876 ADAMS 1100 20 RESEARCH DALLAS
7900 JAMES 950 30 SALES CHICAGO
7902 FORD 3000 20 RESEARCH DALLAS
7934 MILLER 1430 10 ACCOUNTING NEW YORK
14 rows selected.
In this view, EMP is a key-preserved table, because EMPNO is a key of the EMP
table, and also a key of the result of the join. DEPT is not a key-preserved
table, because although DEPTNO is a key of the DEPT table, it is not a key of
the join.
DML Statements and Join Views
=============================
!!!!!! IMPORTANT !!!!!! IMPORTANT !!!!!! IMPORTANT !!!!!! IMPORTANT !!!!!!
Any UPDATE, INSERT, or DELETE statement performed on a join view can modify
only *** one *** underlying base table.
!!!!!! IMPORTANT !!!!!! IMPORTANT !!!!!! IMPORTANT !!!!!! IMPORTANT !!!!!!
UPDATE Statements:
The following example shows an UPDATE statement that successfully modifies the
EMP_DEPT view:
UPDATE emp_dept
SET sal = sal * 1.10
WHERE deptno = 10;
The following UPDATE statement would be disallowed on the EMP_DEPT view:
UPDATE emp_dept
SET loc = 'BOSTON'
WHERE ename = 'SMITH';
This statement fails with an ORA-01779 error (cannot modify a column which
maps to a non key-preserved table), because it attempts to modify the
underlying DEPT table, and the DEPT table is not key preserved in the EMP_DEPT
view.
In general, all modifiable columns of a join view must map to columns of a
key-preserved table. If the view is defined using the WITH CHECK OPTION
clause, then all join columns and all columns of repeated tables are not
modifiable.
So, for example, if the EMP_DEPT view were defined using WITH CHECK OPTION,
the following UPDATE statement would fail:
UPDATE emp_dept
SET deptno = 10
WHERE ename = 'SMITH';
The statement fails because it is trying to update a join column.
DELETE Statements:
You can delete from a join view provided there is one and only one
key-preserved table in the join.
The following DELETE statement works on the EMP_DEPT view:
DELETE FROM emp_dept
WHERE ename = 'SMITH';
This DELETE statement on the EMP_DEPT view is legal because it can be
translated to a DELETE operation on the base EMP table, and because the EMP
table is the only key-preserved table in the join.
In the following view, a DELETE operation cannot be performed on the view
because both E1 and E2 are key-preserved tables:
CREATE VIEW emp_emp AS
SELECT e1.ename, e2.empno, deptno
FROM emp e1, emp e2
WHERE e1.empno = e2.empno;
If a view is defined using the WITH CHECK OPTION clause and the keypreserved
table is repeated, then rows cannot be deleted from such a view:
CREATE VIEW emp_mgr AS
SELECT e1.ename, e2.ename mname
FROM emp e1, emp e2
WHERE e1.mgr = e2.empno
WITH CHECK OPTION;
No deletion can be performed on this view because the view involves a
self-join of the table that is key preserved.
INSERT Statements:
The following INSERT statement on the EMP_DEPT view succeeds:
INSERT INTO emp_dept (ename, empno, deptno)
VALUES ('KURODA', 9010, 40);
This statement works because only one key-preserved base table is being
modified (EMP), and 40 is a valid DEPTNO in the DEPT table (thus satisfying
the FOREIGN KEY integrity constraint on the EMP table).
An INSERT statement like the following would fail for the same reason that
such an UPDATE on the base EMP table would fail: the FOREIGN KEY integrity
constraint on the EMP table is violated.
INSERT INTO emp_dept (ename, empno, deptno)
VALUES ('KURODA', 9010, 77);
The following INSERT statement would fail with an ORA-1776 error (cannot
modify more than one base table through a view).
INSERT INTO emp_dept (empno, ename, loc)
VALUES (9010, 'KURODA', 'BOSTON');
An INSERT cannot, implicitly or explicitly, refer to columns of a
non-key-preserved table. If the join view is defined using the WITH CHECK
OPTION clause, then you cannot perform an INSERT to it.
Using the UPDATABLE_ COLUMNS Views
The following views can assist you when modifying join views:
View Name Description
USER_UPDATABLE_COLUMNS Shows all columns in all tables and views in the
users schema that are modifiable.
DBA_UPDATABLE_COLUMNS Shows all columns in all tables and views in the
DBA schema that are modifiable.
ALL_UPDATABLE_COLUMNS Shows all columns in all tables and views that are
modifiable. -
Purchase tax/input tax details
Hi,
How to find purchase tax/input tax details of categorywise articles.Hello,
You can use either FTXP to view Input/Output tax details.
Rgds
Rajendra
Maybe you are looking for
-
Mid 2012 13" i5 Macbook Pro Screen Freeze, Shut Down, 3 Beeps!
Hi guys, my macbook recently started freezing and then shutting down giving 3 beeps afterward. I know 3 beeps is traditionally RAM, but here is a picture of my screen when it freezes. Do you think its GPU and logic board problem or is it really the R
-
Tonight is the first night I do NOT have to charge my battery after using the iPhone for the day... right now the battery is reporting it is about 1/2 way charged. Previously: Friday night, charged on dock for about 12 hours. Phone lasted about 12 ho
-
I have repeatedly tried to activate my new iphone4 but it keeps saying that the Activation information is invalid... and i have tried at least 5 times. Why am i unable to activate my New phone & what am i doing wrong?
-
SAP Master data migration tools
Hi, I would like to know if any SAP standard tools which are available for all master data migration,Kindly share the same which is required for us now. We have to migrate the data from legacy systems to SAP and we have to use only SAP Standard maste
-
Where is the "Photos" button for iPod touch?
Where is the "Photos" button for iPod touch?