XXX是没有标题行的表,因此没有名称为“ EBELN”的组件。 [英] XXX is a table without a header line and therefore has no component called "EBELN"
问题描述
我遇到语法错误:
IT_COMBINE是一个没有标题行的表,因此没有名为 EBELN。
"IT_COMBINE" is a table without a header line and therefore has no component called "EBELN".
我尝试使用进入相应字段,但这不起作用。
I have tried using "into corresponding fields" and that does not work.
我的代码:
19 Data it_combine type standard table of ty_combine.
...
32 select ebeln lifnr ekorg bsart ekgrp
33 into table it_po
34 from ekko
35 where ebeln = it_combine-ebeln. " <=== SYNTAX ERROR
...
推荐答案
如果未使用标题行声明内部表,则不能直接使用内部表中的字段。
You can not use the fields in internal tables directly if you did not declare your internal table with header line.
有两种方法可以更改代码。
There are 2 possibilities to change your code.
-
您已在第35行中调用了字段ebeln。由于您没有在第19行中使用头行声明it_combine,因此您不能这样使用it_combine-ebeln,而必须声明工作区
Data wa_combine type ty_combine.
并在线使用工作区没有35 as
and use the work area in line no 35 as
Loop at it_combine into wa_combine .
select ebeln lifnr ekorg bsart ekgrp
into table it_po
from ekko
where ebeln = wa_combine-ebeln.
End Loop.
2您必须使用标题行声明内部表
2 You have to declare your internal table with header line
Data it_combine type standard table of ty_combine with header line.
有关标题行和工作区域的简短说明,请参阅Sap帮助文档。
Refer to the Sap help document for breif description about header line and work area.
这篇关于XXX是没有标题行的表,因此没有名称为“ EBELN”的组件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!