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

Listbox Problem

Former Member
0 Likes
801

Hi Guys!

I have a very interessting Problem with Listboxes.

For Example:

There is a Table with Car-Manufacturer. The Key is "BWM" and the Description in the Text Table is also "BWM".

Now the Problem: Showing the data in a dynpro-listbox with option "show keys" presents me the key, but the description is lost. switching off the option "show keys" the description is shown.

Does anyone here know how to solv the problem?

Greetings and merry X-Mas!

Roland

4 REPLIES 4
Read only

Former Member
0 Likes
717

Hi Roland,

1. I suppose in dynpro u are using

PROCESS ON VALUE-REQUEST.

field mylist module abc.

(some sort of the above)

2. I tried the same with

on eg of BUKRS, BUTXT

It works fine.

3. The Code for on-request is :

MODULE abc INPUT.

DATA : BEGIN OF itab OCCURS 0,

bukrs LIKE t001-bukrs,

butxt like t001-butxt,

END OF itab.

SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE itab.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'BUKRS'

value_org = 'S'

TABLES

value_tab = itab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

ENDMODULE. " abc INPUT

I hope it helps.

Regards,

Amit M.

Read only

sridharreddy_kondam
Active Contributor
0 Likes
717

Hi,

Check whether u maintained all 4 filed label for that particular dataelement of the field...

May solve u r problem ?

or check whether u have user like or type for that field in the program while declaring...

Regards..

Sridhar Reddy k

Message was edited by: sridhar reddy kondam

Read only

abdul_hakim
Active Contributor
0 Likes
717

You have to pass all your key and description to text attribute of the list box.

For eg,

DATA: name TYPE vrm_id,

list TYPE vrm_values,

value LIKE LINE OF list.

value-text = <all your key and description>

Afterwards call the FM VRM_SET_VALUES

REgards,

Abdul

Read only

Former Member
0 Likes
717

Hi Roland,

For this problem I think you have to use VRM_SET_VALUES function module,where export parameter VALUES you have to send an internal table which is type VRM_VALUES.In VRM_VALUES there are two fields NAME(Char 40) and TEXT(Char 80).to get the description you have to populate the text.

If this is a module pool programe and if you want standard table entries then put 'L' in the list box else 'A'.Please remember that you are going to use the FM VRM_SET_VALUES when the list box entry is 'A',and you have to code in PBO for this.But this is not recomended by SAP.

Hope this will help you.

Warm Regards.

SK.