SAP / SAP/code-pal-for-abap

LINE_EXISTS does not support where condition

Open
#642 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
ABAP
Stars
435
Forks
77
PR merge metrics
No merged PRs in 30d

Description

💡 Code pal for ABAP follows the Clean ABAP. If the issue relates to coding style, please submit it here.

Check Name
Prefer LINE EXISTS or LINE INDEX to READ TABLE or LOOP AT

Actual Behavior
LINE_EXISTS does not support where condition like new option in the read command , the check is incorrect, please fix

Expected Behavior
It should not show as error where there is a OR condition in the READ statement
Example code:
READ TABLE lt_deviations TRANSPORTING NO FIELDS
WHERE deviation_status = if_mpe_ab_cmp_constants=>gcs_deviation_status-in_process
OR deviation_status = if_mpe_ab_cmp_constants=>gcs_deviation_status-identified.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the check named “Prefer LINE EXISTS or LINE INDEX to READ TABLE or LOOP AT” and reproduce the reported false positive with the READ TABLE example in this issue. Done means a READ TABLE WHERE condition containing an OR is no longer incorrectly reported as an error.

Written by the indexing model from the issue text.

Assessment

Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.