Friday - last edited Friday
If I extract code containing SUBMIT ... AND RETURN, there is the error:
Refactoring Condition Check Failed
Source contains program flow change by RETURN. Refactoring is not possible.
SUBMIT fagl_account_balance
AND RETURN.Of course, the workaround is to temporarily comment out SUBMIT and uncomment after the refactoring.
Is this problem fixed? In which version?
Thanks.
Sandra
My system: Eclipse 2025-09, ADT 3.52.3, backend 7.58 SP 1.
Friday
Short answer: the bug is in the method CAN_BE_EXTRACTED of the class CL_ART_SNIPPET (below are the details).
There's currently no SAP note containing a fix in that method.
Sandra
The ADT communication log indicates this data when using Extract Method (program named Z_DEMO_PROGRAM):
POST /sap/bc/adt/refactorings?step=evaluate&rel=http%3A%2F%2Fwww.sap.com%2Fadt%2Frelations%2Frefactoring%2Fextractmethod&uri=%2Fsap%2Fbc%2Fadt%2Fprograms%2Fprograms%2Fz_demo_program%2Fsource%2Fmain%23start%3D171%2C0%3Bend%3D176%2C0 HTTP/1.1
Error code: SRFAC_IMPL056
The debug of the ADT tools indicates that the error code is sent by the method CAN_BE_EXTRACTED of the class CL_ART_SNIPPET:
Call stack (class on the left followed by the method):
I can conclude that Extract Method fails incorrectly on these 2 ABAP statements based on the Index of the ABAP 7.58 Keyword documentation (search by full word RETURN):
If I extract code containing SUBMIT ... AND RETURN, there is the error:
Refactoring Condition Check Failed
Source contains program flow change by RETURN. Refactoring is not possible.
SUBMIT fagl_account_balance
AND RETURN.Of course, the workaround is to temporarily comment out SUBMIT and uncomment after the refactoring.
Is this problem fixed? In which version?
Thanks.
Sandra
My system: Eclipse 2025-09, ADT 3.52.3, backend 7.58 SP 1.
Friday
Short answer: the bug is in the method CAN_BE_EXTRACTED of the class CL_ART_SNIPPET (below are the details).
There's currently no SAP note containing a fix in that method.
Sandra
The ADT communication log indicates this data when using Extract Method (program named Z_DEMO_PROGRAM):
POST /sap/bc/adt/refactorings?step=evaluate&rel=http%3A%2F%2Fwww.sap.com%2Fadt%2Frelations%2Frefactoring%2Fextractmethod&uri=%2Fsap%2Fbc%2Fadt%2Fprograms%2Fprograms%2Fz_demo_program%2Fsource%2Fmain%23start%3D171%2C0%3Bend%3D176%2C0 HTTP/1.1
Error code: SRFAC_IMPL056
The debug of the ADT tools indicates that the error code is sent by the method CAN_BE_EXTRACTED of the class CL_ART_SNIPPET:
Call stack (class on the left followed by the method):
I can conclude that Extract Method fails incorrectly on these 2 ABAP statements based on the Index of the ABAP 7.58 Keyword documentation (search by full word RETURN):
Friday
So, you can get the same by commenting just the "and return" clause?
I will assume that if some day SAP fixes that, it will do for the VSC ADT and we, eclipse dinosaurs, will need to adapt to it. (until SAP changes direction again, when we'll get used to VSC ADT)
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |