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 and table

Former Member
0 Likes
1,383

Hi all,

i need to put the content of my specific table (10 lines) into a listbox, i would like to display the code + description into my list, like that :

EC myChoice1

ET myChoice2

MO myChoice3

...

Thanks

Regards,

1 ACCEPTED SOLUTION
Read only

Lakshmant1
Active Contributor
0 Likes
1,265

Hi Tafkap,

Have a look at demo program DEMO_DYNPRO_DROPDOWN_LISTBOX.

Thanks

Lakshman

Hi Tafkap,

Have a look at demo program DEMO_DYNPRO_DROPDOWN_LISTBOX.

Thanks

Lakshman

7 REPLIES 7
Read only

Former Member
0 Likes
1,265

Hi,

Use the POV event for this particular field and use the function mudule 'F4IF_INT_TABLE_VALUE_REQUEST' and pass the internal table with both fields in it. It must display as I remember we did it sometime before.

Regards,

Srikanth

Read only

Former Member
0 Likes
1,265

Use this function module !

VRM_SET_VALUES

<b>if it did help you don't forget the reward!</b>

report z.
type-pools: vrm.
data: it_val type vrm_values,
      w_line like line of it_val.
parameters p_bukrs like t001-bukrs as listbox
           visible length 25 obligatory.

initialization.
  select bukrs butxt from t001 into (w_line-key, w_line-text).
    append w_line to it_val.
    check p_bukrs is initial.
    p_bukrs = w_line-key.
  endselect.

at selection-screen output.
  call function 'VRM_SET_VALUES'
       exporting
            id     = 'P_BUKRS'
            values = it_val.

end-of-selection.
  write: / 'Company Code:', p_bukrs.

Read only

Lakshmant1
Active Contributor
0 Likes
1,266

Hi Tafkap,

Have a look at demo program DEMO_DYNPRO_DROPDOWN_LISTBOX.

Thanks

Lakshman

Read only

Former Member
0 Likes
1,265

Hi tafkap,

1. try this program (just copy paste)

important things are :

TYPE-POOLS: vrm.

CALL FUNCTION 'VRM_SET_VALUES'

DATA: it_val TYPE vrm_values,

AT SELECTION-SCREEN OUTPUT.

2.

REPORT abc .

TYPE-POOLS: vrm.

DATA: it_val TYPE vrm_values,

w_line LIKE LINE OF it_val.

PARAMETERS p_diff LIKE t001-bukrs AS LISTBOX

VISIBLE LENGTH 16 OBLIGATORY .

*----


INITIALIZATION.

SELECT bukrs butxt

INTO TABLE it_val

FROM t001.

AT SELECTION-SCREEN OUTPUT.

----


CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'P_DIFF'

values = it_val.

regards,

amit m.

Read only

0 Likes
1,265

Maybe it is interesting to not post 2 times same solution !

Read only

Former Member
0 Likes
1,265

hi

you can use this function module.

in the RETFIELD mention your dbtable from which you are fetching data into internal table.

and in VALUE_TAB mention your internal table in which your values are stored

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

  • RETFIELD = ' '

  • PVALKEY = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

  • VALUE_TAB =

  • FIELD_TAB =

  • RETURN_TAB =

  • DYNPFLD_MAPPING =

  • EXCEPTIONS

  • PARAMETER_ERROR = 1

  • NO_VALUES_FOUND = 2

  • OTHERS = 3

Read only

Former Member
0 Likes
1,265

hi

you can use this function module.

in the RETFIELD mention your dbtable from which you are fetching data into internal table.

and in VALUE_TAB mention your internal table in which your values are stored

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

  • RETFIELD = ' '

  • PVALKEY = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

  • VALUE_TAB =

  • FIELD_TAB =

  • RETURN_TAB =

  • DYNPFLD_MAPPING =

  • EXCEPTIONS

  • PARAMETER_ERROR = 1

  • NO_VALUES_FOUND = 2

  • OTHERS = 3