SAP Interview Question

write code to avoid deadlock