on 05-02-2007 6:16 PM
Hi,
I have a scenario where on lead select of a row of a table, I need to display a popup. Currently I have a row Popin which I am displaying on the lead select but the problem is that if user selects more then 1 row then system displayed the same popin for each of the row selected. Popin is used for Input of line item level values.
For example if I enter some records for the header and select a row to enter the item values is fine. But as soon as I select the other popin system displays the value from the first popin.
It will be a really helpful if some can help me with this.
Regards and thanks in advance.
Rohit Chowdhary
Hi Rohit.
What is the context node structure and how did you bind the popin?
Seems that you use a single element for the popin so you will always
edit the attributes of this element in the popin which means that you always
see the same values.
I use it this way:
- table_node (0..n)
- node_for_popin (0..1)
- attribute of popin
- attribute of table
I bind the table_node to the table and use a TablePopin with its UIElements bound
to the attributes of the subnode node_for_popin. This way when you open the
popin for a special row (element) of the table_node you will see the attributes of
the subnode.
Hope this helps.
Cheers,
Sascha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the help and hints, but I am still struggling with it. For better understanding. I have 2 context nodes defined at component controller level and mapped to the context of view.
1. ZMATERMMETRFCG with the following fields on View1
MANDT MANDT
TERMID ZDEMA_TERMID
MATNR MATNR CHAR
ASCHG ZDEMA_ASCHG
SICHG ZDEMA_SICHG
MUCHG ZDEMA_MUCHG
PFDAYS ZDEMA_PFDAYS
POBRT ZDEMA_POBRT
MIREF ZDEMA_MICHG
Cardinality - 0:n, Selection 0:n, singleton = 'X'.
2. ZMATERMMETBAND with the following fields 0n View 2
MANDT MANDT
TERMID ZDEMA_TERMID
MATNR MATNR
POSNR POSNR
FBAND ZDEMA_FBAND
TBAND ZDEMA_TBAND
RRATE ZDEMA_MRATE
LDAYS ZDEMA_LDAYS
LTUNIT EDI_DATTYP
KBETR KBETR
KPEIN KPEIN
KMEIN KMEIN
WTBASART ZDEMA_WTBASART
Cardinality - 0:n, Selection 0:n, singleton = 'X'.
I have two view, view one has a table control from node 1 with a popin for node 2. In popin I have a transperent container, embeding view 2, which in turn has a table control for node 2.
For every row in node 1 there can be multiple entries in node 2. At present I have done the coding to have a single popin open at given point of time and it works fine.
With this functionality client will need to close the popin selected and then again click on the second line to enter the data. Which is a problem for them.
If we can display mulitple popins at the same to enter the data, then he is fine with it.
It will be really helpful if someone can help with a code to display mutliple popins at given point of time.
Regards
Rohit Chowdhary
Hi Rohit.
You do not need to handle this by embedding the view2 in the popin. I guess this
way you embedd the same instance of the view in each popin and this way every
popin displays the same view / values.
You can add the popin and instead of using view2 add a table to the popin directly.
Then you can refactor your node structure:
node ZMATERMMETRFCG (0...n, ...)
- subnode ZMATERMMETBAND (0..n, ...)
This way you have one element (row) of ZMATERMMETRFCG connetcted to the
corresponding entries in ZMATERMMETBAND. This can be easily handled via
supply method for subnode.
Then you bind the subnode to the table of the popin. Now you can open multiple
popins and they only show the values corresponding to the parent element which
is a row of the fiirst table.
Hope this helps a bit.
Cheers,
Sascha
Thanks for the reply Sascha. This works fine when popin comprises display only fields. In case of a popin with input enabaled functions, this way multiple row Popin does not work, because supply function is of no use for such cases.
Do i need to explore it with Dynamic node creation?
Regards
Rohit Chowdhary
Thanks for your guideance. I tried to replicate the wdr_test_table - Rowpopin example with 2 nodes, slfight and sbook instead of one. I added my on action set_Data on table_popin_togggle_cell, to get the data from SBOOK for the selected flight.
data: lr_element type ref to if_wd_context_element,
lv_carrid type S_CARR_ID,
lv_connid type s_conn_id,
lv_fldate type s_date.
lr_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
lr_element->get_attribute( exporting name = 'CARRID'
importing value = lv_carrid ).
lr_element->get_attribute( exporting name = 'CONNID'
importing value = lv_connid ).
lr_element->get_attribute( exporting name = 'FLDATE'
importing value = lv_fldate ).
data sbook_tab type standard table of sbook.
refresh sbook_Tab.
select * from sbook into table sbook_tab where carrid = lv_carrid
and connid = lv_connid
and fldate = lv_fldate.
data:
Node_Sbook type ref to If_Wd_Context_Node,
Elem_Sbook type ref to If_Wd_Context_Element,
Stru_Sbook type If_Test=>Element_Sbook .
navigate from <CONTEXT> to <SBOOK> via lead selection
Node_Sbook = wd_Context->get_Child_Node( Name = IF_TEST=>wdctx_Sbook ).
@TODO handle not set lead selection
if ( Node_Sbook is initial ).
endif.
get element via lead selection
Elem_Sbook = Node_Sbook->get_Element( ).
@TODO handle not set lead selection
if ( Elem_Sbook is initial ).
endif.
alternative access via index
Elem_Sbook = Node_Sbook->get_Element( Index = 1 ).
@TODO handle non existant child
if ( Elem_Sbook is initial ).
endif.
node_sbook->bind_table( sbook_tab ).
On toggle for the first record system displays correct values but as soon as I toggle on the second row to open the popin, system replaces the data for the first popin with the second popin.
I tried all combinations, but I am still struggling. May be I am missing something.
Request to help, to fix this issue.
Regards
Rohit Chowdhary
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.