宏(maro)

DEFINEcreate_string.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

* loop for inclusions

loop at s_&1.

offset = strlen( &1_string_&2 ).

c_low = s_&1-low.

c_high = s_&1-high.

shift c_low left deleting leading '0'.

shift c_high left deleting leading '0'.

shift c_low left deleting leading space.

shift c_high left deleting leading space.

if '&1' = 'date'.

concatenatec_low+4(2) '/' c_low+6(2) '/'

c_low+2(2) into c_low.

if not c_high is initial.

concatenatec_high+4(2) '/' c_high+6(2) '/'

c_high+2(2) into c_high.

endif.

endif.

case s_&1-option.

when 'EQ'.

check s_&1-sign = '&2'.

add_comma &1 &2.

&1_string_&2+offset = c_low.

when 'NE'.

check s_&1-sign = '&3'.

add_comma &1 &2.

&1_string_&2+offset = c_low.

when 'GT'.

check s_&1-sign = '&2'.

add_comma &1 &2.

&1_string_&2+offset = 'Greater than'.

offset = offset + 13.

&1_string_&2+offset = c_low.

when 'LE'.

check s_&1-sign = '&2'.

add_comma &1 &2.

&1_string_&2+offset = 'Less than or equal to'.

offset = offset + 22.

&1_string_&2+offset = c_low.

when 'LT'.

check s_&1-sign = '&2'.

add_comma &1 &2.

&1_string_&2+offset = 'Less than'.

offset = offset + 10.

&1_string_&2+offset = c_low.

when 'BT'.

check s_&1-sign = '&2'.

add_comma &1 &2.

concatenate&1_string_&2 c_low '-' c_high

into &1_string_&2 separated by space.

when 'NB'.

check s_&1-sign = '&3'.

add_comma &1 &2.

concatenate&1_string_&2 c_low '-' c_high

into &1_string_&2 separated by space.

endcase.

endloop.

END-OF-DEFINITION. " create_string

defineadd_comma.

* add comma for selection criteria output string

if offset > 0.

&1_string_&2+offset(1) = ','.

offset = offset + 2.

endif.

END-of-definition. " add_comma

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值