tables: likp.
select-options: p_sjfhr for likp-wadat_ist no-extension no-display.
selection-screen begin of line.
selection-screen position 1.
selection-screen comment (8) text-f01 for field p_dlow."选择日期文本
selection-screen position 33.
parameters: p_dlow type sy-datum."开始日期
parameters: p_tlow type sy-uzeit default '000000'."开始时间
selection-screen position 53.
selection-screen comment (4) text-f02 for field p_dhigh ."到文本
selection-screen position 58.
parameters: p_dhigh type sy-datum."截止日期
parameters: p_thigh type sy-uzeit default '235959'."截止时间
selection-screen end of line.
at selection-screen.
data: lwa_datum like line of p_sjfhr.
if p_dlow is not initial and p_dhigh is not initial and p_dlow > p_dhigh.
message e000(oo) with '选择日期下限大于上限'.
else.
clear:p_sjfhr[].
lwa_datum-low = p_dlow.
lwa_datum-high = p_dhigh.
lwa_datum-sign = 'I'.
if lwa_datum-high is initial.
if lwa_datum-low is initial.
"不操作
else.
lwa_datum-option = 'EQ'.
append lwa_datum to p_sjfhr.
endif.
else.
lwa_datum-option = 'BT'.
append lwa_datum to p_sjfhr.
endif.
"读取range中的一行
if p_sjfhr[] is not initial.
read table p_sjfhr index 1.
endif.
endif.
程序执行结果如下:
评论