cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in drop down by key?

Former Member
0 Kudos

Hi All,

i am using dropdown by key in table and i am filling like this..

DATA : node_info TYPE REF TO if_wd_context_node_info,

value TYPE wdy_key_value,

set TYPE wdy_key_value_table,

k2 type string value '1',

v2 type string value 'Box',

k3 type string value '2',

v3 type string value 'Loose'.

value-key = k2.

value-value = v2.

APPEND value to set.

value-key = k3.

value-value = v3.

APPEND value to set.

node_info = wd_context->get_node_info( ).

node_info = node_info->get_child_node( 'PACK_MAT' ).

node_info->set_attribute_value_set( name = 'PACK_MATERIAL'

value_set = set ).

and other fields table i am collecting from another table, i mean when i select that table record and click on button i am getting data into another table, i this table along this data i want to select drop down values. Values are coming into dropdown correctly.

When i select a value and select that record, that value(drop down value ) is vanished.?? looking strange.. any helps..

Thanks,

Venkat.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

use:

data: lt_key TYPE wdy_key_value_table.

lo_node_info = <Node Ref>->get_node_info( ).

lo_node_info->set_attribute_value_set(

EXPORTING name = '<Attribute Name>'

value_set = lt_key ).

Here in the above code,lo_node_info is of type if_wd_context_node_info

node ref is different ,take it as lo_nd1_info of type if_wd_context_node ->use this in data declaration and please go and change the value in your code in 15th line at the place of

lo_node_info = lo_node_info->get_node_info(). -


dont use it like this,in this line in R.H.S lo_node_info should be not of info type rather a node reference.so please try as mentioned above,and if you have any queries feel free to post.Thanks

KiranJ
Active Participant
0 Kudos

Hai ,

DATA: value_set TYPE wdr_context_attr_value_list,
        value TYPE wdr_context_attr_value,
        wd_node TYPE REF TO if_wd_context_node,
        wd_node_info TYPE REF TO if_wd_context_node_info.

        MOVE 'Approved' TO value-text.
        value-value = value-text.
        CONDENSE value-value.
        INSERT value INTO TABLE value_set.

        MOVE 'Rejected' TO value-text.
        value-value = value-text.
        CONDENSE value-value.
        INSERT value INTO TABLE value_set.

  wd_node = wd_context->get_child_node( 'ITEM' ).
  wd_node_info = wd_node->get_node_info( ).
wd_node_info->set_attribute_value_set( name = 'QMSTATUS' value_set = value_set ).

Simply use this code ..

sahai
Contributor
0 Kudos

hi venkat,

check the following link

[link|http://www.google.co.in/url?q=http://www.sdn.sap.com/irj/scn/index%3frid%3d/library/uuid/50d4f5b6-fd1b-2e10-3190-823bcaff92d7%26overridelayout%3dtrue&sa=U&ei=Tf2eTdPHKsWrrAeJ_6T7Ag&ved=0CBsQFjAE&usg=AFQjCNE8mdnls4RNbIY3Ni5Rd0HvA1MfUA]

for any further query please revert

regards,

sahai.s

former_member262988
Active Contributor
0 Kudos

Hi,

Is there a parent child relation for the node...if so check the supply function ......and debug whats happening there might be the value is getting refreshed .....

once you select the value form drop down that will be set to the node...so it will persist ....also check is theer any code in lead selection event may be theer the value is getting cleared...

Thanks,

Shailaja Ainala.

Former Member
0 Kudos

Hi venkat,

There is no issue in your coding . It's absolutely right. Two value 'box' and 'loose' will be displayed. But i m nt clear with your objective. Plese elaborate it litte bit more to get the clear pic wht do u want.

also check in any particular action your context node getiing cleared as all the values are disappearing.

Regards,

Monishankar C

Former Member
0 Kudos

IS there anywhere supply function called ?