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 or list bob

Former Member
0 Likes
529

Hi,

When i put a drop down box or list box as a parameter in a report.

i am getting a blank entry.

lets say i have 4 choices then all 4 are there along with that i have one blank.

I don't want that blank.

i am unable to remove that blank.

can you help me

thanks,

netu.

3 REPLIES 3
Read only

Former Member
0 Likes
489

Hi Gurus,

Is there any one who can help me.

Thanks,

Neetu.

Read only

Former Member
0 Likes
489

Hi Neetu,

U will get one blank entry. I think this was a standard. You can set one of the 4 entries as a default.

Get the id's first using VRM_GET_IDS and VRM_GET_VALUES.

Use this fm VRM_DELETE_VALUES to delete the blank entry.

reward points.

Thanks

Sampath.

Read only

0 Likes
489

Hi All,

Check this.

This code will provide you a dropdown or a list box with out a blank in its entries.

put your own messge class (some 'Z' class).

or remove the message popup at this location.

CASE p_mode.

WHEN 'N'.

MESSAGE I712.

WHEN 'A'.

MESSAGE I713.

WHEN 'E'.

MESSAGE I714.

ENDCASE.

<b>The program code starts here.</b>

*&----


**& <b>Report ZDROPDOWN</b>

**&

*&----


**&

**&

*&----


*

REPORT zdropdown NO STANDARD PAGE HEADING

MESSAGE-ID zabc.

  • a very good program for drop down box *******

DEFINE make_dropdown.

selection-screen begin of line.

selection-screen comment 1(30) &4.

selection-screen position pos_low.

parameters: &1 as listbox visible length &2 default &3 obligatory.

selection-screen end of line.

END-OF-DEFINITION.

SELECTION-SCREEN BEGIN OF BLOCK bdc_options WITH FRAME TITLE dropdown.

make_dropdown p_mode(1) 30 'N' mod_desc.

make_dropdown p_uptyp(1) 30 'S' upd_desc.

SELECTION-SCREEN END OF BLOCK bdc_options.

*-- Fill the dropdown list boxes before displaying them

AT SELECTION-SCREEN OUTPUT.

PERFORM fill_dropdown_list USING 'P_MODE'.

PERFORM fill_dropdown_list USING 'P_UPTYP'.

INITIALIZATION.

dropdown = 'DROP DOWN LIST'.

AT SELECTION-SCREEN .

CASE p_mode.

WHEN 'N'.

MESSAGE I712.

WHEN 'A'.

MESSAGE I713.

WHEN 'E'.

MESSAGE I714.

ENDCASE.

START-OF-SELECTION.

WRITE 😕 'DROP DOWN PROGRAM'.

*-- Open input file or Read data from database tables

END-OF-SELECTION.

  • FORM fill_dropdown_list *

----


  • Populate the dropdown list for the parameter provided *

----


  • --> VALUE(F_PARAMETER) *

----


FORM fill_dropdown_list USING value(f_parameter).

TYPE-POOLS: vrm. " For parameter drop down lists

*-- Definitions for parameter drop down lists

DATA:

name TYPE vrm_id,

list TYPE vrm_values,

value LIKE LINE OF list.

name = f_parameter.

CASE f_parameter.

WHEN 'P_MODE'.

value-key = 'N'. value-text = 'Do not display any screens'.

APPEND value TO list.

value-key = 'A'. value-text = 'Display ALL screens'.

APPEND value TO list.

value-key = 'E'. value-text = 'Only display screens in error'.

APPEND value TO list.

WHEN 'P_UPTYP'.

value-key = 'S'. value-text = 'Update in Synchronous Mode'.

APPEND value TO list.

value-key = 'A'. value-text = 'Update in Asynchronous Mode'.

APPEND value TO list.

WHEN OTHERS.

ENDCASE.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = name

values = list.

ENDFORM." fill_dropdown_list

************************

Thanks and Regards,

Neetu.