‎2009 Nov 23 6:37 AM
Hi All,
When i check the syntax check for a program i got the below error.
The line structure of the table LIFNR_WORKTAB is incorrect.
The declaration and select statement is like this.
data: begin of lfa1_tab occurs 200.
include structure lfa1.
data: end of lfa1_tab.
data: begin of lifnr_worktab occurs 500,
lifnr like lfa1-lifnr,
end of lifnr_worktab.
select * from lfa1 appending table lfa1_tab
where lifnr in lifnr_worktab.
How i can solve this one.
Regards
Jai
‎2009 Nov 23 6:42 AM
Hi,
data: begin of lfa1_tab occurs 200.
include structure lfa1.
data: end of lfa1_tab.
data: begin of lifnr_worktab occurs 500,
lifnr like lfa1-lifnr,
end of lifnr_worktab.
select * from lfa1 appending table lfa1_tab
for all entries in lifnr_worktab " As per your code this happens to be Internal Table
where lifnr = lifnr_worktab-lifnr.
Cheerz
Ram
‎2009 Nov 23 6:40 AM
Well to be honest, this is not the only thing that fails / will fail.
In this case you are comparing two different things actually. This would be the way
select * from lfa1 appending table lfa1_tab
where lifnr in lifnr_worktab-lifnr.
But now you will face problem that this is not an internal table. But what you need here is a range.
Some well meant advice: Better check ABAP help first.
Just to be complete about this:
Stop using the OCCURS statement. Obviously no one is using ABAP OO yet??
‎2009 Nov 23 6:42 AM
Hi,
data: begin of lfa1_tab occurs 200.
include structure lfa1.
data: end of lfa1_tab.
data: begin of lifnr_worktab occurs 500,
lifnr like lfa1-lifnr,
end of lifnr_worktab.
select * from lfa1 appending table lfa1_tab
for all entries in lifnr_worktab " As per your code this happens to be Internal Table
where lifnr = lifnr_worktab-lifnr.
Cheerz
Ram
‎2009 Nov 23 6:59 AM
‎2009 Nov 23 7:06 AM
Before raising further basic questions, learn the difference between a correct, very helpful and helpful answer and assign p0ints accordingly.