How to copy GL Accounts in sap

GL account is created under a chart and company code. To copy gl accounts you need to copy first the chart of account and then copy company code