cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Row Popin at the same time

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Rohit.

The scenario works also fine with input enabled table as popin. I use it in my

application. Why do you think that supply method makes no sense?

You also can set up your context without supply method if you think it would be

better.

Cheers,

Sascha

Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks, I have managed to resolve the problem by myself. I created SBOOK as child node under SFLIGHT and then dynamically set the Lead select on toggle of popin. Another thing is to untick the Singleton property of SBOOK.

Things works fine after that.

Regards

Rohit Chowdhary

Former Member
0 Kudos

Hi Rophit.

Good to hear ... yep the singleton issue is important in this case. I just forgot to mention it.

Cheers,

Sascha