Application Development 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: 

how to get distinct values in list box

Former Member
0 Kudos
164

hi,

i want to know how to get distinct values in list box.

amit

1 ACCEPTED SOLUTION

Former Member
0 Kudos
45

You can use <b>ON CHANGE</b>. Before using this <b>sort your internal table</b> according to the field name.

SORT ITAB BY <fieldname>.

LOOP AT ITAB.

ON CHANGE OF ITAB-<FieldName>.

value-text = ITAB-<fieldname>.

APPEND value TO list.

ENDON.

ENDLOOP.

2 REPLIES 2

Former Member
0 Kudos
46

You can use <b>ON CHANGE</b>. Before using this <b>sort your internal table</b> according to the field name.

SORT ITAB BY <fieldname>.

LOOP AT ITAB.

ON CHANGE OF ITAB-<FieldName>.

value-text = ITAB-<fieldname>.

APPEND value TO list.

ENDON.

ENDLOOP.

Former Member
0 Kudos
45

hi amit!

welcome to you. i think this will solve your problem.

sort <TableName> by <fieldname>.

loop at <TableName>.

on change of <TableName>-<FieldName>.

value-text = <TableName>-<fieldname>.

append value to list.

endon.

endloop.

with thanx and regards:

saroj kumar

Message was edited by: saroj kumar

Message was edited by: saroj kumar

Message was edited by: saroj kumar