04-18-2006 11:32 AM
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?
04-18-2006 11:39 AM
Hi
It depends on the values you have loaded to be listed, perhaps the SPACE is available value.
Max
04-18-2006 11:43 AM
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>
04-18-2006 11:47 AM
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
04-18-2006 11:48 AM
Hi,
Check out these Demo Programs..
<b>DEMO_DROPDOWN_LIST_BOX
DEMO_DYNPRO_DROPDOWN_LISTBOX</b>
Regards
vijay
04-18-2006 12:42 PM
hi vijay,
both these examples have blank spaces at the end of the list
04-18-2006 12:48 PM
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.
04-19-2006 6:49 AM
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.
04-19-2006 6:55 AM
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.
04-19-2006 7:23 AM
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.