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: 

How to create a ListBox in module pool program in 3.1i system ?

Former Member
0 Kudos

Hi All,

How to create a ListBox of type module pool program in 3.1i system ?

when i tried creating, the listbox option is disabled.

Thanks in advance.

Edited by: gulab zehra on Aug 20, 2009 1:26 PM

7 REPLIES 7

Former Member
0 Kudos

Hi,

please go through this...

LIST BOX

Drop down list box can be created in a dialog screen(SE51) as well as selection screen.

In screen painter to create a input/output field into list box we use 'L" as a value for dropdown attribute for the i/o field. In screen painter to determine the type of method that will be used to fill the value list we use the attribute value list. If it is blank, the value list will be filled by the first column of the input help assigned to the screen field. This input help can be defined in the ABAP Dictionary, on screen using SELECT,VALUES screen statements or in event POV (PROCESS ON VALUE-REQUEST ) and the input help that will be passed to the field should consists of 2 columns ,the key column is filled automatically by the system. SAP recommends value list field should be blank.

or

The value can be 'A' meaning that the value list will be filled in the event PBO(PROCESS BEFORE OUTPUT) or before the screen is displayed.In this method we use function module VRM_SET_VALUES to fill the values and pass it to the i/o field. If a function code is attached to the list box the selection of a value triggers a PAI otherwise PAI will not trigger. LIST BOX in SELECTION SCREEN

List Box is created in selection screen using PARAMETERS statement with

AS LISTBOX addition other attributes like VISIBLE LENGTH (width of listbox) can be specified with the declaration. PARAMETERS name AS LISTBOX VISIBLE LENGTH n.

The function module VRM_SET_VALUES is used to fill the value list associated with a List Box .This FM uses types which are declared in type group VRM. So we should declare TYPE-POOLS VRM before using this FM.

Some important types declared in the VRM type group are

VRM_ID

It refers to the name of the input/output field associated with list box

VRM_VALUES

It refers to the internal table consisting of two fields TEXT(80C) and KEY(40)C

that will be used to create the list values.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

ID = name of screen element, it is of TYPE VRM_ID

VALUES = internal table containing values, of TYPE VRM_VALUES

Thanks

Ashu Singh

0 Kudos

Hi,

I need to create Drop down list box in a dialog screen(SE51) in 3.1i system.

In screen painter to create a input/output field into list box we use 'L" as a value for dropdown attribute for the i/o field.

LISTBOX in the Dropdown attribute in the Screen Painter is disabled, how do i enable it?

where do i have to set the value to 'L' in dialog screen. there are just checkboxes. no place to enter a value.

Thanks in advance.

Edited by: gulab zehra on Aug 21, 2009 5:16 AM

Edited by: gulab zehra on Aug 21, 2009 5:19 AM

Former Member
0 Kudos

Hi,

  • go to se51

  • give the screen number you want to generate and the program name

  • give short description

  • click on layout tab

  • click on i/o box and draw a input output box on screen area

  • Double click on input/output box

  • you will get the screen painter attribute window

  • In Dropdown select Listbox

this is just the steps u need to follow....

as you are saying you are getting Dropdown field in disabled mode you screen may not be in edit mode so just change from display to edit mode....

Thanks

Ashu

Former Member
0 Kudos

and dont forget to activate

Regards

Ashu

0 Kudos

Hi Ashu,

The screen is in edit mode becoz m able to change other attributes only dropdown attribute m not able to change.

Former Member
0 Kudos

Hi,

Please refer the DEMO program below:

RSDEMO_TABLE_CONTROL

DEMO_DYNPRO_DROPDOWN_LISTBOX

You can refer the links also given below:

http://sap.niraj.tripod.com/id38.html

Hope it helps

Regards

Mansi

Former Member
0 Kudos

hii Gulab,

Create a domain for which u want to assign this list box. Go to value range and enter the values. Now assign this domain to data element to screen parameter for which list box is to be attached.

u can refer to thiss link also,

Hope it helps

rgrds,

Shweta

Edited by: Shweta Joon on Aug 21, 2009 7:19 AM