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: 

Field Transport Problem with FM VRM_SET_VALUES

Former Member
0 Kudos

I have a problem using FM VRM_SET_VALUES to initialize a listbox in a module pool program.

I have initialized the variables sent to the FM in the PBO and the listbox is filled correctly. It appears with all of the values when I put my cursor on the screen field. I can pick an entry and the entry appears in the field as soon as I do that; however, when I press enter, the entry disappears.

The field attributes have dropdown set to listbox, possible entries is ticked and value list is set to “A” (from program).

The field has a domain with a number of fixed values in the value range. When I simply let the listbox pick the values, the values are transported correctly (the field keeps the values).

Does anyone have any ideas on why the screen is behaving this way?

Thanks

Rob

4 REPLIES 4

Former Member
0 Kudos

Hi rob,

I think when you press enter it is not able to initialize list values.

You have to clear the list and again populate in PBO.

Example:

MODULE LISTBOX_INIT OUTPUT.


name = 'LISTBOX'. " Name of List Control
clear list.   "clearing list
value-key = '1'.
value-text = 'one'.
APPEND value TO list.
value-key = '2'.
value-text = 'two'.
APPEND value TO list.
value-key = '3'.
value-text = 'three'.
APPEND value TO list.

CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
  values = list.

ENDMODULE.                 " LISTBOX_INIT  OUTPUT

0 Kudos

Thanks - but list has already been cleared.

I think it's more of a field transport problem than VRM_SET_VALUES.

Rob

0 Kudos

is the listbox field on the screen references dictionary reference for that field?

If yes then rename to some other field without any dictionary reference then try.

0 Kudos

The field is in a table control and I normally try to make them all reference data dictionary objects. But I'll think about your idea some more.

Rob

I changed the filed, but it is processed in many places in the program, so it wasn't an easy chore to change everywhere it was used.

I tried, but may have missed some places. In any event, it didn't work out.

But I think it should work as advertised using my original approach.

Message was edited by: Rob Burbank