larshp / abapOpenChecks

Open source checks for SAP Code Inspector / ABAP Test Cockpit
https://docs.abapopenchecks.org
MIT License
270 stars 79 forks source link

Check 59 : condition with corresponding #( ) #1123

Open AlexandreHT opened 11 months ago

AlexandreHT commented 11 months ago

Condition with corresponding #( ) triggers a check 59 error.

Test case:

report ztest.

types: begin of type1,
         business_field  type c LENGTH 1,
         technical_field type c LENGTH 1,
       end of type1.

types: begin of type2,
         business_field type c LENGTH 1,
       end of type2.

data(foo) = value type1( business_field = 1
                         technical_field = 1 ).

data(bar) = value type1( business_field = 1
                         technical_field = 2 ).

if corresponding type2( foo ) = corresponding type2( bar ).
  write: 'Equal'.
else.
  write: 'Unequal'.
endif.