on 01-23-2013 12:03 PM
hi all,
i am getting the errror
don't know why it is showing this error although each parameter set by me is right
Cardinality for view and component controller is 1.1
pls see screenshot and help in this
Regards,
Manu
@all Thanks,
i solved this query by myself long days back..it was cardinality issue which is 0:n
thanks everyone for suggestions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manu,
If you are using table UI element on your layout screen then create the binding node with 0:N cardinality.
If you are using form or multiple input elements then use 0:1 cardinality.
Please let us know what type of UI element you are using.
Regards,
Mahidhar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manu,
I am not sure if still you are facing the error or not as the question was posted almost 2 months back.
Looking into the screenshots given by you and the code you have written it seems that you are trying to display employee details in a form fetching from a table.
Please try to set the cardinality of your context node as 1.1 as you are displaying one employee record at a time and not displaying multiple records in a table and keep the Initialization lead selection property as checked.
Then in you WDDOINIT after selecting one record from the table read in a work area(structure) and set it in the context node using set_static_attributes method of the lead selected element.
Hope this helps.
Thanks,
Sonia
Hi Manu,
Have you tried 0:1 cardinality?
Regards,
Mahidhar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Mahinder,
on cardinality=0.1 & selection=0.1 for view,controller&window
the following error is displayed
on cardinality 1.1
above error is displaying
can you add screen shots of your node property and code you have written in wddoinit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
method WDDOINIT .
* *data declaration
data: Node_emp type REF TO IF_WD_CONTEXT_NODE,
Itab_emp type standard table of ZZZ_EMP,
lo_el_context TYPE REF TO if_wd_context_element,
ls_context TYPE wd_this->element_context,
lv_lv_user LIKE ls_context-lv_user.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* get single attribute
lo_el_context->get_attribute(
EXPORTING
name = `LV_USER`
IMPORTING
value = lv_lv_user ).
* get data from table SFLIGHT
select * from ZZZ_EMP into table Itab_emp WHERE Empno = lv_lv_user.
* navigate from <CONTEXT> to <ZZZ_EMP> via lead selection
Node_emp = wd_Context->get_Child_Node( Name = `EMPLOYEEDATA` ).
* bind internal table to context node <SFLIGHT>
Node_emp->Bind_Table( Itab_emp ).
endmethod.
you are binding a table in context node with cardinality 1:1.
if your cardinality is 1:1 means there can only be one instance can be bind.
solution: use select
select single * from ZZZ_EMP into table Itab_emp WHERE Empno = lv_lv_user.
or you can change caridnality to 0:n.
for more cardinality info go through below link.
http://help.sap.com/saphelp_erp2005/helpdata/EN/7a/787e40417c6d1de10000000a1550b0/content.htm
reward if helpful
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.