List box at selection screen

type-pools: vrm.
data: it_list type vrm_values,
list_value type vrm_value.
* --- selection screen
parameters: p_period(2) type c as listbox visible length 15 obligatory. " Period
data: p_num type i value '1',
p_len type i,
p_temp(2) type c.

at selection-screen output.
clear it_list.
refresh it_list.
data p_num type i value '1'.
do 16 times.
clear: p_len,p_temp.
clear list_value.

p_temp = p_num.
p_len = strlen( p_temp ).

if p_len = '1'.
concatenate '0' p_temp into p_temp.
endif.
condense p_temp.
list_value-key = p_temp.
list_value-text = p_temp.
append list_value to it_list.
p_num = p_num + 1.
enddo.

call function 'VRM_SET_VALUES'
exporting
id = 'P_PERIOD'
values = it_list
exceptions
id_illegal_name = 1
others = 2.

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11011430/viewspace-1017637/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/11011430/viewspace-1017637/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值