You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
💡 Code pal for ABAP follows the Clean ABAP. If the issue relates to coding style, please submit it here.
Check Name
CHECK Statement Position Check
Actual Behavior
It is showing errors for few CHECK statements which are inside LOOP or DO statements in the methods PREPARE_AIF_MESSAGES, ADD_COSP_AMOUNTS, ADD_COSP_QUANTITIES, of class CL_FINS_CFIN_PD_C2A_REPLICATOR and for the method CHECK_COSP_AMOUNTS_ITEM and local test class of the class CL_FINS_CFIN_PD_C2A_AGENT.
Expected Behavior
According to the documentation of the check, if the check statement occurs inside a loop then it should not shown as an error.
The text was updated successfully, but these errors were encountered:
Are you sure the findings you're getting are from CHECK Statement Position and not from CHECK in LOOP?
Please provide actual code examples (that one could copy into any system and that would produce the false positive) instead of referring to object names: This is an open source repository and customers typically cannot scan SAP code with ATC, so contributors outside of SAP would be unable to reproduce this issue as described.
Yes the findings are from CHECK Statement Position.
Please find below the code examples. For all the check statement in the below example the error is shown.
LOOP AT lt_e070a ASSIGNING FIELD-SYMBOL(<fs_e070a>).
LOOP AT lt_e070 ASSIGNING FIELD-SYMBOL(<fs_e070>).
LOOP AT lt_e071 ASSIGNING FIELD-SYMBOL(<fs_e071>).
ENDLOOP.
ENDLOOP.
CHECK <fs_e070a>-trkorr IS NOT INITIAL.
ENDLOOP.
DO 4 TIMES.
DO 6 TIMES.
CASE ev_yrsof_srvc.
WHEN 1.
CHECK ev_yrsof_srvc = 1.
WHEN 2.
CHECK ev_yrsof_srvc = 2.
WHEN OTHERS.
ENDCASE.
ENDDO.
is too naive: It only checks whether there's any LOOPs in the innermost structure containing the CHECK statement, but in order to tell whether we're inside a loop at all this should check all enclosing structures.
Check Name
CHECK Statement Position Check
Actual Behavior
It is showing errors for few CHECK statements which are inside LOOP or DO statements in the methods PREPARE_AIF_MESSAGES, ADD_COSP_AMOUNTS, ADD_COSP_QUANTITIES, of class CL_FINS_CFIN_PD_C2A_REPLICATOR and for the method CHECK_COSP_AMOUNTS_ITEM and local test class of the class CL_FINS_CFIN_PD_C2A_AGENT.
Expected Behavior
According to the documentation of the check, if the check statement occurs inside a loop then it should not shown as an error.
The text was updated successfully, but these errors were encountered: