cancel
Showing results for 
Search instead for 
Did you mean: 

How to sort records in drop down box

Former Member
0 Kudos

Hi Experts,

I have created WD Program. There is one drop down box in the WD screen. This drop down box gets data from R/3 using RFC.

At present, we are getting data from R/3 without any sorting.

I have to sort the data appearing in the drop down box.

How I can do so?

Regards,

Gary

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

When you fill the attribute with data from R/3 you use IModifiableSimpleValueSet class.

This class has a sort method.

Answers (3)

Answers (3)

Former Member
0 Kudos

HI,

If the Value help is a drop down by key:

After you run the application ,

click on the value help, a window pops up with key valur pairs,

if you click on the column they will automatically get sorted.

Also if u want to filter you can type the letter (eg: A) in the first row and press enter. it filters the values accordinly.

Regards,

Satya.

Edited by: Satya on Jul 27, 2009 8:23 AM

Former Member
0 Kudos

Hi,

try the below code

wdContext.nodeMainNode().sortElements( new Comparator(){

public int compare( Object o1, Object o2 ){

int i = 0;

IPrivateRFCAppView.IMainNodeElement e1 = ((IPrivateRFCAppView.IMainNodeElement)o1);

IPrivateRFCAppView.IMainNodeElement e2 = ((IPrivateRFCAppView.IMainNodeElement)o2);

i = e1.getVar1().compareToIgnoreCase( e2.getVar1() );

return i;

}//compare

});

Try these threads,

Regards,

Sunaina Reddy T

ravindra_bollapalli2
Active Contributor
0 Kudos

This message was moderated.