Application Development 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: 

listboxes in dialog programming

Former Member
0 Kudos

hi,

When displaying a listbox on the screen, a blank space always appears at the bottom of the drop-down menu. Is there any way to remove the blank space such that only the listed values appear?

9 REPLIES 9

Former Member
0 Kudos

Hi

It depends on the values you have loaded to be listed, perhaps the SPACE is available value.

Max

Former Member
0 Kudos

hi sruty,

give the field as <b>obligatory</b>.

example..

PARAMETERS p_carrid TYPE spfli-carrid

AS LISTBOX VISIBLE LENGTH 20

DEFAULT 'LH' obligatory.

<b>close this thread if ur query is solved and mark helpful answers..</b>

Former Member
0 Kudos

Hi Sruthy,

If you are using an internal table to load the values to the list box, then remove any blank lines before uploading the same to the list box.

This might solve your problem.

Regards,

Kunal

former_member188685
Active Contributor
0 Kudos

Hi,

Check out these Demo Programs..

<b>DEMO_DROPDOWN_LIST_BOX

DEMO_DYNPRO_DROPDOWN_LISTBOX</b>

Regards

vijay

0 Kudos

hi vijay,

both these examples have blank spaces at the end of the list

0 Kudos

Hi Sruthy,

You can prevent blank spaces from being displayed at the end of list by providing <b>obligatory</b> addition in the parameters statement.

Just check this code by using the obligatory keyword.

REPORT ZSHAIL_LISTBOX1 .

type-pools: vrm.

data: it_val type vrm_values,

w_line like line of it_val.

parameters p_bukrs like t001-bukrs as listbox

visible length 25 obligatory.

initialization.

select bukrs butxt from t001 into (w_line-key, w_line-text).

append w_line to it_val.

check p_bukrs is initial.

p_bukrs = w_line-key.

endselect.

at selection-screen output.

case p_bukrs.

when '0002'.

message i001(zmess).

endcase.

*

call function 'VRM_SET_VALUES'

exporting

id = 'P_BUKRS'

values = it_val.

Now remove the obligatory keyword. You can see the difference.

Hope your query is solved.

Regards,

SP.

0 Kudos

hi,

How do u select the description field from the datbase table as it is not one of the fields of the table? I want to display the description field along with the main field.

0 Kudos

Hi,

Descriptions are available in another table and not in master tables!!

You have to select the descriptions for a main field from this table and then use it. U can use Outer joins to do this.

For example, Material master(mara) stores the material number(matnr) and other details. The descriptions are not stored in MARA but they are present in MAKT.

Btw, what descriptions do u want to display?

Thanks,

Rashmi.

0 Kudos

Hi Tresa,

I think this is a new thread and it should be posted as a new query. So please close the previous thread.

Regards,

SP.