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: 

Display listbox key value in ALV GRID method

Former Member
0 Kudos
550

Hi All,

I have a program in which columns are generted dynamically based on number of fields. The column name is dynamic as it depends on its text while The value in Column's can be 1, 2, 3, 4, 5.

I am trying to display this in a list box along with the text which are maintained as fixed values at domain level.

space Walking

1 Archery

2 Boxing

3 Cycling

4 Rowing

Also I am displaying by using 'DD_DOMVALUEs_GET, looping through all the fixed values and concatenate

domvalue_l ddtext separated by cl_abap_char_utilities=>horizontal_tab. No tab space is coming between key and value.

Also for the 1st value which is space it is not coming properly as space is condensed.

The point is that after I am putting values in the grid. The system event data changed is called where the value selected is 1 Archery and it is going to bad cells, error protocol display . I want only the 1st character. How to modify the content in the grid before the system event gets called.

Regards,

DPM

1 REPLY 1

0 Kudos
101

Hi,

try follow code to setup fieldcat of that DROP DOWN field.

FCAT-DOMNAME = ' '.

FCAT-CHECKTABLE= '!'.