Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
OlgaDolinskaja
Product and Topic Expert
Product and Topic Expert

ABAP Development Tools in Eclipse enable the automated adaptation of custom code for SAP S/4HANA with only a few clicks through Quick Fixes. These can resolve the most frequent findings such as ORDER_BY issues, MATNR issues, and issues related to data model changes such as KONV, BSEG, and others. Mass-enabled Quick Fixes significantly reduce your custom code adaptation efforts by allowing to apply the Quick Fixes for the whole ATC findings list at one shot. See also the blog Semi-automatic custom code adaptation after SAP S/4HANA system conversion.

If you apply mass-enabled Quick Fixes you can display for each your custom code object the source code before (“Original Source”) and after (“Refactored Source”) the Quick Fix:


Very often we’ve got the question from the customers: will there will be comments added to the refactored code in order to be able to reproduce how the source code looked before applying the Quick Fix?

With the SAP Note 2902053 you can now get for each Quick Fix a source code comment in your refactored code on your SAP S/4HANA 1909 system. In order to use the new functionality you have to activate it in the system via the report SATC_AC_QFIX_COMMENTS_ENABLED.

CURRENT LIMITATION: Quick Fix comments are currently available only for transportable objects. It is not possible to apply them for local objects.

 

NOTE: Enabling Quick Fix comments is an optional feature and should be used only if it is absolutely necessary to keep the old source code parts since it is not in line with "Clean Code" principles.


The source code comment contains the following information:

    • Textual description of the applied Quick Fix, e.g. “Quick Fix Append ORDER BY PRIMARY KEY to the SELECT statement”
    • Your old source code before the Quick Fix
    • ID of related transport request
    • Description from the related transport request

Here you see an example how it works. A comment section is placed on top of the changed code (via Quick Fix) where you see the old code (lines 35-38) and an explanation which Quick fix was applied, in this case “Replace VBUK table access with the access of compatibility view V_VBUK_S4”. In addition, the ID and the description of the corresponding transport request is provided in the comment:


Just try it out!

12 Comments
hardyp180
Active Contributor
Hello!

Would the changes not be captured automatically by the version control system i.e. you could see what the code used to look like by comparing versions?

The reason I say this is that "Clean Code" principles aim for not having any commented code at all.

In his book Robert Martin describes commented code as an abomination that gets less relevant with every day that passes. I would tend to agree.

I have had people say to me where I work that they are just going to keep the commented code in for "a while" so they can easily see how it used to look. Ten years later it is still there, and the real code is hiding in small islands between pages of commented code.

For the above screen shot it looks like the transport number is automatically added as well. Oh dear. That sort of thing also gets a hammering in the Clean Code book.

That (transport number) is definitely captured by the version control system.

Cheersy Cheers

Paul
ThFiedler
Product and Topic Expert
Product and Topic Expert
Hi Paul,

you are absolutely right and that's the reason why the feature is optional and needs to be switched-on before using it.

We often have project setups where implementation partners are doing the code adjustment for the customer. For these scenario we got the request to include these kind of code markers.

Regards,

Thomas.
custodio_deoliveira
Active Contributor
// no comment
Michael_Keller
Active Contributor
0 Kudos
Good comment. The thing with the "small islands of active code" is really a problem. In the past I had serious discussions about "if you are sure, you can remove the code instead of commenting". The point was that developers don't seem to be sure and don't trust version control system.

By the way: In SAPscript forms, for inexplicable reasons, you will find a lot more commented statements. Sometimes windows are just full comments, no active statement. For whatever reason...
former_member696213
Discoverer
0 Kudos
Hi,

i have an issue when i try to do quick fix for DB operation using join on VBUK and VBUP, i have recommendations to using compatible view. while trying to do quick fix, i'm getting error "Do not use any special characters", when i check on the error it takes me to the comment sections.

Any suggestions on this.

Regards,

Niharika.
OlgaDolinskaja
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Niharika,

please post your question in the Q&A section of community and provide detailed screenshots.

Thanks & Regards,

Olga.
former_member699750
Participant
0 Kudos
Hello Olga,

Currently we are on SOH, we have an ATC check variant configured to check programs before TR release.

When I do the same ATC check in eclipse, I'm getting ATC problems in eclipse but there is no quick fix option. Is there any pre-requestive to get this option or only work when we are in S4H?

SAP_APPL 617

Thanks and Regards

Sugumar Ganesan
OlgaDolinskaja
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Sugumar,

the Quick Fixes feature is only available on an SAP S/4HANA system, SoH is not supported.

Regards,

Olga.
0 Kudos
Hello Olga,

 

Can you please provide us the list of SAP notes required to be implemented for ADT Quick fix enables as per S4H system version.

Thanks,

Sam
LBretschneider
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Sam,

in another Blog from Olga (https://blogs.sap.com/2018/10/02/semi-automatic-custom-code-adaptation-after-sap-s4hana-system-conve...) there is quite a good overview. It has to be at least 1809 and ADT has release dependencies (>ADT 2.96), but apart from that the notes are mentioned as well:

  • 2866977 Overview on quickfixes

  • 2738251 Quickfixes for S/4

  • 2364938 in the most current version contains quickfixes for field length extension scenarios.


 

Best Regards,
Lukas
vsouza
Explorer
0 Kudos
Hi Olga!

Where I could find the documentation about which Pseudo Comments are supported by Quick Fix?

During the upgrade I've been doing the only pseudo comment suppported that I could see is "EC CI_NOORDER and it is a priority 3 information in ATC.

We have some priority 1 errors about JOIN and large tables that we wanted to gain more time while correcting it.

Thanks.

Souza.

 
OlgaDolinskaja
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Souza,

the Quick Fixes offer Pseudo Comments for the following S/4HANA checks:

  • S/4HANA: Field Length Extensions
  • S/4HANA: Search for Database Operations
  • S/4HANA: Search for Usages of Simplified Objects

There is no documentation regarding this.

Kind Regards,
Olga.