2022 Sep 20 11:11 PM
When importing a transport into QA system, we are getting an error "DDL source ... cannot be activated" for a CDS view that is being deleted in this same transport.
Background: we had 2 CDS views, let's say ZI_Good and ZI_Bad. The ZI_Bad one had an association to ZI_Good. After realizing that we do not need ZI_Bad (it wasn't used anywhere), we deleted it. Everything is fine in DEV system.
Both ZI_Good and ZI_Bad views were included in the same transport. Transport was released from DEV system and imported into QA. During the import, for some reason, the system tries to activate the CDS view ZI_Bad (which is now gone) and fails to find it (naturally):
Why is this happening and what could be done to prevent this?
This is in S/4HANA 2020 system, if it matters.
Edit: I've gone over the whole log once again and everything appears to be in order. There is a record of ZI_Bad being deleted, just as I'd expect, and it's done in the early transport stage. Also to clarify, we don't actually have any issue in QA and the view ZI_Good is active. It's just not clear why we got an error in the import process. Thank you!
2022 Sep 21 3:50 AM
this is odd. Check the transport log further up. It should contain a section about deletion of objects listing zi_bad. If that’s not present, the bad object probably still existed when the transport was released.
to delete zi_bad properly, recreate it with transport. Delete it. Release transport.
Best
Marc
@marcfbe
2022 Sep 22 8:33 PM
Added more info to the question. I checked the log and it shows successful deletion. Then activation error somewhere down the line. In QA, ZI_Bad does not exist now and ZI_Good is active just fine. But because there is a TR error, we have to investigate. This is bizarre...
2022 Sep 21 6:13 AM
Hi Jelena
If possible do the full system restart and then try to reimport same request
Regards
SS
2022 Sep 21 6:43 AM
please active all your source codes in ABAP however its a CDS View or use can use it in an ABAP CODE.
Save and activate all the things where you use your CDS View and where you create your CDS View.
2022 Sep 21 11:06 PM
Sorry, I'm honestly not able to understand how this is relevant... I know how to activate code, it's not the issue here. The questions is about a TR import error.
2022 Sep 21 7:20 AM
Can you use RUTDDLSACT report and try and activating your CDS?
2022 Sep 22 8:34 PM
Hi! There is nothing to activate. The view ZI_Good was activated, as shown in the screenshot. ZI_Bad is deleted, so nothing to activate there too.
2022 Sep 21 7:21 AM
Have you deleted the CDS and it's DDL Source? I think you may have missed it.
Run the program RUTDDLSDEL and delete the CDS View from there. The DDL will also be deleted.
For reference:
https://launchpad.support.sap.com/?sap-support-headless=true#/notes/0002602789
Best Regards,
Kushagra
2022 Sep 22 8:36 PM
CDS view was deleted using Eclipse. I believe this particular one was view entity and should not require any other steps. We dpn't have a problem with deletion itself though. The issue is that TR import process attempts to activate a deleted object. That should not be happening.
2022 Sep 21 7:33 AM
Hi Jelena, Clearly, it's some sort of dependency issue. Unfortunately all related SAP notes are being updated at the same time 🙂
If you can't wait, I would create a new transport request with the latest active version of ZI_Good. Importing the new request together with the one having the dependency issue, might solve the problem.
2022 Sep 22 12:57 AM
Are these views or view entities? The only thing I can think of if the ZI_Good doesn't have any missing dependencies, is that the system cannot figure out the appropriate order and attempted to activate ZI_Bad first before ZI_Good had been activated - can't imagine this would happen with anything other than view entities, however. I'd probably just transport a copy of ZI_Good and import, and then re-import this failed transport - that usually would resolve these type of problems.
Regards,
Ryan Crosby
2022 Sep 22 8:28 PM
Good question. I'm not seeing a corresponding DB view and believe it was a view entity. It doesn't exist anymore, so I can't confirm 100%. We don't actually have any problems with ZI_Good, it's been activated and works fine. But the client is unhappy because TR has hard error and it's somehow developers' fault. 😞
2022 Sep 22 8:37 PM
jelena.perfiljeva Alas, I know how that game is played all too well. That's a common way we would handle it when stuff errored out at my prior place... not sure if it would help in this case or not, but it's worth a try.
2022 Sep 23 1:00 AM
How does the TADIR entry look in Q? Does it show Deleted flag for Z_Bad?
2022 Sep 29 9:58 PM
Thank you, everyone, for the replies! I have to close this as unresolved mystery because the QA system in question was refreshed last weekend. The transport did no longer have an error when re-importing and now there is no way to find out what was happening in the system at the time. I appreciate y'all response though. Thank you!
marcbernardtools abhisheksingh.tomar4 kushagratandon samuli.kaski6 ryan.crosby2 juwin.thomas2