"有效期校验逻辑
CLEAR lv_flg.
CLEAR lv_datum.
IF gt_alv IS NOT INITIAL.
IF s_data-low IS INITIAL AND s_data-high IS NOT INITIAL.
lv_datum = s_data-high.
lv_flg = '1'.
ELSEIF s_data-low IS NOT INITIAL AND s_data-high IS INITIAL.
lv_datum = s_data-low .
lv_flg = '1'.
ELSEIF s_data-low IS NOT INITIAL AND s_data-high IS NOT INITIAL.
lv_flg = '2'.
ENDIF.
IF lv_flg = '1'.
DELETE gt_alv WHERE datab > lv_datum.
DELETE gt_alv WHERE datbi < lv_datum.
ENDIF.
IF lv_flg = '2'.
"bi<low ab>high
DELETE gt_alv WHERE datab > s_data-high .
DELETE gt_alv WHERE datbi < s_data-low.
"ab<low bi>high
DELETE gt_alv WHERE datab < s_data-low.
DELETE gt_alv WHERE datbi < s_data-high.
ENDIF.
ENDIF.
03-22
1791
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-29
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-03
06-08