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

drop down box in module pool

Former Member
0 Likes
551

hai i have one requiremnt in module pool. of PS module. i have create user filds in list box but how can i call sub screen of corresponding user field, click on user field corresponding screen will come,i have create 11 sub screen of 11 user field it is very urgent im very new in module pool plz send the coding?

4 REPLIES 4
Read only

Former Member
0 Likes
453

Hi Shiek,

LIST BOX in SELECTION SCREEN

List Box is created in selection screen using PARAMETERS staement

with AS LISTBOX addition other attributes like VISIBLE LENGTH (width of listbox)

can be specified with the declaration.

PARAMETERS name(n) AS LISTBOX VISIBLE LENGTH n.

Here n is an integer and name is the name of parameter.

To populate the value list we use the FM VRM_SET_VALUES and the

selection screen event AT SELECTION-SCREEN OUTPUT is used to write the code to fill it.

VRM_SET_VALUES

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

<REMOVED BY MODERATOR>

cheers,

Hema.

Edited by: Alvaro Tejada Galindo on Jan 22, 2008 5:18 PM

Read only

Former Member
0 Likes
453

Hi,

Try with the case syntax i think, it works

Reg

Praveen

Read only

Former Member
0 Likes
453

YOu can use the program:

DEMO_DYNPRO_DROPDOWN_LISTBOX as an example.

Read only

Former Member
0 Likes
453

hi Sheik, try this code, it works.

Check the following code:

TYPE-POOLS: VRM.

DATA: NAME TYPE VRM_ID,

LIST TYPE VRM_VALUES,

VALUE LIKE LINE OF LIST.

PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.

AT SELECTION-SCREEN OUTPUT.

NAME = 'PS_PARM'.

VALUE-KEY = '1'.

VALUE-TEXT = 'LINE 1'.

APPEND VALUE TO LIST. VALUE-KEY = '2'.

VALUE-TEXT = 'LINE 2'.

APPEND VALUE TO LIST.

CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.

START-OF-SELECTION.

WRITE: / 'PARAMETER:', PS_PARM.

<REMOVED BY MODERATOR>

cheers,

Hema.

Edited by: Alvaro Tejada Galindo on Jan 22, 2008 5:18 PM