on 07-29-2010 8:24 AM
Hi All,
I have a DropDownbyKey UI element which fetches values from the value range in domain. So, the dropdown is populated with values automatically. I would like to append an initial line to the dropdown list.
Could you please suggest the best way to achieve this.
Thanks a lot in advance.
Just add value range and dont provide the description for that fixed values
if you are using the standard domain just make a zcopy of it .
pls look at this pic i have tried .
[http://i31.tinypic.com/14b3hw5.jpg|http://i31.tinypic.com/14b3hw5.jpg]
Regards
Chinnaiya P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Preeti ,
in Dropdown by key that is notpossible .hence the value will be populated from the domain ,
But if you us drop bown by value we can control it via program by writting supply function .
For eg :
* data declaration
DATA lt_ddk TYPE wd_this->Elements_ddk.
DATA ls_ddk LIKE LINE OF lt_ddk.
ls_ddk-key = 1.
ls_ddk-value = 'one'.
APPEND ls_ddk to lt_ddk.
ls_ddk-key = 2.
ls_ddk-value = 'two'.
APPEND ls_ddk to lt_ddk.
ls_ddk-key = 3.
ls_ddk-value = 'three'.
APPEND ls_ddk to lt_ddk.
ls_ddk-key = 4.
ls_ddk-value = ' ''. " appending initial line
APPEND ls_ddk to lt_ddk.
node->bind_table(
new_items = lt_ddk
set_initial_elements = abap_true ).
Regards
Chinnaiya P
>in Dropdown by key that is notpossible .hence the value will be populated from the domain
That's not actually true. You can override the Value Set of a DropDownByKey by using the IF_WD_CONTEXT_NODE_INFO=>SET_ATTRIBUTE_VALUE_SET API.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/bb/69b441b0133531e10000000a155106/frameset.htm
Thanks a lot for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.