Hi Ahmed
You can use TRM functionality for both loan given and taken. You have to select transaction type 100 for loan given and 200 for loan taken while creating transaction . You can use product category 550 for loan management
Best Regards
Bajaj Pankaj