点击Check(CTRL + F2)时出现错误:
E:密钥规范不完整。通用规范仅完成
不幸的是,我没有看到指示哪条线是错误的。谢谢SAP:/
因此这里有相关代码:
SELECT /bic/customer FROM /bic/pcustomer INTO TABLE i_pcustomer
WHERE objvers = c_a.
SELECT /bic/material /bic/sdcsnum FROM /bic/pmaterial INTO TABLE i_pmaterial_s
WHERE objvers = c_a.
SORT i_pmaterial_s BY /bic/material.
i_pmaterial = i_pmaterial_s.
DELETE i_pmaterial_s WHERE /bic/sdcsnum IS INITIAL.
*write to log in infopackage - check double entries material
SORT i_pmaterial_s BY /bic/sdcsnum.
LOOP AT i_pmaterial_s INTO i_pmaterial_s_line.
IF sy-tabix = 1.
CLEAR flg_dup.
ELSE.
IF i_pmaterial_dcs_line-/bic/sdcsnum = i_pmaterial_s_line-/bic/sdcsnum.
"CLEAR p_t_errorlog.
l_cnt = l_cnt + 1.
p_t_errorlog_line-msgid = 'VRS'.
p_t_errorlog_line-msgty = 'I'.
p_t_errorlog_line-msgno = 0.
p_t_errorlog_line-msgv1 = 'Duplic. rec:'.
p_t_errorlog_line-msgv2 = '/BIC/PMATERIAL DCS'.
p_t_errorlog_line-msgv3 = i_pmaterial_dcs_line-/bic/sdcsnum.
p_t_errorlog_line-msgv4 = i_pmaterial_dcs_line-/bic/material.
insert p_t_errorlog_line into table p_t_errorlog.
flg_dup = 'X'.
ELSE.
IF flg_dup IS INITIAL.
INSERT i_pmaterial_dcs_line into i_pmaterial_dcs.
ELSE.
"CLEAR p_t_errorlog.
l_cnt = l_cnt + 1.
p_t_errorlog_line-msgid = 'VRS'.
p_t_errorlog_line-msgty = 'I'.
p_t_errorlog_line-msgno = 0.
p_t_errorlog_line-msgv1 = 'Duplic. rec:'.
p_t_errorlog_line-msgv2 = '/BIC/PMATERIAL DCS'.
p_t_errorlog_line-msgv3 = i_pmaterial_dcs_line-/bic/sdcsnum.
p_t_errorlog_line-msgv4 = i_pmaterial_dcs_line-/bic/material.
insert p_t_errorlog_line into table p_t_errorlog.
CLEAR flg_dup.
ENDIF.
ENDIF.
ENDIF.
i_pmaterial_dcs_line = i_pmaterial_s_line.
ENDLOOP.
答案 0 :(得分:-1)
触发错误消息的代码是:
data: p_t_errorlog TYPE SORTED TABLE OF rsmonitor
将代码更改为
data: p_t_errorlog TYPE STANDARD TABLE OF rsmonitor
解决了这个问题。