Application Development and Automation 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: 
Read only

list Box

Former Member
0 Likes
1,527

hi all,

i'm facing a small probs,plz help me out of this,in my selection sceen i have a list box which should have 4 values.all those 4 values are not from any database table.i had created an internal table with those 4values,i want that four to be displayed in the drop downlist box on the selection screen.

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
1,215

Here is the code sample

type-pools: vrm.
data: name type vrm_id, list type vrm_values, value like line of
list.
parameters: p_obj(2) as listbox visible length 50 obligatory
            default 'AA' .
at selection-screen output.

clear list .
    refresh list .
    name = 'P_OBJ'.
    value-key = 'AA'. value-text = 'AA text'.
    append value to list .

     value-key = 'BB'. value-text = 'BB text'. append value to
    list .

    value-key = 'CC'. value-text =
    'CC text'.
    append value to list .

    call function 'VRM_SET_VALUES'
         exporting
              id     = name
              values = list.

Regards

Raja

10 REPLIES 10
Read only

athavanraja
Active Contributor
0 Likes
1,216

Here is the code sample

type-pools: vrm.
data: name type vrm_id, list type vrm_values, value like line of
list.
parameters: p_obj(2) as listbox visible length 50 obligatory
            default 'AA' .
at selection-screen output.

clear list .
    refresh list .
    name = 'P_OBJ'.
    value-key = 'AA'. value-text = 'AA text'.
    append value to list .

     value-key = 'BB'. value-text = 'BB text'. append value to
    list .

    value-key = 'CC'. value-text =
    'CC text'.
    append value to list .

    call function 'VRM_SET_VALUES'
         exporting
              id     = name
              values = list.

Regards

Raja

Read only

0 Likes
1,215

thank u raja,

its working very well,here based upon the vlue key we have to select the data na,plz guide me how to give the condition,to select the data for particular selection on the screen .koncham

Read only

0 Likes
1,215

Do you want to make a selection from DB table based on what user selected in the parameter field?

if yes , in the given example the value will be avaialable in <b>p_obj.</b>

select * from xxxx into table yyyy where xxx = <b>p_obj</b> .

is this what you want?

Also, since your question is answered why dont you reward the answers that helped you and close the thread.

Regards

Raja

Read only

0 Likes
1,215

hi raja,

actually i had displayed 4 names in the list,for each four names there are 4 values,for example i had displayed a,b,c,d in the list box.and i had assigned 1,2,3,4 for each values diplayed.upon selecting the a in the list box,it should take 1 for selection criteria.how to do this let me know.

Read only

0 Likes
1,215

Are you saying that the your list table is like below.

value-key = '1'.

value-text = 'A'.

append value to list .

value-key = '2'.

value-text = 'B'.

append value to list .

value-key = '3'.

value-text = 'C'.

append value to list .

value-key = '4'.

value-text = 'D'.

append value to list .

If yes, then when the user selects 'A' , '1' will be passed to the parameter field automatically.

Regards

Raja

Read only

0 Likes
1,215

hi raja,

thanks for ur help but for single value text i have to pass 3 value-keys,how to do,its urgent for me.help me out

Read only

0 Likes
1,215

your requirement is not clear

do you want something like this.

value-key = '1'.

value-text = 'A'.

append value to list .

value-key = '2'.

value-text = 'A'.

append value to list .

value-key = '3'.

value-text = 'A'.

append value to list .

this wont be useful/meaningful.

May be if you explain your requirement clearly we can helpout.

Regards

Raja

Read only

0 Likes
1,215

i have four texts vertex,chem,system and cm4,this things to be displayed in the list box which i'm able to do,and cm4 has value xxxx,system value xxxx, chem value xxxx and vertex is having 3 values as xxxx,xyxy,yyyy.

i'm passing among this selected one into select statement in where condition for system field prodh.

it is working for all the text i.e cm4,system and chem.but it is not working for vertex which is having 3 values.it is taking only the last value.

Read only

0 Likes
1,215

OK got your point.

This you have to code it your self.

for vertex set the key to some unique stuff 'ABC'

create a range table.

ranges: test like <xxx> .

when the user selects 'ABC'

fill the range table with xxxx, xyxy, yyyy

then do the select where <ddd> in test .

Hope this is clear.

Regards

Raja

Read only

Former Member
0 Likes
1,215

Hi Anil,

This topic ahs been discussed in the past in this form. Please search through the fourm and I'm sure you'll find the answer. One of the topics will be

Regards,

Anand Mandalika.