今天的SAP选择选项作为默认日期?
问题描述:
我想显示今天的日期作为选择日期的默认值。今天的SAP选择选项作为默认日期?
INITIALIZATION.
select-OPTIONS: so_date FOR sy-datlo.
START-OF-SELECTION.
so_date-sign = 'I'.
so_date-option = 'BT'.
so_date-low = sy-datum.
so_date-high = sy-datum.
APPEND so_date.
虽然这不行。有任何想法吗?
答
您必须设置启动OF_SELECTION前值:
select-OPTIONS: so_date FOR sy-datlo.
INITIALIZATION.
so_date-sign = 'I'.
so_date-option = 'EQ'.
so_date-low = sy-datum.
CLEAR so_date-high.
APPEND so_date.
你尝试简单的版本:
select-OPTIONS: so_date FOR sy-datlo default SY-DATUM.
我认为它应该工作(无法测试实际)。
+0
谢谢,两种方式都在工作! – networkprofile
它没有显示当前日期,只是空白字段 – networkprofile