gpt4 book ai didi

abap - XXX 是一个没有标题行的表,因此没有名为 "EBELN"的组件

转载 作者:行者123 更新时间:2023-12-04 00:09:13 26 4
gpt4 key购买 nike

我收到语法错误:

"IT_COMBINE" is a table without a header line and therefore has no component called "EBELN".

我尝试过使用“进入相应的字段”,但不起作用。

我的代码:

  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
...

最佳答案

如果你没有用标题行声明你的内部表,你不能直接使用内部表中的字段。

有 2 种可能性可以更改您的代码。

  1. 你在第 35 行调用了字段 ebeln。由于你没有在第 19 行声明 it_combine 和标题行,你不能像这样使用 it_combine-ebeln。相反,您必须声明 工作区

    Data wa_combine type ty_combine. 

并将第 35 行的工作区用作

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 你必须用标题行声明你的内部表

 Data it_combine type standard table of ty_combine with header line.

有关标题行和工作区的简要说明,请参阅 Sap 帮助文档。

关于abap - XXX 是一个没有标题行的表,因此没有名为 "EBELN"的组件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11874121/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com