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

Former Member
0 Likes
619

Hi,

how to create drop down box for parameter in a report.

Regards

murali

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
593

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

Edited by: jackandjay on Dec 28, 2007 2:51 AM

6 REPLIES 6
Read only

former_member156446
Active Contributor
0 Likes
594

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

Edited by: jackandjay on Dec 28, 2007 2:51 AM

Read only

Former Member
0 Likes
593

Hi

Delacaration is something like this

parameters : p_matnr type matnr as list-box visible length 10.

~ Ranganath

Read only

Former Member
0 Likes
593

Hi,

Use this

PARAMETERS p TYPE spfli-carrid AS LISTBOX VISIBLE LENGTH 20.

U can fill this box in initialization event by filling paramater p.

regards,

pankaj

Read only

Former Member
0 Likes
593

Hi krishna,

As per best of my knowledge we can use listbox

for example

S_QMART LIKE viqmel-qmart as listbox visible length 10.

in this way u can keep a drop down box

thanks&regards

swaroop

Edited by: Jyothi Swaroop Kaza on Dec 28, 2007 9:00 AM

Read only

Former Member
0 Likes
593

Hi,

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.

Regards,

Bhaskar

Read only

Former Member
0 Likes
593

check these threads :

?

?