on 05-20-2011 11:32 AM
Hi Experts,
I want to populate the data into drop down by key and drop down by indexes ,but I am getting error while binding in DdbIndex property text as type compatible If any one knows send me the complete code to populate values into Ddbkey and Index .
Regards,
Satya.
hi Satya,
May i know the exact error you are getting.Anyhow use the below code for DDBK.
For displaying static values in DDBK there are two techniques
1) by directly binding with dataelement
2) with hardcoding
1)Bind an attribute to SELECTED KEY property of DDBK . And attribute should be type of DATA ELEMENT.
That Dataelement should contain fixed values in corresponding domain, then automatically all those fixed values wil be displayed in DDBK
2) with hardcoding
creat a node and an attribute with string data type and assign that attribute to selected key property of DDBK / RGBK / inputfield
goto wddoinit() and implement code like below
data: lt_valueset type wdr_context_attr_value_list,
ls_value type wdr_context_attr_value.
data:
node_info type ref to if_wd_context_node_info.
node_info = wd_context->get_node_info( ).
node_info = node_info->get_child_node( ' DDBK Node' ). '' this should be in capital letters
ls_value_value = 'value1''
ls_value_text = 'text1'.
insert ks_value into table lt_valueset.
ls_value_value = 'value2''
ls_value_text = 'text2'.
insert ks_value into table lt_valueset.
like above you can pass as many values as you want
node_info->set_attribute_value_set( name = 'DDBK ATTRIBUTE NAME''
value_set = lt_valueset ).
Hope above code will be useful.
Regards
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satya,
For DDBI and key code related check this..
DDBI
http://www.sapdev.co.uk/sap-webapps/sap-webdynpro/table-dropdown.htm
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check your node cardinality. Probably it is 0 to n. In that case you need to create the element of the node. Use Pattern and Wizard to get the code to populate the value.
Regards,
Pradip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.