Technically, an absolute discharge is not a sentence, but it does dipose of a criminal case in a similar way.
Where an accused person pleads guilty, or is found guilty, the court has the option in most cases to give them an “absolute discharge” instead of convicting and sentencing them. The court can do so “if it is of the opinion, having regard to the circumstances including the nature of the offence and the character of the offender, that it is inexpedient to inflict punishment” (s246(2) and (3)).
The only exceptions to the wide availability of absolute discharges as a disposal are offences “the sentence for which is fixed by law” (s246(2) and (3)), such as murder, which carries a mandatory life sentence.
The effect of this is as if the accused had never been convicted at all. An absolute discharge “shall be deemed not to be a conviction” (s247(1)), although it can still be included in a Schedule of Previous Convictions if the recipient is later charged with another offence.
Absolute discharges are quite rare in practice, and usually represent an excellent result for the accused. They tend to be reserved for cases in which there are extraordinary mitigating circumstances.
As an example of where an order for absolute discharge has been made, and the reasoning behind it, see the remarks made in HMA v Cieslak (archive link), in which the accused had pleaded guilty to a contravention of s18 of the Sexual Offences (Scotland) Act 2009.