cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Programming - table popins

srinivasa_raghavachar
Participant
0 Kudos

Hi,

I am trying to create a table pop in using dynamic programmimg and works fine except that when I use a tablepopintogglecell to expand or collapse the op ins in all the table rows are getting expanded or collapsed simultaneously. How to make it for the only one row?

In WDDOMODIFYVIEW I am using the following code:

-


  • Set the pop in for the table

CONCATENATE 'CTX_PARTIC_CURRBOOK.' node_name '.SELECTED_POPIN' INTO popin_context.

table_ui->BOUND_SELECTED_POPIN( CONTEXT_NODE_PATH_NAME = popin_context ).

  • Create the table pop in

table_popin = CL_WD_TABLE_POPIN=>NEW_TABLE_POPIN( ID = popin_id ON_CLOSE = 'CLOSE_POPIN' ).

  • Now attach the table pop in to the table

table_ui->SET_POPIN( THE_POPIN = table_popin ).

  • Add column for popin toggle to table

popintoggle_column = CL_WD_TABLE_COLUMN=>NEW_TABLE_COLUMN( ).

  • Create caption for this column and add

caption_refcolumn = CL_WD_CAPTION=>NEW_CAPTION( ).

caption_refcolumn->SET_TEXT( value = l_popin_column_text ).

popintoggle_column->SET_HEADER( THE_HEADER = caption_refcolumn ).

popintoggle_column->SET_SELECTED_CELL_VARIANT( VALUE = 'SELECTEDCURRELEMS' ).

  • Create table pop in toggle

popintoggle = CL_WD_TABLE_POPIN_TGL_CELL=>NEW_TABLE_POPIN_TGL_CELL( ).

popintoggle->SET_VARIANT_KEY( VALUE = 'SELECTEDCURRELEMS' ).

  • Now attach the table popin toggle to the table

table_cellvariant ?= popintoggle.

popintoggle_column->ADD_CELL_VARIANT( THE_CELL_VARIANT = table_cellvariant ).

table_ui->ADD_COLUMN( THE_COLUMN = popintoggle_column ).

Am I missing any coding here?

Regards,

Srini.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_szcs
Active Contributor
0 Kudos

Hi Srinivasa,

Is the context attribute that contains the name of the currently selected popin located below the node that represents the dataSource of the table?

Best regards,

Thomas

srinivasa_raghavachar
Participant
0 Kudos

Hi Thomas,

The context attribute that contains the name of the currently selected popin is in the node that represents the dataSource of the table. Actually I am creating the context dynamically from a structure and this structure has the attribute SELECTED_POPIN.

Regards,

Srini.

Former Member
0 Kudos

Hi Srini,

As Thomas has already pointed out I believe it is because the attribute is not present under the node which stores the rest of the data. Actually in this case all the elements of table will have same value, seems to be the case that you are facing. Try changing the structure such that this attribute is present within the source node of table and then set the attribute value.

Hope i understood your query well and my response is helpful to you.

Regards,

Anoop

thomas_szcs
Active Contributor
0 Kudos

Hi Srinivasa,

My guess is that although the attribute is there, it's not used. Look at this part of your coding:


* Set the pop in for the table
CONCATENATE 'CTX_PARTIC_CURRBOOK.' node_name '.SELECTED_POPIN' INTO popin_context.
table_ui->BOUND_SELECTED_POPIN( CONTEXT_NODE_PATH_NAME = popin_context ).

Here you first create the binding path, but later on you call the bound_* instead of the bind_* method, which overwrites the content of popin_context.

I believe that the attribute of the table is not bound to the context and hence has the same value for all rows.

Best regards,

Thomas

Answers (0)