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

List-box - USERCOMMAND

Former Member
0 Likes
896

Hello all,,

am using the following code.

How i need to work this listbox with user-command.

TYPE-POOLS : VRM.
DATA : VALUES TYPE vrm_values.
DATA : VW LIKE LINE OF VALUES.

PARAMETERS : LIST(10) TYPE c AS LISTBOX VISIBLE LENGTH 10." user-command


INITIALIZATION.
vw-key = '1'.
vw-text = 'SUN'.
APPEND vw TO VALUES.

vw-key = '2'.
vw-text = 'MON'.
APPEND vw TO VALUES.


vw-key = '3'.
vw-text = 'TUE'.
APPEND vw TO VALUES.

CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'LIST'
values = VALUES
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
867

hi,

can u make it somewhat clear?

6 REPLIES 6
Read only

Former Member
0 Likes
868

hi,

can u make it somewhat clear?

Read only

0 Likes
867

yes, on selecting any value from list-box, it should display a list.

instead of pressing the execution button, just by selecting value from the list, it should go to the list.

in response to the user command of selecting.

Read only

0 Likes
867

but where to display..?

Read only

0 Likes
867

tale an example:

write:/ 'Hello'.

that's it.

it should come on selecting some value from the list box.

Could you HELP me????

Read only

0 Likes
867

ok..

means u using module pool and u having list box in selection criteria and when u select something from list box... some action shold take place.....

Is that so?

Read only

0 Likes
867

hi,

if this is the scenario than i have one example.

I have one list box on screen and one table control.

when i select some value in list box and press enter, table control fill with the values accor. to list box.

for this i have done like,

<b>MODULE user_command_1000 INPUT.</b>

CASE ok_code.

WHEN 'BACK' OR 'UP' OR 'CANC'.

LEAVE PROGRAM.

WHEN ''.

<b> IF itab-matnr IS NOT INITIAL.

PERFORM get_val.

ENDIF.</b> ENDCASE.

<b>ENDMODULE. " USER_COMMAND_1000 INPUT</b>

itab-matnr is my field which is list box.....

<b>FORM get_val .</b>

SELECT mblnr INTO CORRESPONDING FIELDS OF TABLE itab1 FROM mseg

WHERE matnr = itab-matnr.

<b>ENDFORM. " get_val</b>

try this

reward if useful