‎2007 Jun 08 8:21 AM
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.
‎2007 Jun 08 8:25 AM
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
‎2007 Jun 08 8:25 AM
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
‎2007 Jun 08 8:29 AM
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>
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
‎2007 Jun 08 8:45 AM
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
Reward points for useful Answers
Regards
Anji
‎2007 Jun 08 8:49 AM
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
‎2007 Jun 08 8:50 AM
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