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

SLIN ERROR in REPORT

Former Member
0 Likes
1,090

Hi All,

I am getting the following SLIN error for my report.

Code Snippet.:

LOOP AT i_ekes INTO wa_ekes WHERE ebeln = wa_po-ebeln

AND ebelp = wa_po-ebelp.

AT END OF ebelp.

V_CARRY_501 = c_x.

ENDAT.

SLIN Error:

The LOOP statement processing will be limited

(FROM, TO and WHERE additions in LOOP)

Interaction with group change processing (AT NEW, ...) is undefined

Points Assured,

Regards,

Viji.

1 ACCEPTED SOLUTION
Read only

vinod_vemuru2
Active Contributor
0 Likes
1,056

Hi,

As per SAP documentation u should not use AT events with where clause. SAP will not give guarenty on the functionality.

Replace the logic like below.

SORT i_ekes BY ebelp.

LOOP AT i_ekes INTO wa_ekes.

CHECK wa_ekes-ebeln = wa_po-ebeln

AND wa_ekes-ebelp = wa_po-ebelp.

AT END OF ebelp.

V_CARRY_501 = c_x.

ENDAT.

ENDLOOP.

Also at what position is the field EBELP?

If it is not the first field then till that field it takes the key.

eg: EBELP is 3rd field in ur itab then when ever field1 or 2 or 3(EBELP) changes then control enters to AT event.

Another way could be like this.

i_ekes_temp [] = i_ekes[].

DELETE i_ekes_temp WHERE wa_ekes-ebeln NE wa_po-

ebeln AND wa_ekes-ebelp NE wa_po-ebelp.

SORT i_ekes_temp BY ebelp.

LOOP AT i_ekes_temp INTO wa_ekes.

AT END OF ebelp.

V_CARRY_501 = c_x.

ENDAT.

ENDLOOP.

I feel first approach is better.

Hope it is clear.

Thanks,

Vinod.

Edited by: Vinod Reddy Vemuru on Aug 26, 2008 6:17 PM

Hi All,

I am getting the following SLIN error for my report.

Code Snippet.:

LOOP AT i_ekes INTO wa_ekes WHERE ebeln = wa_po-ebeln

AND ebelp = wa_po-ebelp.

AT END OF ebelp.

V_CARRY_501 = c_x.

ENDAT.

SLIN Error:

The LOOP statement processing will be limited

(FROM, TO and WHERE additions in LOOP)

Interaction with group change processing (AT NEW, ...) is undefined

Points Assured,

Regards,

Viji.

7 REPLIES 7
Read only

Former Member
0 Likes
1,056

generally we use AT Statement inside a Sorted Loop inder to have a structured block output. So just try with the code removing the where condition.

Read only

0 Likes
1,056

Hi,

I cant able ot remove the WHERE condition. Its necessary as part of my code.

Thanks,

Viji

Read only

bpawanchand
Active Contributor
0 Likes
1,056

HI

LOOP AT i_ekes INTO wa_ekes WHERE ebeln = wa_po-ebeln
AND ebelp = wa_po-ebelp.

Because of the above loop statement you are not reading all the values from the internal table that means you are filtering the data ,

AT END OF ebelp.
V_CARRY_501 = c_x.
ENDAT.

and inside the loop you are using control break events and since you are filtering the data in the internal table and suppose if the read records are not full ie the AT END OF <FIELD > reached or not it is not assured. so remove WHERE Condition

Regards

Pavan

Read only

Former Member
0 Likes
1,056
The LOOP statement processing will be limited

your code looks like will be execute only for one value wa_po-ebelp untill you are not using nested loops.

LOOP AT i_ekes INTO wa_ekes WHERE ebeln = wa_po-ebeln
AND ebelp = wa_po-ebelp."<-- holding only single value
AT END OF ebelp.
V_CARRY_501 = c_x.
ENDAT.

Interaction with group change processing (AT NEW, ...) is undefined

you are using

AT END OF ebelp means we can say it works as at last in your case.cause ebelp have only one value.

your query seems interesting

Amit.

Read only

Former Member
0 Likes
1,056

Hi Vijaya,

Do not use AT - ENDAT(Control Break Statements) in a LOOP-ENDLOOP with WHERE condition.

Regards,

Chandra Sekhar

Read only

vinod_vemuru2
Active Contributor
0 Likes
1,057

Hi,

As per SAP documentation u should not use AT events with where clause. SAP will not give guarenty on the functionality.

Replace the logic like below.

SORT i_ekes BY ebelp.

LOOP AT i_ekes INTO wa_ekes.

CHECK wa_ekes-ebeln = wa_po-ebeln

AND wa_ekes-ebelp = wa_po-ebelp.

AT END OF ebelp.

V_CARRY_501 = c_x.

ENDAT.

ENDLOOP.

Also at what position is the field EBELP?

If it is not the first field then till that field it takes the key.

eg: EBELP is 3rd field in ur itab then when ever field1 or 2 or 3(EBELP) changes then control enters to AT event.

Another way could be like this.

i_ekes_temp [] = i_ekes[].

DELETE i_ekes_temp WHERE wa_ekes-ebeln NE wa_po-

ebeln AND wa_ekes-ebelp NE wa_po-ebelp.

SORT i_ekes_temp BY ebelp.

LOOP AT i_ekes_temp INTO wa_ekes.

AT END OF ebelp.

V_CARRY_501 = c_x.

ENDAT.

ENDLOOP.

I feel first approach is better.

Hope it is clear.

Thanks,

Vinod.

Edited by: Vinod Reddy Vemuru on Aug 26, 2008 6:17 PM

Read only

0 Likes
1,056

Hi All,

Thanks alot. My issue got solved.

Points awarded.

Thanks Vinod.

Regards,

Viji

Edited by: VijayaLakshmi Krishnaswamy on Aug 27, 2008 7:43 AM