cancel
Showing results for 
Search instead for 
Did you mean: 

Getting values of a dropdown on the basis of values selected in the previou

Former Member
0 Kudos

hi experts,

I have a requirement in which I am having 2 fields, region and company codes.Both are dropdown in my application and they exist in the same DB table. Mapping and binding is done. Now when I select the value for the region I want to restrict the values of company codes that fall in the corresponding region. What will be the best way to do this. I dont want to make any changes in the DB. Is it possible with coding itself?What will be the best possible way?

Thanks in advance

Gaurav Kaneria

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi.,

Yes It is possible. Make Your Company Codes Drop Down by Index instead of Drop Down by Key.

now in Onselect Event for region Drop down., get the selected Value and get the company codes for the selected values

and append it to list and bind it to your Company Codes Drop Down..

hope this helps u.,

Thanks & Regards,

Kiran

Answers (4)

Answers (4)

Former Member
0 Kudos

Dear Lekha

Could you plz explain OVS.

Thanks in Advance

Gaurav

Former Member
0 Kudos

Hi Gaurav,

Please go through this for OVS Help..

/people/shruti.rathour/blog/2008/05/05/ovs-help-in-web-dynpro-abap

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70cee684-ccbb-2c10-3c94-91e806e5f...

http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproAbap-OVSsearch+help

Cheers,

Kris.

Former Member
0 Kudos

Hi

What if the company code is an input field?

Thanx

Gaurav

Former Member
0 Kudos

If the region is r DRI (drop down index), and the Company code is an Input field then In that case based on the dorp down action you need to populate the value help as F4 help for input field in show it as as F4 help..You can use OVS for this..

Former Member
0 Kudos

Hi Kiran,

To which list shall I take this values and how to bind it with the company code? pls explain.

Thanks

Gaurav

saravanan_narayanan
Active Contributor
0 Kudos

one way of doing is as suggested by Kiran - Create Company Drop down as DropDownByKey and Region as DropDownByIndex. I assume you want to filter the region based on company selection.

Other way would be to have context based search help... check Thomas suggestion in the following thread

[;

BR,

Saravanan