Hi Tarek,
The explanation provided by Srinivas is very good.
Coming to your queries (that you called as process), we no where link secondary cost element to primary cost element.
So, when we see cost center report, we find the salaries debited as the result of the FI posting, but where as for credit we see the secondary cost element as the result of the confirmation of activities against the maintenance order (no credit happens with the primary cost element i.e. salaries). The entry will be .....
Dr Maintenance order with secondary CE
Cr Cost center with secondary CE
Same way at the time of settlement also, there won't be any postings carried with primary CE. Entry will be..
Dr Cost center with secondary CE (that may be the same secondary CE used for confirmation or settlement CE used)
Cr Maintenance order with secondary CE
Regards...
Jose