The output, Distributions > Account > Credit/Debit Account Number will only appear for gifts when the Fund has defined GL Distribution fields. 

To verify: 
1. Open the gift that is being queried. 
2. Note the Fund and Gift type (and Subtype if applicable) from the Gift record. 
3. Go to Records, Funds, and open that Fund record.
4. Go to the GL Distribution tab on the Fund record and ensure valid accounts are selected for the Gift type or Subtype.

Note: If outputting from Distributions > Account > Credit/Debit Account Number will appear blank unless the gift has a GL post status of "Posted"