Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

dropdowns

Former Member
0 Kudos

Hi all,

I've used drop down list in my module pool scree, i've give three values for the drop down list, but when i'm executing the code i'm getting repetitions in the drop down list and some times the values are even changed to lower case and if lower to upper case. Can anyone help me with this.

Thanks in advance.

4 REPLIES 4

Former Member
0 Kudos

hello,

after calling VRM_SET_VALUES you have to use :

clear internal table.

Refresh internal table.

if you use this then no repetiotion in drop down list.....

Thanks

Sabyasachi

Former Member
0 Kudos

Hi Enoch,

Check this piece of code ..

DATA: NAME TYPE VRM_ID,

LIST TYPE VRM_VALUES,

VALUE LIKE LINE OF LIST.

MODULE INIT_LISTBOX OUTPUT.

name = 'DROP'.     " List Control Name

clear list.


value-key = '1'. APPEND value TO list.

value-key = '2'. APPEND value TO list.

value-key = '3'. APPEND value TO list.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = name

values = list.

ENDMODULE. " INIT_LISTBOX OUTPUT

Regard's

Smruti

Former Member
0 Kudos

Hello,

go to thread: http://scn.sap.com/thread/3320379

follow my code in this thread......

Thanks

Sabyasachi

Former Member
0 Kudos

Hi Vamsi,

To avoid the Repetetation use below code.

First free the Internal table which one u have passed into Fm and than Populate the Internal Table.

So First Free the table.

FREE I_TAB.

w_tab-text = 'abcd'.
w_tab-key = '1'.
APPEND w_tab to i_tab.

CLEAR W_TAB.

w_tab-text = 'EFGH'.
w_tab-key = '2'.
APPEND w_tab to i_tab.

CLEAR W_TAB.


NOW CALL THE FM.

To Avoid the Upper/ lower case transfer use below Check in attributes of thats Dropdown field.

Thanks

Tarak