Hi Ram,
Check first of all data is replicating to ecc system? Because the data replication based on status configuration settings also. The custom badi definition will trigger if your document is met status condition to replicate data.
check this FM CRM_R3_SALES_DOCUMENT_UPLOAD also by keeping break point in FM after deregister the queue as mentioned in thread. This FM will trigger every time when u save the document, predefined checks will be performed whether document is replicate in ecc system.
Regards,
Dharmakasi.