Best practice regenerate Duet Enterprise service
When you create in transaction Duet Enterprise Business Data Connectivity Publisher a BDC Model from GSDO Type, behind the scenes multiple entities are created in the SAP landscape. Visible for Duet Enterprise developers are the service interface in SPRoxy; but also webservice, message types, and data types are created. Important to be aware is that the items visible in SProxy are only proxy objects; the webservice itself plus messages types are created within the ESR.
Upon need to regenerate a Duet Enterprise BDC Model, it appears as if the BDC Browser does not directly support this designtime action. The menu does not display an option to regenerate from GSDO type.
A pragmatic action is then to delete the created BDC model itself; however also for that the menu action is missing. Only possible action in BDC Browser appears to delete the Business Scenario in its entirity, so that you can next recreate it from scratch including the service generation. But remember that the initial generation created a service proxy, so this too should be deleted. And to be complete, also delete all used objects:
We applied with success multiple times the above approach when needed to regenerate the Duet Enterprise service (Gateway Generic Channel). However, it left us with a dissatisfied feeling as the approach is cumbersome and requires multiple and different steps.
Another issue is when the business scenario contains multiple BDC Model generations; these would then all be deleted and required to generate again. This while you are only editing a single GSDO Type, and thus would only regenerate the BDC Model for that type.
I confronted Alexander Puettner with this dissatisfying Duet Enterprise development experience, and asked whether it can be done in simpler approach. Luckily there is. Upon the need to regenerate a BDC Model, do not delete the business scenario. Right-click on it, select again the option to ‘Create BDC Model’, and enter exact the same input as in the previous generation. In most cases, this will regenerate everything.
I have now applied this simpler approach multiple times, each time successfully. Alex however warned that occassionally the approach could fail. A reason can be that another developer generated the BDC Model plus service artifacts before, and now has locks on the previous generated entities that prevent you to overwrite them. If this occurs, release those locks and/or the transport requests. Another issue may be that intermediate entities (the webservice, messages, datatypes) are locked in changelist on ESR system; under user account associated with SAP_PROXY_ESR RFC connection. And for some reason, it fails to overwrite; despite the same RFC user account. To resolve this situation, log on to the ESR, and release the ESR changelist entries. And then retry.
A third issue can be that the service endpoint is not recreated. This is a known bug. Most times it is resolved when retry to regenerate BDC Model. If that still doesn’t recreate the endpoint, then open SOAMANAGER, look up the Business Scenario, delete it and recreate. The administration in Duet Enterprise BDC Browser can be maintained; regenerate will reestablish the service definition plus endpoint in SOAMANAGER. Note that in case the Business Scenario contained more service definitions, you have to regenerate for each of them within Duet Enterprise BDC Browser.
Summarized, best practices:
- In most case it is sufficient to regenerate in BDC Browser; and simple ‘ignore’ that the BDC Model is already present from previous creation.
- If possible, stay away from explicitly doing something in ESR. Normally, the Duet Enterprise design tools handle this transparently. But as soon as you interfere, things can get ugly and mess up your Duet Enterprise design time landscape.
- If messed up in ESR, don’t be afraid to cleanup the changelist in ESR