‎2007 Dec 28 7:48 AM
Hi,
how to create drop down box for parameter in a report.
Regards
murali
‎2007 Dec 28 7:50 AM
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
‎2007 Dec 28 7:50 AM
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
‎2007 Dec 28 7:50 AM
Hi
Delacaration is something like this
parameters : p_matnr type matnr as list-box visible length 10.
~ Ranganath
‎2007 Dec 28 7:52 AM
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
‎2007 Dec 28 7:56 AM
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®ards
swaroop
Edited by: Jyothi Swaroop Kaza on Dec 28, 2007 9:00 AM
‎2007 Dec 28 8:20 AM
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
‎2007 Dec 28 8:47 AM