abapOpenChecks
abapOpenChecks copied to clipboard
Check 79 - CLEAR as first use of variable
Cleaning of variables is not checking correctly:

to me it looks okay, not false positives
perhaps the line reported is wrong?
There are exactly those lines:

I declare attributes and first access to them is the CLEAR sentence
yea, remove the CLEAR, it doesnt do anything, variables are initialized with initial value
I was trying with and without clear, without error still persists but only with lb_badi
I found the root of the cause, it is this block:

can you help adding a full example with the code copy/pasta-ble?
This is the code:
DATA: lb_badi TYPE REF TO /rslt/ui5_tile_info.
TRY.
GET BADI lb_badi
FILTERS
tile = lv_tile.
CATCH cx_badi_not_implemented.
CLEAR lb_badi.
ENDTRY.
I just replaced the CLEAR for an exception