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 in modupl pool screen

Former Member
0 Likes
725

Hi,

I want to use simple drop down list in screen of module pool

program. & have to set 3 values initially.

How to add that values in listbox.

Hi,

I want to use simple drop down list in screen of module pool

program. & have to set 3 values initially.

How to add that values in listbox.

4 REPLIES 4
Read only

Former Member
0 Likes
697

Check the code in RSDEMO_DROPDOWN_LISTBOX program and u will find how to set the values in a list box. The same functionality can be written in u'r module pool program to set the values.

Read only

Former Member
0 Likes
697

Set the attribute of the field on the screen as Listbox in the dropdown box

In PBO write this code for your field

CLEAR wa_itab.

wa_itab-key = '1'.

wa_itab-text = '1'.

APPEND wa_itab TO it_itab.

wa_itab-key = '2'.

wa_itab-text = '2'.

APPEND wa_itab TO it_itab.

wa_itab-key = '3'.

wa_itab-text = '3'.

APPEND wa_itab TO it_itab.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'ZMATERIAL' "Here use your input box name in which you need dropdown

values = it_itab

EXCEPTIONS

id_illegal_name = 1

OTHERS = 2.

Read only

Former Member
0 Likes
697

Hi,

Use the function module F4IF_INT_TABLE_VALUE_REQUEST for that.

for example see the sample program DEMO_DROPDOWN_LIST_BOX

Regards,

Renjith Michael.

Read only

Former Member
0 Likes
697

hi,

u can do like this

declare that field as list box... ( in attribute )

then write this after PAI in screen flow logic...

PROCESS ON VALUE-REQUEST.

FIELD ifmtp-form_type MODULE fm_drop.

MODULE fm_drop INPUT.

CLEAR ifmtp.

REFRESH ifmtp.

ifmtp-form_type = 'C'.

APPEND ifmtp.

ifmtp-form_type = 'F'.

APPEND ifmtp.

ifmtp-form_type = 'H'.

APPEND ifmtp.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'FORM_TYPE'

value_org = 'S'

TABLES

value_tab = ifmtp.

IF sy-subrc 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDMODULE. " fm_drop INPUT

here ifmtp-form_type is my field of screen which i have declared as list box...

and u have to declare one internal table with this field in TOP Module...

DATA : BEGIN OF ifmtp OCCURS 0,

form_type LIKE zform_track_mast-form_type,

END OF ifmtp.

reward if usefull...

Edited by: Dhwani shah on Jan 22, 2008 12:45 PM