I have to settle all my primary costs to GL Account and Secondary cost to PSG .
Define a settlement cost element for receiver type PSG
Message no. KD506
In allocation structure AS (controlling area ATC), you did not define which cost element should be used when settling costs/revenues of the sender. Nor did you define receiver type PSG.
Assign a different allocation structure to the settlement sender (-> Master data -> Settlement rule -> Goto -> Settlement parameters), or maintain allocation structure AS.