cancel
Showing results for 
Search instead for 
Did you mean: 

Selection of value with Dropdown by index in a table

Former Member
0 Kudos

Hi,

In my context, I want to define 1 node with all possible values, then use this node in all a table with many entries. When I select one of the row, the selection change for all rows. I guess that it's a matter of Lead Selection. I would like to try to avoid to have to duplicate all dropdowns possible value in every rows, it's really too big in my context (hundreds of dropdowns values, in tousands of row!!!).

I tought that the dropdown by index could support that. Look from official documentation.

http://help.sap.com/saphelp_erp2005/helpdata/en/b5/ac884118aa1709e10000000a155106/frameset.htm

In Second paragraph, we can read:

If you want to create a table with dropdown lists, whereby each table row can have different values in its dropdown list, you should use DropDownByIndex.

Thanks

Davy

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If you have a node called authorizations and an attribute with authorisations.

then write the following code in wddoinit() and used dropdownbykey.

  • Data Declarations for dropdown...................................................

DATA: lo_nd_authorizations_info TYPE REF TO if_wd_context_node_info,

lt_dbtag_set TYPE wdy_key_value_table,

dbtag_key_item TYPE wdy_key_value,

lo_nd_authorizations TYPE REF TO if_wd_context_node.

lo_nd_authorizations = wd_context->path_get_node( path = `GENERAL_DATA.AUTHORIZATIONS` ).

dbtag_key_item-key = 'ADM'

dbtag_key_item-value = 'ADMIN'

INSERT dbtag_key_item INTO TABLE lt_dbtag_set.

dbtag_key_item-key = 'UPD'

dbtag_key_item-value = 'UPDATE'

INSERT dbtag_key_item INTO TABLE lt_dbtag_set.

dbtag_key_item-key = 'REA'

dbtag_key_item-value = 'READ'

INSERT dbtag_key_item INTO TABLE lt_dbtag_set.

dbtag_key_item-key = 'NON'

dbtag_key_item-value = 'NONE'

INSERT dbtag_key_item INTO TABLE lt_dbtag_set.

lo_nd_authorizations_info = lo_nd_authorizations->get_node_info( ).

lo_nd_authorizations_info->set_attribute_value_set( name = 'AUTHORISATIONS' value_set = lt_dbtag_set ).

FOR dropdown by index see example wdr_test_events view is dropdownbyidx.

Former Member
0 Kudos

Hi,

"Dropdown by Key", with "node_info->set_attribute_value_set()" were all I needed. I don't think it's possible with Dropdown by Index because of the shared lead selection by every row of the table.

PS: Sorry, I would like to reward you with points, but it seems that my question is not really a question, just a thread. I cannot give points...

Thanks a lot. Solution was perfect.

Davy

Edited by: Davy Veilleux on Apr 24, 2008 8:04 AM