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

parameters in report

Former Member
0 Likes
880

hi guys,

need ur help. I'm declaring a parameter for a field which is of char 1.

now the problem is, it is coming as checkbox and not as a listbox.

i cannot use select-options for this due to some standards of the client.

Can anyone tell me as how i can have a listbox for this using parameters.

hi guys,

need ur help. I'm declaring a parameter for a field which is of char 1.

now the problem is, it is coming as checkbox and not as a listbox.

i cannot use select-options for this due to some standards of the client.

Can anyone tell me as how i can have a listbox for this using parameters.

4 REPLIES 4
Read only

Former Member
0 Likes
816

HI,

Try as below :



Parameters : flag type c.

For list box :

... AS LISTBOX

Effect

Generates a dropdown list box for the parameter p input field on the selection screen. If the parameter is created with a data type from the ABAP Dictionary and the data type is linked with an input help from the ABAP Dictionary, the system displays the first input help column in the list box.

Note

You must always specify the VISIBLE LENGTH addition with the AS LISTBOX addition, to define a suitable list box width for the input help.

Example

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

Addition 23

... USER-COMMAND ucom

Effect

This addition is only supported for parameters that are defined as checkboxes or radio buttons. In this case, clicking the parameter triggers the user command ucom, similarly to SELECTION-SCREEN PUSHBUTTON.

Notes

Since all parameters of a radio button group have the same user command, you can only use this addition with the first parameter in the group. The user command is then triggered when you click any button in the group.

If the parameter does not have the RADIOBUTTON GROUP or AS CHECKBOX addition, it must have type Character and length 1. It is then displayed as a checkbox.

Thanks,

Sriram Ponna.

Edited by: Sriram Ponna on Feb 8, 2008 4:04 PM

Read only

Former Member
0 Likes
816

Addition 6

... AS LISTBOX VISIBLE LENGTH vlen [USER-COMMAND fcode]

Effect:

This addition generates a dropdown list box for an input field on the selection screen. If the parameter is created with a data type from the ABAP Dictionary, and the data type is linked to the input help in the Dictionary, the first column of the input help is displayed in the list box. Otherwise, a single-line list box is displayed containing the current value of the parameter.

The addition VISIBLE LENGTH must be used to specify the visible length of the input field. The explicit specification of the length is necessary as the length of the entries in the list box is usually different to the actual length of the parameter.

The addition USER-COMMAND can be used to assign a function code fcode to the dropdown list box. The function code fcode must be specified directly and can have a maximum length of 20 characters. To evaluate the function code, an interface work area of the structure SSCRFIELDS from the ABAP Dictionary must be declared using the statement TABLES. When the user selects a line of the list box on the selection screen, the runtime environment triggers the event AT SELECTION-SCREEN and transfers the function code fcode to the component ucomm of the interface work area sscrfields.

Note:

Without the addition USER-COMMAND, selecting a line in the dropdown list box does not lead to the event AT SELECTION-SCREEN.

Example:

The parameter p_carrid is displayed with length 20 and with the name "Lufthansa" already entered. The user can select a different airline carrier, in which case a three-character abbreviation is assigned to the parameter.


PARAMETERS p_carrid TYPE spfli-carrid 
                    AS LISTBOX VISIBLE LENGTH 20 
                    DEFAULT 'LH'. 

Read only

Former Member
0 Likes
816

Hi,

PARAMETERS : p_mngrp LIKE viqmsm-mngrp

AS LISTBOX VISIBLE LENGTH 1,

Don't forget to reward if useful....

Read only

Former Member
0 Likes
816

Hi,

if u declare a parameter with user-command addition it ll be displayed only as check box...........

remove user-command addition

Cheers,

jose.