cancel
Showing results for 
Search instead for 
Did you mean: 

Country/Land dropdownindex

Former Member
0 Kudos

Hi,

Can anyone help me with the following !!

I need to let the user select a country from a Webdynpro view.

It is possible to load all the entries onetime when the view is first time displayed or load the entries dynamicaly according to the user input(Say,if user types "Man",then it load all the countries starting "Man").

My question is

1.Is there any better known solution in context with Performance ?.

2.Is there any other special webdynpro UI for this purpose ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You can also think of using the Extended value selector. Well it will give you something like a popup which will have ability to filter the countries based on the key entered. If its just a simple dropdown and you want to select the country based on your scenario you can use Anilkumars approach.

Well try the EVS option also and see if that could serve your purpose.

Refer to this help

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/2833ce90-0201...

It explains your scenario.See if that helps.

regards

ravi

Former Member
0 Kudos

Hi,

I have tried this already,in principle it works except that after you selected a country from the pop up,it displays the key instead of the text.(key - 91 ,Text - India).I have also seen another tutorial which explain EVS++ scenario (Displaying text instead of keys in the input field),but it is based on Enumeration.I do not know how to make this work based on EVS++ scenario.

I have also noticed that for the following code ,it takes 45 secs to bring the view to give a selection.It is very poor performance for us.

public void wdDoInit()

{

//@@begin wdDoInit()

IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(IPrivateMain.IContextElement.COUNTRY);

ISimpleTypeModifiable countryType = attributeInfo.getModifiableSimpleType();

countryType.setFieldLabel("Country");

IModifiableSimpleValueSet valueSet = countryType.getSVServices().getModifiableSimpleValueSet();

for(int i=1;i<15000;i++){

valueSet.put(""i,"Country "i);

}

// wdContext.currentContextElement().setCountry("Key_0");

//@@end

}

May be you guys can help me.

thanks in advance

Message was edited by: Baskaran Senthivel

Former Member
0 Kudos

hi baskaran,

Refer this link

hope this helps you

You can access the text also in dropdown

Regards

Rohit

Former Member
0 Kudos

Hi Rohit,

First thanks for your response help.Unfortunately,i am not sure that your suggestion is what i am looking for or may be i didnt understand correctly.

What i see in the given suggesstion is that it uses Dropdownkey UI and Message Manager being used to display the description of the selectedKey.

In my situation,i am not using DropDownKey UI,i am using simple InputField with ValueHelp.

Also i do not want to Display the result in MessageManager.

Answers (2)

Answers (2)

Former Member
0 Kudos

I think for your requirement you can use simple value help.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/va... help in web dynpro applications.pdf

2. Another way is writing your own logic.

I mean on Click of "Search" button you can populate the context.

But i feel better to use the existing features provided by WebDynpro !!!

Regards, Anilkumar

Former Member
0 Kudos

Thanks Anil,i think of using your suggested solution

Former Member
0 Kudos
Former Member
0 Kudos

Thanks Anil,

I have seen this tutorials already !.I wanted to know if anybody is having some other idea and solution.