04-09-2010 10:32 AM
i am doing remediation in ecc6 and i got Problematic Statements(Error) in SLIN and it is like below,
The LOOP statement processing will be limited
(FROM, TO and WHERE additions in LOOP)
Interaction with group change processing (AT NEW, ...) is undefined
the code is like below
LOOP AT t_itab_main WHERE prgtype = c_pgmtp_mr.
ON CHANGE OF t_itab_main-requestor_name. uvp
AT NEW requestor_name.
IF g_flag NE 0.
NEW-PAGE.
ENDIF.
ENDAT.
ENDON.
WRITE: /2 t_itab_main-prgnumb, "Program #
14 t_itab_main-descript, "Description
t_itab_main-effstart, "Effective Begin Date
68 t_itab_main-effend, "Effective End Date
81 t_itab_main-requestor_name(20), "Requestor Name
102 t_itab_main-sales_area, "Sales Area " Smb002
115 t_itab_main-solddesc. "Sold To/Broker "smb002
g_flag = 1.
ENDLOOP.
please tell me how to remove this error
04-09-2010 10:47 AM
Hi,
Problem is you are using AT NEW statement in conditional loop.
AT NEW statement is never used in conditional loop.It is clearly written SAP help.
What you can do is filter your table into new internal table having only entries satisfying your where condition in loop.
and loop this new internal table.
Edited by: Anurag_n on Apr 9, 2010 11:48 AM
04-09-2010 10:53 AM
Hi,
When you use this AT NEW statement with particular field then it compares the entire record from that field . So it is just like gambling some times you may get corect output and sometimes you may not. So that;s way in SLIN it will say it as Problamatic statement, try to remove the control break statement and do it using other logic.
Thanks,
Srinivas Dummu
04-09-2010 11:06 AM
Could be better if you use a meaningful subject lines in all your posts.