我必须为材料组创建一个新的初始选择,并将排除的垫子组Z310
和Z320
设置为默认视图。但是,在需要时,用户应该能够包含Z320
selection-screen begin of block b4 with frame title text-b04.
select-options: s_matkl for t023-matkl default 'Z310'.
selection-screen end of block b4.
INITIALIZATION.
s_matkl-sign = 'E'.
s_matkl-option = 'EQ'.
s_matkl-high = 'Z310'.
s_matkl-low ='Z320'.
MODIFY s_matkl.
我尝试了上面的它不起作用。关于我如何做到这一点的任何建议?
提前感谢!
如果您使用的是较新版本,则以下内容更简洁一些:
DATA gv_matkl TYPE t023-matkl.
select-options: gt_matkl for gv_matkl.
INITIALIZATION.
gt_matkl[] = VALUE #(
( sign = 'E' option = 'EQ' low = 'Z310' )
( sign = 'E' option = 'EQ' low = 'Z320' )
).
试试这个:
data g_matkl like t023-matkl.
selection-screen begin of block b1 with frame title text-b01.
select-options: s_matkl for g_matkl.
selection-screen end of block b1.
INITIALIZATION.
s_matkl-sign = 'E'.
s_matkl-option = 'EQ'.
s_matkl-low = 'Z310'.
APPEND s_matkl. " <----------- 'APPEND' instead of 'MODIFY'
s_matkl-sign = 'E'.
s_matkl-option = 'EQ'.
s_matkl-low = 'Z320'.
APPEND s_matkl. " <----------- 'APPEND' instead of 'MODIFY'
需要时,用户应修改选择选项。
希望对你有帮助