Skip to content

WITH PRIVILEGED ACCESS gets split up #541

Closed

Description

@fabianlupa

The WITH PRIVILEGED ACCESS seems to be misinterpreted by ABAP Cleaner as a WITH common table expression, the addition gets split up.

Input:

    SELECT SINGLE FROM I_BillingDocumentPartner WITH PRIVILEGED ACCESS
      FIELDS ReferenceBusinessPartner
      WHERE PartnerFunction = @contact_person
        AND BillingDocument = @billing_document
      INTO @DATA(contact_person_bp).

Output:

    SELECT SINGLE FROM I_BillingDocumentPartner WITH
      PRIVILEGED ACCESS
      FIELDS ReferenceBusinessPartner
      WHERE PartnerFunction = @contact_person
        AND BillingDocument = @billing_document
      INTO @DATA(contact_person_bp).

Output 2, if WITH starts on the next line:

    SELECT SINGLE
      FROM I_BillingDocumentPartner
      WITH
      PRIVILEGED ACCESS
      FIELDS ReferenceBusinessPartner
      WHERE PartnerFunction = @contact_person
        AND BillingDocument = @billing_document
      INTO @DATA(contact_person_bp).

Expected output:

    SELECT SINGLE
      FROM I_BillingDocumentPartner WITH PRIVILEGED ACCESS
      FIELDS ReferenceBusinessPartner
      WHERE PartnerFunction = @contact_person
        AND BillingDocument = @billing_document
      INTO @DATA(contact_person_bp).

Activity

  1. self-assigned this
    on Jul 6, 2026
  2. jmgrassau commented on Jul 6, 2026

    @jmgrassau
    Member

    Hi Fabian,

    thanks a lot, nice finding! ABAP cleaner indeed mistook ... PRIVILEGED ACCESS to be the start of the options block:

    ... [OPTIONS] 
          [USING ...]
          [PRIVILEGED ACCESS]
          [BYPASSING BUFFER]
          [CONNECTION ...] ...
    

    Therefore, a line break was introduced. This should be fixed with the next release (which will simply keep WITH PRIVILEGED ACCESS where it is, rather than tearing it apart).

    Kind regards,
    Jörg-Michael

  3. jmgrassau commented on Jul 9, 2026

    @jmgrassau
    Member

    Hi Fabian,

    thanks again for opening this issue! This bug should now be fixed with version 1.28.5, which was just released!

    Kind regards,
    Jörg-Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions