on 02-03-2011 5:27 AM
Hi,
I have 2 views 'BUSINESS' and 'PROPERTY' ...Both the views contains one node each with cardinality 0:n, and both view contains drop down by key Ui element... coding i have done in 'wddoinit' method. the drop down coding is working fine for view 'property', but for view 'BUSINESS', its giving assert condition violated.....
plz help me to resolve this problem.... i need drop down for cardinality 0:n... is it possible..
Hi,
I created another node with cardinality 1:1 for second view and set the values of selected row from 0:n cardinality node to 1:1 cardinality node and solved the problem..
Thanx for ur help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sarbjeet ,
tat is working fine...but i dont need the new element for my node...here my scenario is if am selecting one row of a table, it should fetch the data from tat row and place it in another window and tat window only contains this view 'BUSINESS'.
now if am using
NODE_BUSINESS->bind_Structure( STRU_BUSINESS ).
then no data is fetched..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
SO you have one view with table and and when you select teh one row in the table.
you want to pass the data to the second window.
so do you want the value of the attributes from the currently selected element in the first view.
and then pass these values to the second window.
is this is the thing that you are trying to achieve.
That is simple just get the attribute of the selected element in the second window also by doing the context mapping
thanks
sarbjeet singh
Ok i guess you can check the mapping once again whether it is done proeprly.
if your dropdown working on the 1..1 and not on 0..N it means there is no element in the node.
For this go to the context and see whether this noe is mapped to the first view through comp controller.
because if you are filling the elements in the first view it should come here also.
i guess mapping may be the problem or filling of the node.
can you paste the code where you are filling the node with elements.
thanks
sarbjee singh
Hi,
This is the coding where i fill the node with elements
DATA:
NODE_BUSINESS TYPE REF TO IF_WD_CONTEXT_NODE,
ELEM_BUSINESS TYPE REF TO IF_WD_CONTEXT_ELEMENT,
STRU_BUSINESS TYPE IF_MODIFICATION_PART1=>ELEMENT_BUSINESS .
DATA L1 TYPE WD_THIS->ELEMENTS_BUSINESS.
NODE_BUSINESS = WD_CONTEXT->GET_CHILD_NODE( NAME = `BUSINESS` ).
SELECT * FROM ZPRM_TBL_BUASSO INTO TABLE L1 WHERE BAID = ITEM_BAID.
CALL METHOD NODE_BUSINESS->BIND_TABLE
EXPORTING
NEW_ITEMS = L1 .
Hi,
I have written this coding on action of a radio button..
The nodes are mapped from comp controller of both the views.
it is working fine when i use input field instead of drop down in the second view..
when am using drop down,the cardinality problem arises and gives runtime error( assert condition violated ),
its fetching the data correctly..
1. You said when you change the cardinality to 1..1 then it is wokring fine. if that is the case then could you please
tell me where you change the cardinality. is it in comp controller or view.
if the nodes are mapped then you can change the cardinality in the comp controller only.
and if you change it there and then it will be changed inteh first view also.
then when you are adding elements to node if number of elements are more than one. it will not allow to add and will provide error.
so, in that case 1..1 case should also throw the error.
so i guess mapping is the problem.
2. when you are filling the value set in the wddoinit of business view.
there do one thing.
check the size of the node (number of elements.)
data size type i.
NODE_BUSINESS = WD_CONTEXT->GET_CHILD_NODE( NAME = `DEALER1` ).
size = node_business->GET_ELEMENT_COUNT( ).
then put a break point and check the value of size.
thanks
sarbjeet singh
Hi ,
Am using different nodes in both the views....The nodes cardinality is 0:n.... My coding is,it is written in wddoinit.
DATA:
NODE_BUSINESS TYPE REF TO IF_WD_CONTEXT_NODE,
ELEM_BUSINESS TYPE REF TO IF_WD_CONTEXT_ELEMENT,
STRU_BUSINESS TYPE IF_MOD_BUSINESS=>ELEMENT_BUSINESS ,
ITEM_CITYID LIKE STRU_BUSINESS-CITYID.
navigate from <CONTEXT> to <BUSINESS> via lead selection
NODE_BUSINESS = WD_CONTEXT->GET_CHILD_NODE( NAME = `BUSINESS` ).
DATA LCO TYPE REF TO IF_WD_CONTEXT_NODE_INFO.
CALL METHOD NODE_BUSINESS->GET_NODE_INFO
RECEIVING
NODE_INFO = LCO.
DATA L1 TYPE TABLE OF WDR_CONTEXT_ATTR_VALUE.
DATA W1 TYPE WDR_CONTEXT_ATTR_VALUE.
DATA L2 TYPE STANDARD TABLE OF ZPRM_TBL_CITY.
DATA W2 TYPE ZPRM_TBL_CITY.
SELECT * FROM ZPRM_TBL_CITY INTO TABLE L2.
SORT L2 BY CITYID.
DELETE ADJACENT DUPLICATES FROM L2 COMPARING CITYID.
LOOP AT L2 INTO W2.
W1-TEXT = W2-CITY_NAM.
W1-VALUE = W2-CITYID.
APPEND W1 TO L1.
ENDLOOP.
CALL METHOD LCO->SET_ATTRIBUTE_VALUE_SET
EXPORTING
NAME = 'CITYID'
VALUE_SET = L1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ranjith ,
If you are using the same dropdown ( as in same context node ) in both your views ,
Please cosider it creating it in your component contoller and then map the context to both your views.
Advantage would be , populating the node once would be enough(either in a supply function or WDDOINIT of comp controller).
Thanks,
Aditya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
Are you binding the elements to the node in the second view also.
there should be atleast one element in the node to make the dropdown by key to work.
and by the way go to ST22 and check the source code extract of the dump to find out where are you getting assert condition
failed.
paste that code here.
thanks
sarbjeet singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.