If your Box 18 has a value of $0, then you can leave the box blank (don't input the 0) as then you shouldn't have to also determine a state code.
Code "A" is the designator of what type of entry is being put in box 18. For instance, on the K-1 for form 1065 (multimember LLC or partnership), Box 18 Code A stands for Tax-Exempt Interest Income. Box 18 Code B means Other Tax-exempt Income, etc.