Application Development and Automation 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: 
Read only

drop down list box....

Former Member
0 Likes
829

Hi all,

I have created a ZTABLE in that table there is one field called CITY. Here my requirement is while creating entries for that table i have to display a drop down list box for that CITY field with list of cities. How can i do this?

Thanks & Regards.

Laxman.P

B'lore.

6 REPLIES 6
Read only

former_member196299
Active Contributor
0 Likes
741

hi Laxman ,

You can create a search help for this field and attach to this field, so that when you want to enter values you will geta help for it !

else you can use a finction module F4_if_* search for the function modules you will get a function module for getting dropdown list box .

Else refer program Demo_dropdown_list_box.

revert back if you need further help !

Reward if helpful !

Regards,

Ranjita

Read only

Former Member
0 Likes
741

Hi,

Create a Value table for this field, and maintain the values in the Value table and Give in the Domain, then you will only those values in that table

We can maintain the List box in the Program and the screens only

Regards

Sudheer

Read only

Former Member
0 Likes
741

Hi laxman

For creating in a table u have to go to SE51 and from there u have to create ur own screen and from there u can call this drop down list before that u have to create a tCode and call this screen over there so that u can get the expected data as drop down box or other

To create in a report follow this procedure


TYPE-POOLS : vrm.
tables: bkpf.

DATA : values TYPE vrm_values.
DATA : wa LIKE LINE OF values.

PARAMETERS : list_box(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.

PARAMETERS: dd type bkpf-BSTAT user-command abc.

select-options: a for bkpf-bukrs MODIF ID buk.

select-options: b for bkpf-belnr MODIF ID SEL.

at selection-screen output.
If list_box = 2.
loop at screen.

if screen-group1 = 'SEL'.
screen-input = 0.
modify screen.
endif.

endloop.

endif.

INITIALIZATION.

wa-key = '1'.
wa-text = 'Orange'.
APPEND wa TO values.

wa-key = '2'.
wa-text = 'Red'.
APPEND wa TO values.

wa-key = '3'.
wa-text = 'Blue'.
APPEND wa TO values.

wa-key = '4'.
wa-text = 'Gray'.
APPEND wa TO values.


CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'LIST_BOX'
values = values
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.

Ref Program: <b>DEMO_DROPDOWN_LIST_BOX</b>

Link: ?

http://www.sapdesignguild.org/resources/MiniSG/2_Layout/2_Dropdown_Listbox.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbabe435c111d1829f0000e829fbfe/content.htm

check this link it will solve ur problem

as i said earlier u can get easier through screen painter

http://www.sapdesignguild.org/community/design/combo.asp

Reward all helpfull answers

Regards

Pavan

Message was edited by:

pavan praveen

Read only

Former Member
0 Likes
741

Hi

Design a program like the sample one for that field with the values and use

REPORT zwa_test2.

TYPE-POOLS : vrm.

tables: bkpf.

DATA : values TYPE vrm_values.

DATA : wa LIKE LINE OF values.

PARAMETERS : list_box(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.

PARAMETERS: dd type bkpf-BSTAT user-command abc.

select-options: a for bkpf-bukrs MODIF ID buk.

select-options: b for bkpf-belnr MODIF ID SEL.

at selection-screen output.

If list_box = 2.

loop at screen.

if screen-group1 = 'SEL'.

screen-input = 0.

modify screen.

endif.

endloop.

endif.

INITIALIZATION.

wa-key = '1'.

wa-text = 'Orange'.

APPEND wa TO values.

wa-key = '2'.

wa-text = 'Red'.

APPEND wa TO values.

wa-key = '3'.

wa-text = 'Blue'.

APPEND wa TO values.

wa-key = '4'.

wa-text = 'Gray'.

APPEND wa TO values.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'LIST_BOX'

values = values

EXCEPTIONS

id_illegal_name = 1

OTHERS = 2.

Ref Program: DEMO_DROPDOWN_LIST_BOX

Link:

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
741

Hi,

for the domain of the city ,

either you can put fixed values or define a value table ...

then the dropdown will appear while creating entries..

Kindly reward if helpful

Regards,

gaurav

Read only

gopi_narendra
Active Contributor
0 Likes
741

You can maintain the values of the field CITY at the domain level.

U just need to create a new domain for ur city field and maintain values under the value range tab of the domain.

So now when u create new entries it will show u as a drop down.

Regards

Gopi