A deploy in C4C can be either easy and straight forward, or sometimes can be a bit challenge. That will mainly depends of the size of the solution. The bigger, the difficult, in my opinion.
Therefore, here in this post I am going to go in details of how to deploy in C4C since small solutions to bigger ones. By the way, if do not know how to create a C4C solution, check it out my other blog post: One way of create Custom Solution in C4C using SDK
However, what is a small solution? What is a big solution?
Well, I do not know the answer for this question. I am not sure the edge between a small and a big solution. Maybe you realize you have a big solution when you try to Activate all objects and the Studio crashes. Or by the size of a patch after being downloaded. By the way, patch is a key word here, you must know what a patch is. Patch is the zip file you got after activate, assemble and download your custom developments. This zip file will contain all your ABSL code, your Embedded Components, Web Services, Libraries, Business Objects… Everything you have built in Cloud Application Studio (Studio for short, also called SDK or PDI. Check it What does PDI stands for?).
I was in a project where the patch had 10.5 Mb, that was the biggest solution I have ever came across.
Most projects I have being part had solutions patches no bigger than 1Mb. Some of them, like 200Kb, 300 Kb. Therefore, that might be a small solution.
Please, share your opinion of what do you think about a small or big C4C solution. With more inputs, we can have a clear idea about it.
Well, as you can see how this is going, the must have to follow this post is: you will need to have a solution in a development tenant.
If you are starting from scratch and creating your solution here is a tip: create your solution with a BAC element, then straight forward create a patch for that solution. By doing that, you will avoid some namespace issues in the future, like this one for example.
If you create a patch since beginning, you will never end up driving your customer nuts 🙂 Here is how to do that: One way of create Custom Solution in C4C using SDK
When you have done all your job, you will need to transport it to quality and/or production tenant.
Therefore, you will need to download a patch from the development tenant.
Nevertheless, prior to download a patch, it is good to do some checks.
1. Nobody, besides the person who is doing the download, must be logged in the SDK during the patch download.
2. Check if your solution properties has your contact details. Right click in the patch solution in My Solutions overview.
3. Check if the solution is not locked. If there are no “red dots” in the objects, “red check-in flags” or locked objects with “doll”. Your solution must have all objects checked-in and nothing left without being activated.
Here is an example of how an object is locked by another user (sometimes even yourself, this might happen when the Studio crashes or you lost internet connection). When an object is locked by someone else you will see a “doll”.
If a object is not activated, then you will see a “red dot”.
And if an object is locked by yourself, then you will see a “red check-in flag”.
4. Before download the patch, you might also need to confirm you have done an Update Metadata in some Embedded Components (EC) that you might have changed. This, will ensure consistency in your screens when uploading the patch in the target tenant.
When changing an Business Object (BO) or Extend Business Object (XBO), and you change an EC related to them, it is a good idea to do a metadata update. To do so, you need just simple open your EC, then in the edit mode click in the button Update Metadata.
You will receive an alert to perform an update when opening the screen.
5. To avoid those things keep in mind when working with large teams, that you need to be careful when locking/unlocking objects, activating them… Good practices here are always welcome.
Therefore, Check-in All Files.
Kick-off any other user that is in the SDK in the Session Administration.
6. In small solutions you can also Activate All Items. For bigger ones you can just activate the New and Changed Items, otherwise there is a chance to freeze your Studio and crash it. Just right click in the solution to see this options.
7. Moreover, the last but not least, you should Check your solution prior to download it.
A solution check will verify the consistency of your solution, avoiding issues in next steps of download.
For smaller solutions you can run it straight forward and it might take 1~15 minutes. However, for big solutions you will need to run it in background mode. Then it can take hours, sometimes even 4~5 hours.
For small go, just select Check -> Items and Runtime Objects.
Then wait some time, if everything goes fine you will receive an success message in the left bottom corner of Studio.
Solution checked successfully
Otherwise, if you have an inconsistency an error message as alert will rise.
Now, for big solutions, first you need do Enable Background Mode, to avoid any Studio crash. You may need to click twice in this option to actually enable it (when it works will appear the message Disable Background Mode).
A message in the left bottom corner of Studio will appear.
Consistency Check enabled in background mode…
Then, do the Items and Runtime Objects.
A message in the left bottom corner of Studio will appear.
Consistency check triggered in background mode…
As it is a big solution, as said before, this might take a while, but unfortunately there is no progress bar, or status of its running progress. Therefore, every 15 minutes, you can click in Display Logs to know if an error has happened or if end up fine. If nothing happens it means it is still running.
In case of error you will see something similar to the image below.
In case of success you will see something similar to the image below.
After those steps being completed and everything went well, then you can proceed with the patch download.
Now, it is time to actually download the patch.
1. If you are in a small solution, you can simple open the Implementation Manager.
2. Then, go to option Assemble and Download. There, you might find two options. Since the release 1911 it is now possible to download New and Changed Items. Prior to this release, the only option it was All Items. If it is your first solution transportation, use All Items.
Here is a bit more about this new functionality.
Once you click to Assemble and Download->All Items, it will trigger the download process and you just need to wait, once finish you will be able to download a zip file with the content of you solution.
3. Confirm the action.
4. Choose where to save the zip file.
You might receive some messages, just click ok.
5. The zip file will be downloaded.
1. Now, for big solutions, you may need to use a another functionality called Assembly Split.
When you click in it, you will do the download in background mode and in parts, first activation, then assemble and then download the patch. It is not all together as it is in option above.
Notice that when you Enable Assembly Split, you have a breakdown of the Assemble and Download. Therefore, you must start from the Activate option. There you can choose from All Items or New and Changed Items. Whatever you chose, you must keep this choice afterwards.
2. Here we are going with All Items.
You will see the left bottom corner this message: Activating solution in background, check the mail for status.
After the activation has been started, do not do any changes in the solution.
You might get some errors during the activation, or Studio might crash. However, keep waiting until receive an email when it complete the process in background.
TIP: while the activation is executing the Disable Assembly Split is grayed out.
If you try to activate again while another activation is going on in background, you will see this message.
Once finished, you will receive an email, of course if you have correctly add your email in the solution properties as it was described in the step 2 of preparations to download a patch. You can also check the Version History tab in the Implementation Manager.
The sequence number in image above, can change from solutions.
Seldom, even when finishing the activation with success, you are not able to click in Assemble because it is gray out. If that happens, try to activate again.
3. Now, you go to next step to Assemble->All Items.
Very few times, Studio can crash and restart it self at this point. Once opening again you can see your solution is In Assembly.
Everything will be gray out when assembling.
Just wait to receive the email. Sometimes, you can see some pop-ups, just click in OK in order do keep the process.
After your assemble process has finished you will receive an email like the one below.
And your solution Assembled.
On rare occasions, even after Assemble process finish you might got an error in Version History tab. Then, check the message and see if you can fix by yourself, maybe individually activating each object that are in the error messages. And re-start the whole process again. After that you still get an error, then it might be a good idea to open an incident.
4. Time to finally download the patch!
Sometimes, after finishing the assemble, you will see everything grayed out. Do not freak out, just log off and log in again, it should appear the option to download the patch.
Just click in Download to download the patch.
You can download preview patches versions when going to Version History tab and selection an old version of your customization. This might be useful, if you lost your zip file before do the upload. Or if you want to compare versions of patches unzipping them and comparing using Git.
TIP: Use Git when unzipping patches to check coding versioning between patches.
This was also introduced in the release 1911.
If you want to know more about patch versioning and also complement this blog, check it out this nice blog Version controlling of solution in SAP Hybris C4C (at some point he creates a patch in Tenant 2, although this is possible, there is not need to create a patch other than in development tenant).
Finally it is time to deploy your patch in a target tenant! There are three main parts of it, Upload, Activate and Data Update.
Before you upload check the release version of your target tenant. You cannot upload a patch from a higher release into a old one. For example, if your patch is in release xx05 you cannot upload it to xx02. Here are more details about it, Working with Partner Solutions During Upgrade.
TIP: The other way around is possible, if you try to upload a patch from xx02 into a tenant in release xx05, you will be able to do it. Nevertheless, try always to keep same release versions as a good practice.
Another advice, do not plan your deploys in the SAP upgrade window times. When SAP is releasing their updates they update first dev/test tenants and then 2 weeks later they update production tenants. Therefore, in this range of 2 weeks or a bit more less and after, do you plan to do a deploy.
You might even get this message when try do do an upload when SAP is working on tenant.
One more thing, if by mistake you try to upload your patch in a KeyUserSolution, you will receive an error.
Action not possible; life-cycle process locked by software change.
1. Then, after check those points, lets start with the upload. Select the solution in target tenant and open the Implementation Manager, then click in Upload.
TIP: If it is your first deploy to target tenant, then it is an empty tenant. Therefore, do not create any solution, even with the same as in development tenant. Just open the Implementation Manager after login and Upload the patch. By uploading the patch it will create the solution for you.
One more thing to check is any dependencies with KUT or layout master. You might have KUT fields being used in Studio, then you need to first transport those fields to target tenant then do the deploy. Otherwise, your solution upload will fail.
However, when transporting KUT layout and fields you might have dependency with things in your solution.
Therefore, we fall in that old paradox of what came first: the chicken or the egg?
If you transport KUT first you will have errors with dependencies in Studio. If you transport your Studio solution first, you will have errors because you need the KUT fields. How to proceed?
Hopefully, there is a way to go. Do first the KUT transport.
TIP: Remember, if you have KUT dependency: transport first your KUT fields. Then do your deploy.
Here is in few steps of how to transport your KUT fields.
Create an Key User Field Extension Fields.
Add all fields.
Add a target system.
Then, Assemble it.
After that just Release it and it will be available in target tenant to be activated.
Sometimes, you will get an partial activation, that you can try activate afterwards again.
2. Choose your patch file.
3. A disclaimer will appear, saying you are responsible by performing this action in the tenant. Therefore, you need to agree with it in order to proceed.
After that is going to start the upload of solution.
When uploading large patches, you might find some issues during the upload like the ones below.
Click in OK and keep going.
Studio might freeze as well and you can even see an error message saying “The upload to the repository failed.” Again, even with that message the upload is still working in background.
Then your Studio might crash, or get empty like there is no solutions at all. If so, logoff and login again.
If when login again you see the message: Solution does not exist in repository. Try to logoff, wait few minutes and login again.
Even with that message, your solution still there.
Due to size of patch, those errors might happen. For small solutions, patches will be small, then those issues are not going to happen.
4. After being able to login again, if you had to logoff. Go to tab Version History to see the real status of the upload.
5. If you had an small patch, you probably even had to get into this and your upload have finished so far. However, for a large one you might need to wait even one hour to complete the upload.
6. You can now Activate your solution.
If you are in a PRD tenant you will not see Enable or Disable solution option, it will be something like this.
7. Is going to ask you to confirm the activation. Just click OK.
8. The activation is going to start!
You may get some error messages or Studio even crash and restart itself.
Just login again and go to tab Version History, refresh it to see how your activation is going.
9. This step can take from 10~20 minutes to 3 hours. You need to wait to complete the whole activation, therefore keep refreshing the history time to time.
10. If you run in any issues in this step, you can try to activate again. But here are two options, as you can see in the image below.
First one performs a delta activation.
What does a delta activation means? It will start where it has stopped. In another words, if it has activated 50% so far, then the delta will activate the last 50% that needs to finish the process. This option is the faster one.
Second one, is a complete activation from beginning.
This option, will re-start the activation from zero, therefore it is slow than the previous one, but it is a complete re-activation.
11. If you do not had any issues, or your second activation has worked, a automatic process called Data Update will start.
12. When this step finish, your deploy will finally finish 🙂 This step, might take up to one hour, again it depends of solution size.
Now you have finished your deploy!!!
1. If you want to keep your developments in your development tenant, you will need to create a patch. Because once you download a patch your solution get in Assembled status, which does not allow you to change anything, you cannot even open UI Designer.
2. It is going to ask to confirm to create the patch because of the namespace! That is actually we are trying to achieve here.
3. Then after a moment your patch will be created and your solution will be In Development again, therefore you can keep going your customization.
Sometimes, you also need to Deploy Business Configuration, if you had added a new BO, BC Set, ect to your BAC. Therefore, to do that you can just apply the steps below.
1. Right clicking in the solution and choose Deploy Business Configuration.
2. Choose all content, although it is only BAC itself.
That is it, just wait a moment and your business configuration will be deployed.
And if it is your first deploy, or you had add a new scope question to your BAC.
Then, be aware to enable it in your project scope.
1. Go to the Scope Configuration and enable your solution.
2. In the Questions, enable it as well
Accept Preselected Answers if you receive this message.
That is it, you have now finally finished everything!!!
How about you, how do you deploy in C4C? Are you using the Transportation Management to upload your patch in target tenant? Please, share your comments 🙂