cancel
Showing results for 
Search instead for 
Did you mean: 

dropdown by key in alv

Former Member
0 Kudos

Hello ALL,

i have two table

one for the item table -it contains fields like catogory id and engineering value.

one mor table engineering value table it contains catogory id and keyval and engineering value.

height (catogory id) - enginnering value 01(32cm) ,02(40cm) etc

width (catogory id)- enginnering value 01(10cm) ,02(20cm) etc

in engineering value table record like

category id keyval enginnering value

height 01 32cm

height 02 40cm

width 01 10cm

width 02 20cm

i want to disply for item details webdynpro alv

category id enginnering value

height by dropdownby key (01-32cm 02-40cm)-first record (width engineering values need to delet)

width by dropdown by key (01-10cm 02-20cm) -second record ( width engineering values need to delet)

Please help me out.

Thanks in advance.

Rama

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi ,

declare a context attribute with the same name as the field in the table , under a context node of cardinality 0..1

bind it with ur dropdown by key , use this code as reference :


DATA : node_info TYPE REF TO if_wd_context_node_info. 
DATA : INTERNAL_TABLE_NAME TYPE TABLE OF TABLE_NAME.
 FIELD-SYMBOLS : <FIELD_SYMBOLS_NAME> TYPE TABLE_NAME.
 DATA : value TYPE wdy_key_value, value_set TYPE wdy_key_value_table.
 node_info = wd_context->get_node_info( ). 
node_info = node_info->get_child_node( 'NODENAME' ). 
LOOP AT INTERNAL_TABLE_NAME ASSIGNING <FIELD_SYMBOLS_NAME> . 
value-key = <FIELD_SYMBOLS_NAME>-FIELD_OF_TABLE." This is field of table 
value-value = <FIELD_SYMBOLS_NAME>-FIELD_OF_TABLE.
 INSERT value INTO TABLE value_set. 
ENDLOOP. 
node_info->set_attribute_value_set( name = 'ATTRIBUTE_NAME' " Name of attribute value_set = value_set ). 



DATA : node_info TYPE REF TO if_wd_context_node_info,
value1 TYPE wdy_key_value,
set TYPE wdy_key_value_table,
k1 type string value 'S',
v1 type string value 'SAINI',
k2 type string value 'A',
v2 type string value 'AMIT'.
*
value1-key = k1.
value1-value = v1.
APPEND value1 to set.
value1-key = k2.
value1-value = v2.
APPEND value1 to set.

node_info = wd_context->get_node_info( ).
node_info = node_info->get_child_node('FOR_DROP').
node_info->set_attribute_value_set( name = 'DROP_KEY' value_set = set ).

regards,

amit

gud luck , happy new year:)

Former Member
0 Kudos

Hello Amit,

thanks for your reply.

my requirement is variable drop down for each row.

i am using dynamic node and dynamic internal table (means colomuns also will change dynamically).

please help me on this.

thanks,

rama.

Former Member
0 Kudos

HI Rama,

Your question is not cleared, I think if you explore with Supply Function then your problem will solve.

check the supply function concept in our forums.

orelse please explain me clearly, so that I will let you know the solution.

Regards,

Naresh.

Former Member
0 Kudos

hello Naresh,

i want display variable dropdown for the engvaue field(DEMO_VARIABLE_DROPDOWN)

each row differnt drop down values.

heigt - height related values only disply in that droddown field column.when i clicking that dropdown field

width- widthrelated values only disply in that droddown field column.when i clicking that dropdown field.

at present same funtionality working by using ovs concept.(at present field columun input UI-f4)

i reqiure row wise variable dropdown for the engvaue field just like F4 but in place of input UI .I want to diasplay dropdown UI element.

that is my reqirement

Thanks,

Rama

Former Member
0 Kudos

hello Naresh,

i want display variable dropdown for the engvaue field(DEMO_VARIABLE_DROPDOWN)

each row differnt drop down values.

heigt - height related values only disply in that droddown field column.when i clicking that dropdown field

width- widthrelated values only disply in that droddown field column.when i clicking that dropdown field.

at present same funtionality working by using ovs concept.(at present field columun input UI-f4)

i reqiure row wise variable dropdown for the engvaue field just like F4 but in place of input UI .I want to diasplay dropdown UI element.

that is my reqirement

Thanks,

Rama

Former Member
0 Kudos

hello Naresh,

i want display variable dropdown for the engvaue field(DEMO_VARIABLE_DROPDOWN)

each row differnt drop down values.

heigt - height related values only disply in that droddown field column.when i clicking that dropdown field

width- widthrelated values only disply in that droddown field column.when i clicking that dropdown field.

at present same funtionality working by using ovs concept.(at present field columun input UI-f4)

i reqiure row wise variable dropdown for the engvaue field just like F4 but in place of input UI .I want to diasplay dropdown UI element.

that is my reqirement

Thanks,

Rama

Former Member
0 Kudos

hello Naresh,

i want display variable dropdown for the engvaue field(DEMO_VARIABLE_DROPDOWN)

each row differnt drop down values.

heigt - height related values only disply in that droddown field column.when i clicking that dropdown field

width- widthrelated values only disply in that droddown field column.when i clicking that dropdown field.

at present same funtionality working by using ovs concept.(at present field columun input UI-f4)

i reqiure row wise variable dropdown for the engvaue field just like F4 but in place of input UI .I want to diasplay dropdown UI element.

that is my reqirement

Thanks,

Rama