There are blow steps for Update CTC Value during the generate letter:
1. Navigate: Control Panel-> Forms & Policies-> Documents Template->New Page will be open.
When you generate a document, after selecting an employee on the left, you get an option to enter the values on the right side of the document.

For an Example: We have to set up a formula in Custome key with all components like below:
Basic- CTC*0.5/100
HRA- Basic*0.4/100
Special Allowances- (CTC- (Basic+HRA))
When you enter Custom Value of CTC on Point no. 3 and click on "Generate" option then letter will be generated.