简体   繁体   English

如何找回删除重定义的重定义DPC方法?

[英]How to get back the redefined DPC method which redefinition was deleted?

I have a DPC class in sap for a gateway service.我在 sap 中有一个用于网关服务的 DPC 类。 I redefined a getEntitySet method and wrote some code in it.我重新定义了一个getEntitySet方法并在其中编写了一些代码。

Then I accidentally undid the redefinition and all my code is gone.然后我不小心取消了重新定义,我的所有代码都消失了。 Is there any way to get my code back?有什么办法可以找回我的代码吗?

Is there any way to get my code back?有什么办法可以找回我的代码吗?

Yes, unless you activated it.是的,除非你激活它。 Just redefine it again and your former code will appear in the method automatically, you don't even need to go to Versions.只需重新定义它,您之前的代码就会自动出现在方法中,您甚至不需要转到版本。 If you see that method in the blue state, it is not yet activated.如果您看到该方法处于蓝色状态,则它尚未激活。

在此处输入图片说明

If you deleted the redefinition and activated the method, this is the point of no return and you've lost the code forever.如果您删除了重新定义并激活了该方法,那么这就是不归路,您将永远丢失代码。 Undefinition does not cause automatic version generation.未定义不会导致自动生成版本。

However, you can prevent such situations to happen in future by making manual version generation.但是,您可以通过手动生成版本来防止将来发生此类情况。 Just go to Utilities->Versions->Generate version after you implemented the method and that's it.实现该方法后,只需转到Utilities->Versions->Generate version 即可

Now even (de)activation and (un)definition is not a problem for you, you'll always have YOUR version type U in the database.现在,即使 (de)activation 和 (un)definition 对您来说也不是问题,您将始终在数据库中拥有您的版本类型 U。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM