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

table control-List box?

Former Member
0 Likes
493

Hi, All:

in the dialog programming. I define one table control, within it, I define one field as list box. how to populate all value to this list field within table control.

Thanks,

victor

4 REPLIES 4
Read only

Former Member
0 Likes
463

If the domain has fixed values it will get updated automtically.

Read only

0 Likes
463

Hi, Vineela Allamneni:

My list value comes from one database table.

Thanks,

Victor

Read only

Former Member
0 Likes
463

Hi,

Check the DEMO program DEMO_DROPDOWN_LIST_BOX. Hope it will be useful for ur requirement.

Thanks,

Satya

Read only

Former Member
0 Likes
463

Hello,

Use FN VRM_SET_VALUES.

I am providing the code below witten by Rich, please go through.

report  zrich_0001.
 
type-pools: vrm.
 
data: begin of itab occurs 0,
      field(10) type c,
      end of itab.
 
data: ivrm_values type vrm_values.
data: xvrm_values like line of ivrm_values.
data: name type vrm_id.
 
start-of-selection.
 
 
  call screen 100.
*&---------------------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module status_0100 output.
*  SET PF-STATUS 'xxxxxxxx'.
*  SET TITLEBAR 'xxx'.
 
  name = 'ITAB-FIELD'.
 
  xvrm_values-key = '1234567890'.
  xvrm_values-text = '1234567890'.
  append xvrm_values to ivrm_values.
 
  xvrm_values-key = '0987654321'.
  xvrm_values-text = '0987654321'.
  append xvrm_values to ivrm_values.
 
  call function 'VRM_SET_VALUES'
    exporting
      id     = name
      values = ivrm_values.
 
endmodule.                 " STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module user_command_0100 input.
 
endmodule.                 " USER_COMMAND_0100  INPUT
 
*&SPWIZARD: DECLARATION OF TABLECONTROL 'ITABCON' ITSELF
controls: itabcon type tableview using screen 0100.
 
*&SPWIZARD: OUTPUT MODULE FOR TC 'ITABCON'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: UPDATE LINES FOR EQUIVALENT SCROLLBAR
module itabcon_change_tc_attr output.
  describe table itab lines itabcon-lines.