Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

for all entries

Former Member
0 Likes
862

<b>Hi All,

I am trying to write this progarm

But I am getting error like his

Please hepl me out of this....</b>

<i>Field "ENDLOOP" is unknown. It is neither in one of the specified

tables nor defined by a "DATA" statement . . . . . . . . . . </i>

&----


*& Report ZSANDY_MK02_TEST

*&

&----


*&

*&

&----


REPORT ZSANDY_MK02_TEST.

tables: lfm1,

lfa1.

select-options enter for lfm1-telf1.

data: begin of sandy occurs 0,

lifnr like lfm1-lifnr,

ekorg like lfm1-ekorg,

telf1 like lfm1-telf1,

end of sandy.

data: begin of sandy2 occurs 0,

telx1 like lfa1-telx1,

telf1 like lfa1-telf1,

end of sandy2.

data: begin of finel occurs 0,

lifnr like lfm1-lifnr,

ekorg like lfm1-ekorg,

telf1 like lfm1-telf1,

telx1 like lfa1-telx1,

end of finel.

select lifnr

ekorg

telf1

from lfm1

into table sandy

where telf1 in enter.

select telx1

from lfa1

into table sandy2

for all entries in sandy

where telf1 = sandy-telf1.

loop at sandy.

loop at sandy2 where telf1 = sandy-telf1.

finel-lifnr = sandy-lifnr.

finel-ekorg = sandy-ekorg.

finel-telf1 = sandy-telf1.

finel-telx1 = sandy2-telx1.

append finel.

clear finel.

endloop.

endloop.

loop at finel.

write:/ finel-lifnr,

finel-ekorg,

finel-telf1,

finel-telx1,

endloop.

<b>

Thanks in advance

Sandy.....</b>

1 ACCEPTED SOLUTION
Read only

former_member491305
Active Contributor
0 Likes
841

Hi,

remove the comma and put a period at the end.

&----


*& Report ZSANDY_MK02_TEST

*&

&----


*&

*&

&----


REPORT ZSANDY_MK02_TEST.

tables: lfm1,

lfa1.

select-options enter for lfm1-telf1.

data: begin of sandy occurs 0,

lifnr like lfm1-lifnr,

ekorg like lfm1-ekorg,

telf1 like lfm1-telf1,

end of sandy.

data: begin of sandy2 occurs 0,

telx1 like lfa1-telx1,

telf1 like lfa1-telf1,

end of sandy2.

data: begin of finel occurs 0,

lifnr like lfm1-lifnr,

ekorg like lfm1-ekorg,

telf1 like lfm1-telf1,

telx1 like lfa1-telx1,

end of finel.

select lifnr

ekorg

telf1

from lfm1

into table sandy

where telf1 in enter.

select telx1

from lfa1

into table sandy2

for all entries in sandy

where telf1 = sandy-telf1.

loop at sandy.

loop at sandy2 where telf1 = sandy-telf1.

finel-lifnr = sandy-lifnr.

finel-ekorg = sandy-ekorg.

finel-telf1 = sandy-telf1.

finel-telx1 = sandy2-telx1.

append finel.

clear finel.

endloop.

endloop.

loop at finel.

write:/ finel-lifnr,

finel-ekorg,

finel-telf1,

<b>finel-telx1.</b>

endloop.

<b>Hi All,

I am trying to write this progarm

But I am getting error like his

Please hepl me out of this....</b>

<i>Field "ENDLOOP" is unknown. It is neither in one of the specified

tables nor defined by a "DATA" statement . . . . . . . . . . </i>

&----


*& Report ZSANDY_MK02_TEST

*&

&----


*&

*&

&----


REPORT ZSANDY_MK02_TEST.

tables: lfm1,

lfa1.

select-options enter for lfm1-telf1.

data: begin of sandy occurs 0,

lifnr like lfm1-lifnr,

ekorg like lfm1-ekorg,

telf1 like lfm1-telf1,

end of sandy.

data: begin of sandy2 occurs 0,

telx1 like lfa1-telx1,

telf1 like lfa1-telf1,

end of sandy2.

data: begin of finel occurs 0,

lifnr like lfm1-lifnr,

ekorg like lfm1-ekorg,

telf1 like lfm1-telf1,

telx1 like lfa1-telx1,

end of finel.

select lifnr

ekorg

telf1

from lfm1

into table sandy

where telf1 in enter.

select telx1

from lfa1

into table sandy2

for all entries in sandy

where telf1 = sandy-telf1.

loop at sandy.

loop at sandy2 where telf1 = sandy-telf1.

finel-lifnr = sandy-lifnr.

finel-ekorg = sandy-ekorg.

finel-telf1 = sandy-telf1.

finel-telx1 = sandy2-telx1.

append finel.

clear finel.

endloop.

endloop.

loop at finel.

write:/ finel-lifnr,

finel-ekorg,

finel-telf1,

finel-telx1,

endloop.

<b>

Thanks in advance

Sandy.....</b>

4 REPLIES 4
Read only

former_member491305
Active Contributor
0 Likes
842

Hi,

remove the comma and put a period at the end.

&----


*& Report ZSANDY_MK02_TEST

*&

&----


*&

*&

&----


REPORT ZSANDY_MK02_TEST.

tables: lfm1,

lfa1.

select-options enter for lfm1-telf1.

data: begin of sandy occurs 0,

lifnr like lfm1-lifnr,

ekorg like lfm1-ekorg,

telf1 like lfm1-telf1,

end of sandy.

data: begin of sandy2 occurs 0,

telx1 like lfa1-telx1,

telf1 like lfa1-telf1,

end of sandy2.

data: begin of finel occurs 0,

lifnr like lfm1-lifnr,

ekorg like lfm1-ekorg,

telf1 like lfm1-telf1,

telx1 like lfa1-telx1,

end of finel.

select lifnr

ekorg

telf1

from lfm1

into table sandy

where telf1 in enter.

select telx1

from lfa1

into table sandy2

for all entries in sandy

where telf1 = sandy-telf1.

loop at sandy.

loop at sandy2 where telf1 = sandy-telf1.

finel-lifnr = sandy-lifnr.

finel-ekorg = sandy-ekorg.

finel-telf1 = sandy-telf1.

finel-telx1 = sandy2-telx1.

append finel.

clear finel.

endloop.

endloop.

loop at finel.

write:/ finel-lifnr,

finel-ekorg,

finel-telf1,

<b>finel-telx1.</b>

endloop.

Read only

Former Member
0 Likes
841
write:/ finel-lifnr,
finel-ekorg,
finel-telf1,
finel-telx1,

write statement should be ended with stop (.) not comma(,).

Read only

Former Member
0 Likes
841

HI,

the reason for the error is loop at finel.

write:/ finel-lifnr,

finel-ekorg,

finel-telf1,

<b>finel-telx1.</b>

endloop.

if u are writing for all entries u don't need to write this part

loop at sandy.

loop at sandy2 where telf1 = sandy-telf1.

finel-lifnr = sandy-lifnr.

finel-ekorg = sandy-ekorg.

finel-telf1 = sandy-telf1.

finel-telx1 = sandy2-telx1.

append finel.

clear finel.

endloop.

endloop.

in stead of this write simply

finel[] = sandy2[].

rgds,

bharat.

Read only

Former Member
0 Likes
841

HI Sandy

specify the positions with write stt.

loop at finel.

write:/10 finel-lifnr,20 finel-ekorg,30 finel-telf1,50 finel-telx1.

endloop.

and when u use for all entries u should check whether 1st table has data or not.

if not sandy[] is initial.

select telx1

from lfa1

into table sandy2

for all entries in sandy

where telf1 = sandy-telf1.

endif.

Regards

sandhya