I’m getting the syntax error:
“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.
My code:
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.
You have called field ebeln in line no 35. Since you did not declare it_combine with header line in line no 19, you can not use it_combine-ebeln like this. Instead you have to declare Work Area
and use the work area in line no 35 as
2 You have to declare your internal table with header line
Refer to the Sap help document for breif description about header line and work area.