Here are the steps on how to add primary account segment codes and other segment codes:
Make sure that the number of digits of primary account, and other segments should match with the specified account structure.
How To Open Account Structure