The treatment code is a combination of the tax options selected.
When submitting STP2 the ATO does not accept invalid combinations of options and you will receive an error response like this:
In the example above the value supplied "KDXXX" is the code the software derives from the entered Tax Options. The valid options are listed in the response for the type and circumstances of the data submittted.
In the following example "NAXXX" is the code the software derives from the entered Tax Options.
If the medicare options are not set "XXX" is the last part of the derived value.
If you don't select any values in the Tax treatment category or Tax treatment codes then the default value derived will be "RTXXX". Representing "R - Regular" and "T - Tax free threshold".
See: linked quick reference guide for Tax Treatment Codes from ATO below