Hi Shaji,
Please try to check on following things,
1. Try to check the FM alone in ECC if its working fine.
2. Can you test on SM59 in ECC , if all connections are fine and same Program ID is used in your sender configuration(MII).
3. Are you using same RFC destination for both IDOC and RFC, if any RFC processing as well?
This is not any problem with the MII setup, But the FM is failing in ECC I guess, check ST22 to see any dumps.
Regards,
Padma Rao