Hi Krishna,
The G/L account must have been maintained as a cost element, which is why the error you encountered is prompted. You need to indicate profit or cost center in your entry for the G/L, provided profit and cost center is available for input.
May I know if G/L account is balance sheet or P/L / income statement account?
Thanks,
Kenneth