Skip to Content
Personal Insights
Author's profile photo Joachim Rees

Task: Find DDIC-Objects that miss an enhancement-category – part 1

…this might be a little sloppy, I hope it is still worth reading and beneficial.

If you created DDIC-objects (tables, structures, appends…) in the past, there’s a chance you might have forgotten to set the enhancement category (You get a warning at activation, but that is easily ignored!).

So, at one point you want to correct that. How to find this objects?

It’s easy: dd02L-exclass = ‘0’ .

You might start with SE16n, I started with a report. (As you know, I like reports, and since I am using a template, I can create them very fast and nice/clean/solid at the same time. ).

So this is my get_data:

select * from dd02l
into CORRESPONDING FIELDS OF table ct_data
where tabname in so_tabna
and exclass = 0

This worked, by I realized that I don’t care for all objects missing the enhancement category, only for mine/ours!

If that could be identified by name (say all begin with : ZZ_team1* ), I’d be done already.

However, in my case the identifying part is the component of the package (tdevc-component).

That means I have to join TADIR (to get the package) and TDEVC into my select.

In the old days, I would have started changing my select, adding joins and so on.
But i reconsidered, thinking about CDS-views and stuff, and chose a different path!

…to be continued!

[Edit: here: https://blogs.sap.com/2020/08/31/ddic-objects-that-miss-an-enhancement-category-part-2-use-cds-views/ ]

 

Assigned Tags

      12 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Lars Hvam
      Lars Hvam

      Yes, agree its easily forgotten, my approach has been to run automatic checks, which can be added to the development workflow,

      https://docs.abapopenchecks.org/checks/72/

      https://rules.abaplint.org/tabl_enhancement_category/

      Author's profile photo Michelle Crapo
      Michelle Crapo

      MMmmmm....   And so at the risk of showing my lack of knowledge.   Why do we care about the enhancement category?  I've been guilty of just ignoring the message.  I couldn't see a reason to care if it was checked or not.

      This is what the documentation has:

      "In programs where there is an active Unicode check, statements, operand checks, and accesses with an offset and length are problematic - for example, if numeric or deep components are inserted into a purely character-type structure and the structure thus loses its character- type nature.."

      I've always been on systems with a unicode check. I've never had an issue - but that could be pure luck on my side.

      Author's profile photo Michelle Crapo
      Michelle Crapo

      Yes - that's me too.  I switch back and fourth between these two IDs.

      Author's profile photo Jelena Perfiljeva
      Jelena Perfiljeva

      I’ve always wondered why this can’t just have a default value (“cannot be enhanced”) instead of the useless warning. I don’t remember a single time when this setting was actually important or when I used those “enhancements”.

      Edit: and if I could dig up login info for Jelena The First I'd also reply the same from both accounts. 🙂

      Author's profile photo Peter Inotai
      Peter Inotai

      I found also very user unfriendly, when you want to maintain it very first time, it also shows a message that it's not maintained.

      It's very annoying. I do know that it's not maintained, that's why I want to maintain it, but still the message comes.

      Author's profile photo Joachim Rees
      Joachim Rees
      Blog Post Author

      Oh yeah, there are a lot of things in DDIC where I think I just shouldn't have to care about any more.
      SAP could have taken a chance for simplification with S/4HANA here, but I think in this regard (SE11) nothing(!) changed!

      best
      Joachim

      Author's profile photo Peter Inotai
      Peter Inotai

      In a case when you develop your own custom DDIC objects it doesn't really makes any difference, because you don't have to enhance them, you just add a new field and that's all. Normally I set in this case "cannot be enhanced"

      However when you want to add your own field to a SAP standard object it matters, because with move-corresponding you could have problems.

      Same story with add-on development, when it's developed in our namespace (and system), but could be enhanced (adding new fields) in the customer system.

      I had already a case in my previous company where we delivered several add-ons and in one customer system the lack of this setting caused problems. Not sure anymore if it dumped, or was "only" import error due to the missing category, but I clearly remember that from that day we took it serious and built our own code inspector check to avoid such situation in the future.

      Author's profile photo Michelle Crapo
      Michelle Crapo

      Interesting.  OK, that is a good reason to use it.

      Author's profile photo Joachim Rees
      Joachim Rees
      Blog Post Author

      Haha, I thought my blog might provoke such a question!
      Glad you’re asking! I give you the reason (there might be others!) why it bothers me .

      I never had a problem directly from a missing enhancement category, but from time to time, I have to transport (STMS) a lot of objects (say thousands…) into another system.

      Of course, I look at the import-protocols to see if things are fine.
      …and those are full of “missing enhancement category”-warnings which:

      1. Doesn’t look nice / might shed a bad light on me (if justified or not) -> “Joachim’s transport had 765 warnings?! Thats bad!!?”
      2. They might “hide” (make them hard to spot) other warning, which I really should look at and take care of.

       

      Best
      Joachim

      Author's profile photo Michelle Crapo
      Michelle Crapo

      Totally true!  It doesn't look quite as nice.  That's why I use the stupid pramga and/or pseudo comment.  Simply to get rid of the warning message.  And that drives me slowly insane.  Yes, I do like CDS.

      Author's profile photo Joachim Rees
      Joachim Rees

      Oh, it's been a while, but I can add another reason why missing (or wrong) enhancement categories might bother someone Michelle Crapo :

      Certain ATC checks look at it and yield findings like "Structure xy might be enhanced and then this statement will not work anymore...")

      Author's profile photo Jelena Perfiljeva
      Jelena Perfiljeva

      Joachim, I think you're not on Twitter, so just want to let you know that this is on track to be one of my "most liked" posts so far. 🙂