Concept behind Cardinality, Singleton property?
hi,
will anyone explain me the concept of cardinality, singleton & Initialize lead selection properties of noce. by example... when i need to set singleton /Initialize lead selection property true / fasle for perticular node...
suppose i am having node structure like this ..
CLAIM Node1
CLAIMITEM Node2
EXPENSETYPE Node3 ... Comes under node2
key
value
Claimid attribute.. Comes under node2
Description attribute.. Comes under node2
Amount attribute.. Comes under node2
if Node CLAIMITEM is bind to table on view....having 4 column ,
first as dropdown by index bind to EXPENSETYPE value...
second as inputfield bind to Claimid....
third as inputfield bind to Description....
fourth as inputfield bind to Amount....
table is having multiple rows so Node CLAIMITEM must have cardinality 0...N
what abt others...
please dont give me any link which is alreay on sdn...
jst try to explain me how does it go and why if possible ..
thanks
saurin shah
Hi Saurin,
Please check this Article which explains in detail about Context,cardinality and singleton properties with examples.I hope it will help you.
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60730016-dbba-2a10-8f96-9754a865b814
Similar Messages
-
Explain Cardinality,Singleton Property & Lead selection
Hi All,
Please explain me in detail the concepts of Cardinality,Singleton Property & Lead selection.
I had already gone through enough documents and have very vague idea.
Regards,
Venkat.Hi Venkat,
Please check the [document|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a048387a-0901-0010-13ac-87f9eb649381?quicklink=index&overridelayout=true]
Hope that will helps you.
Thanks
Arun -
Hi! regarding the singleton property in webdynpro abap
Hi experts ,
Could anyone explain me in detail the property of singleton and wht r the conditions tht we should use wht will represents..
plz explain me in detail......rather than sending links plz do explain me in detail....
Regards,
Sana...Cardinality : number of possible elements within the node.
Singleton property means whether or not all instances of this node get created at runtime or not.
Singleton property is mostly used to save memory & increase performance. we would go for singleton nodes in cases where UI needs only display from one-instance of data from my node.....
What happens when you set singleton property to YES for a node?? Assume you have context structure like
Context
Vehicle( parent node )
( attribute veh-ID primary key for all types of vehicles, dealer, area )
twowheeler( subnode of vehicle with cardinality-0..n singleton-NO)
( attributes veh-ID, regno, model, color)
fourwheeler( subnode of vehicle with cardinality-0..n singleton-YES)
( attributes veh-ID, regno, model, color)
At design time you fill the data within this context. Now you have 100 entries under the subnode twowheeler & 90 entries under the subnode fourwheeler . You create UI elements to display the node twowheeler details in a View . At runtime when user selects the veh-ID and identifies that a twowheeler data needs to be fetched/displayed all the 100 entries for the twowheeler node get created in the background although you are displaying only the ONE corresponding to the veh-ID.
if Veh-ID selected coresponded to fourwheeler( singleton property -yes) only ONE row of the data from the fourwheeler entries would have been fetched and ONLY Once instance of the fourwheeler would be created by background process!!
thus saving memory & processing time.
Scenarios singleton-YES
If i were required to display details of only ONE vehicle based on the entered Veh-ID , i will make twowheeler & fourwheeler nodes singleton-YES.
Scenario singleton-NO
if i were required to show all the vehicles that belong to one particular Area. -
Unable to change singleton property of context parent node.
Hi
I am having a view context node structure as follows.
Root context Node
|__Parent
*****|__child 1
*****|__child 2
I have created a table view which is using above structure.
Now I have selected "Selection Mode" property of my table to "Multi", as i intend to select multiple rows in this table.
When i tried to run this application..I got following error :
com.sap.tc.webdynpro.progmodel.context.ContextException: Node(TableView.Person): selection cardinality does not allow multiple selection
What i traced from this problem is that i have set "singleton" property of my "Parent" context node to "true".
But what if i wish to change it to "false"...
I AM UNABLE TO DO THAT !!
Please help me out.
Thanks in anticipation.
Edited by: Saurabh Agarwal on Jun 23, 2008 8:20 AMYes....
Now i changed my Selection property of my component context...
and that change was automatically reflected to my view context...
Actually what is happening..
if mapping to component context is set in view context..
then Properties could not be changed directly from view context.
Thanks all....for your help..
my problem is solved now....
Thanks... -
Breifly xplain wht lead selection ,cardinality &singleton&supply function
Hi Friends ...
Let plz xpalin in breif wht is lead selection ,cardinality &singleton&supply function and how these all helpfull whtz the relation ship between while creating a table...
itz bit urgent for me am working with dynamic tables and am in confuse...plz make it out this query...Lead selection
Leadselection is the property which is used to get the index of the selected row of the table
"OnLeadSelect" is the method used to fire an action when a row is selected
The Method wdContext.<node>().getLeadSelection() can be used to
find out the index of the selected element.
Cardinality
Any node or attribute that has the context root node as its immediate parent, is known as an independent node or attribute.
Any node or attribute that has some other node as its immediate parent, is known as a dependent node or attribute.
All context nodes are collections.
A node collection is composed of elements, where an element is an aggregation of the nodes immediate children (attributes and/or other nodes).
The cardinality property controls the number of elements a node collection may hold at runtime.
Every context node has a property called Cardinality. This property is composed of two values that
taken together, describe the maximum and minimum number of elements the node collection may hold
at runtime.
Cardinality Minimum: 0 or 1
Cardinality Maximum: 1 or n
Therefore, there are four possible cardinality values (specified as <Min>..<Max>)
0..1 Zero or one elements permitted
0..n Zero or more elements permitted
1..1 One and only one element permitted
1..n One or more elements permitted
Singleton
All independent nodes are forced to be singletons. This is because the context root node has one and only one element.
Singleton is boolean
TRUE : One instance will be created for all te nodes
FALSE : Every Element in the parent node collection,there will be a distinct instance of the child node.
Why Singleton
-Efficiency
-Less Memory
-Lazy Data Access(Creates instance only when needed,till then it will remain unprocessed)
Supply functions
Supply functions are the mechanism to repopulate child nodes when the lead selection in the parent node
changes. When a singleton child node is declared, you must also write an accompanying supply function.
The Web Dynpro Framework will then automatically call your supply function when the lead selection
in the parent node changes.
Regards
Chaitanya.A -
Cardinality - Singleton - Selection
Hi All,
Can anyone explain me detaily about these -
1.what is cardinality,Singleton and selection.
Regards,
KarthickHi Karthick,
Please find the answers below:
Cardinality: The cardinality defines how often a node is to be instantiated at runtime u2013
that is, how many elements of this node are available at runtime.
u25CF 1u20261
Only one element is instantiated.
u25CF 0u20261
At runtime, no more than one element is instantiated, but it is also possible that no
element is instantiated.
u25CF 1u2026n
n elements can be instantiated, but at least one element must be instantiated.
u25CF 0u2026n
The number of instantiated elements of the context node can vary.
Example:
The context node "Vehicle" is used to describe the fleet of a car rental company. It has the
cardinality 1u2026n and is filled from a database table. A number of attributes of this node have a
specific value for each vehicle.
The database table indicates that the company owns three vehicles, each with unique
registration dates and unique license plate numbers. Thus, to display this table in the Web
Dynpro application, 3 elements of the context node Vehicle must be instantiated; the
cardinality of the node must therefore be 0u2026n or 1u2026n. (If the Vehicle node is to be filled with
values in the context of another function u2013 for example, from a table of all currently available
cars u2013 the cardinality 0u2026n should be used since this table could very easily be empty u2013 that
is, if all cars are rented out.)
*The u201CSingletonu201D Property:*
For each customer of a car rental company, the two attributes u201Crented fromu201D and u201Crented tillu201D
are listed in the context. At runtime, the context then contains the additional relevant values:
If each customer has multiple addresses, it may be necessary to include a child node for the
addresses below the Customer child node. In this manner, the data content of a root node
can rapidly become very large if, at runtime, all customers are displayed with all their
addresses for each vehicle of the of the car rental company. _*To limit the content of a context*_
_*node at runtime, the context node can be assigned the u201Csingletonu201D property*. As a result, the_
_elements of the relevant node are instantiated for only one element of the parent node._
_In other words:_Unlike the cardinality of a node, which describes the number of possible elements within the
node, the u201Csingletonu201D property determines whether or not these elements are set for all
elements of the parent node (non-singleton) or for exactly one element of the parent node
(singleton).
The elements of the child node Customer are only available to one element of the parent
node Vehicle and not to all other elements. However, if you want to instantiate the elements
of the Customer node for all vehicles, you must remove the singleton property for the
Customer node.
*Lead Selection*:
At runtime, every child node set as a singleton contains the elements for exactly one element
of the parent node. For this purpose, one element from the set of possible elements of the
parent node must be highlighted. This is achieved by initializing lead selection. For each
newly created context node, lead selection is initialized automatically, but this setting can also
be deactivated. However, lead selection must generally be initialized for every context node.
u25CF Using the preset automatic initialization of lead selection:
In this case, the first element of a node is always assigned the lead selection
property.
u25CF Manual initialization of lead selection:
If the automatic initialization was deactivated, the lead selection must be programmed
manually. However, in this case it is possible to assign this property to an element
other than the first element of a node.
For the above example, this means:
The singleton property of the context node Customer specifies that the elements of this node
are only instantiated for one of the three vehicles at runtime u2013 that is, the element that bears
the lead selection. Since the lead selection was initialized automatically, this is the first
element of the Vehicle node, which in this case is the element Red Car. However, it would
also have been possible to manually set lead selection for one of the other two elements (for
example, using an index).
Edited by: Vinay Kumar Amruth on Jun 26, 2009 8:00 AM -
HI Friends
Can anyone explain me regarding "cardinality&Singleton"
with a small example
I have gone through some of the blogs but I am not getting that much clarity regarding these terms
Thanks in advanceHi,
The cardinality property
The cardinality property is composed of a pair of values that control the maximum and minimum number of elements may contain at runtime.
The cardinality property may have four possible values:
0..1 Zero or one
0..n Zero or more
1..1 One and only one
1..n One or more
The first part of the cardinality describes the minimum number of element s element collection may contain. This value is either zero or one, and is stored as a Boolean value. This value can be obtained at runtime by calling the method node.getNodeInfo().isMandatory().
The second part of the cardinality describes the maximum number of elements s element collection may contain. This value is either a 1 or an n (meaning many) and is stored as a Boolean value (false = 1, true = n). This value can be obtained at runtime by calling method node.getNodeInfo().isMultiple().
If has a cardinality of 1..<something>, then it can be assumed that after the context has been initialised, there will be at least one element present in the node collection. This element is known as the default element and cannot be deleted!
If you attempt to perform some action on a node that would violate the constraints of the cardinality, then you will get a runtime exception in the context. E.G., trying to add a second element to a node of cardinality 0..1, or trying to delete the last element from a node of cardinality 1..n.
The singleton property
The singleton property critically affects the relationship between the child node and its parent node .
If is declared at design time, then the generated interface for this node will vary depending on whether it is a singleton or non-singleton node.
Important:
All non-singleton child nodes are associated with their parent node on a per parent element basis
There is a one-to-one relationship between each element in the parent nodes element collection and the corresponding child node.
If has n elements in its element collection, then you will have n distinct instances of the non-singleton child node .
Non-singleton child nodes can be created by their respective parent element.
Singleton child nodes however, are associated with their parent node on a per node basis.
Irrespective of the number of elements in the parent nodes element collection, there will only ever be one instance of the singleton child node .
The singleton child node holds the data relevant for the element at the lead selection in the parent nodes element collection.
Singleton child nodes must be created by their parent node. Since there can only ever be one instance of a singleton child node, it is impossible for an element in a parent node collection to create a singleton child node.
From Inside Webdynro For Java
Regards
Ayyapparaj -
What is the significance of Singleton Property?
Hello guys!!!
Can some one elobarate the significance of Singleton Property?
Also, please suggest me a scenario, where we use Singleton Property.HI,
click on ur node and on the singleton proprty click F1. u will get the full detail.
The property "Singleton" specifies the number of instances that can exist in a dependent context node (that does not belong directly to the root node).
If the property "Singleton" is set, exactly one instance of the node exists. Its content changes when the lead selection of the parent node changes.
If the property "Singleton" is not set, one instance per parent instance exists. The content of the instances does not change when the lead selection of the parent changes. -
Concept behind getNamedDispatcher in interface ServletContext ?
I'm thinking about the concept behind getNamedDispatcher and getRequestDispatcher.
In the deployment descriptor you align a display name to a servlet, which you then map on an URL-pattern or since Servlet API 2.5 also on multiple ...
1. Involved in my problem are include vs. forwad server intern.
2. Redirects to Servlets
For problem one I could use getNamedDispatcher with the display-name, but for solving problem two I cannot; therefore I need to know the path within the context. So I decided to only use getRequestDispatcher and forget about the display-name.
Actually since Servlet API 2.5 as there are multiple URL-patterns allowed, I think even if there is a solution to get an URL by display-name of the servlet, it would disambigous (because multiple are possible; how to determine which to choose?).
Did I miss somehting? - How do you solve both matters and why did you decide in favour of your solution?Perhaps this page can help you:
http://www.javaworld.com/javaworld/jw-01-2006/jw-0102-servlet-p3.html -
Concept behind, strengths and weaknesses of NetWeaver?
Hi,
what is the concept behind NetWeaver?
What kind of strengths and weaknesses did NetWeaver have?
And which position did NetWeaver have in the context of ESOA?
Dokuments are also from interesting!
THX
ChrisHi,
You're not asking for facts but for opinions.
I think you have to make your own opinions....
And everybody will have different ones.
From <b>my personnal point of view, </b>
The strength of Netweaver is the 15 years experience of robustness and reliability which began in 1992 with SAP R/3.
The weakness of Netweaver is the dual stack concept ( abap and java in the same product) which pretends that the Netweaver Application server exists, also there is an ABAP application server and a JAVA application server which are (in my opinion) badly glued together.
Regards,
Olivier -
What is the concept behind using table PA0002 and structure p0002.
Hi,
What is the concept behind using table PA0002 and structure p0002.
Many times, I have seen Looping at structure e.g. p0002, p0006 etc. and data is processed and also seen Looping at table PA0002, PA0006 etc. with further appropriate subtypes if any to retrieve a value and process the same.
In which context tables like PA,HRP,IT etc. are used and structures p0001,p0002 etc. are used.
Regards,
AmeetHI,
As mentioned that that Structure Pnnnn is user as a internal tablw when a LDB is used.
Ex.
TABLES: PERNR.
INFOTYPES: 0001.
GET PERNR.
PROVIDE * FROM P0001 BETWEEN PN-BEGDA AND PN-ENDDA.
WRITE: / P0001-PERNR,
P0001-STELL,
P0001-BEGDA,
P0001-ENDDA.
ENDPROVIDE.
Here it is important to declare the infotypes you want to read and so the system will create internal tables ex. P0001.
Tables PA0001 are database table with following fields
MANDT
.INCLUDE PAKEY
.INCLUDE PSHD1
.INCLUDE PS nnnn
Thanks,
Poonam. -
What is the concept behind MASTER_IDOC_DISTRIBUTE
What is the concept behind MASTER_IDOC_DISTRIBUTE ?
Hi Manjunath,
Please check the Documentation of the Function Module in SE37
This function module is the interface from the application to the ALE layer on the outbound side. The application can pass an IDoc, the so-called master IDoc, as an internal table using the parameters MASTER_IDOC_CONTROL and MASTER_IDOC_DATA.
This IDoc is then converted into one or communcation IDocs and stored in the ALE layer. IDocs for which no errors occurred are passed to dispatch control.
In the table parameter COMMUNICATION_IDOC_CONTROL the header records for the communication IDocs created are retturned. You can tell whether processing was successful from the field STATUS.
A COMMIT WORK must be dispatched in the calling program, otherwise the IDocs may not be dispatched.
Best regards,
raam -
What is the role of singleton property in clustered environment.
Hi
Could anyone suggest links or tutorials explaining the singleton property and its importance in clustered environment(both active-active and active-passive).
Please anyone explain this .
I've googled and couldn't understand the explanations which I've gone through.
Appreciate your help.
Regards,
Dev...HI,
click on ur node and on the singleton proprty click F1. u will get the full detail.
The property "Singleton" specifies the number of instances that can exist in a dependent context node (that does not belong directly to the root node).
If the property "Singleton" is set, exactly one instance of the node exists. Its content changes when the lead selection of the parent node changes.
If the property "Singleton" is not set, one instance per parent instance exists. The content of the instances does not change when the lead selection of the parent changes. -
What is singleton property in Webdynpro
Hi,
What is singleton property in Webdynpro?
please explian along with diagram
Regards,
Sid.hi,
Singleton Nodes
It is very important to remember the difference in runtime behaviour between a singleton node and a non-singleton node. When a node is declared to be singleton, there will only ever be only one instance of that node-irrespective of the number of elements found in the parent nodes element collection. This is not the case for the non-singleton node. In this case, there will be as many instances of the non-singleton child nodes as there are elements in the parent nodes element collection.
The significant point here is that when the lead selection in the parent element collection changes, the contents of the singleton child node become invalid. Consequently, the next time data is required from the singleton child node, the entire element collection must be rebuild in order that it match the data in the newly selected parent element.
The task of rebuilding singleton child node must be performed by a dedicated supply function.
[http://help.sap.com/saphelp_nw70/helpdata/EN/81/95384162316532e10000000a1550b0/frameset.htm]
regards,
pinki -
Concept behind User Administration
Good Morning all,
Please explain the concept behind user administration. My question is,
1). How to assign the user authorization? Do we need to maintain the user details under HR module?
2). I've created a user and assigned full authorization, but the user is not able to access the entire menu bar, i.e. the menu bar does not contain the marketing documents and some of the reports. If I add another user, the recently added user does not even have the access as like the previously created user.
Can anyone please look into this and provide a solution.
Thanks,
BalajiHello Balaji,
1). How to assign the user authorization? Do we need to maintain the user details under HR module?
The HR module does not have anything to do with the User Authorization. The Human Resources module is just a place to store employee information and other pertinent details on their employment.
2). I've created a user and assigned full authorization, but the user is not able to access the entire menu bar, i.e. the menu bar does not contain the marketing documents and some of the reports. If I add another user, the recently added user does not even have the access as like the previously created user.
The authorization manages what a user can access and what he/she cannot. If you are not able to see some of the Menu items it could be possible that they are diabled in the Form Settings. After login as the user Click on Form Settings (Tools > Form Settings) and make sure that the menu items the user needs are checked visible.
Make sure the the Visible check box is checked.
Suda
Maybe you are looking for
-
E72 how to disable the microphone in the headset?
Hi, When I listen to the FM radio using the standard headset the microphone is active. Its really annoying cause everytime the microphone bumps against me it makes a noise. I think I need to set the headset to headphone mode or something like that bu
-
When I use F-1 to find help on a field it just displays blank screen. Any ideas to fix this???
-
I just got a dutch Photo Mag that compared Lightroom 2 to Capture One 4. I was amazed at the conclusion Capture One won the contest, based upon image quality results. I immediately downloaded a 30 day trial and compared LR, PS cS3 and CO side by side
-
I am trying to watch videos on a news web-site: http://www.ctv.ca. They inform me that for those using Intel Macs, at this time they do not support Flip4Mac, and recommend that we run Safari in Rosetta mode and use Windows Media Player 9. Any ideas h
-
i don't want to have to ZOOM every site i visit, how do i save my zoom setting for all sites?