You can make use of SAPMEINT component to establish connection between ERP and ME through MII. For this you need to configure and deploy SAPMEINT components.
Check below links for configuration
Configuration of Standard SAPMEINT Interfaces - SAP Manufacturing Execution (SAP ME) - SAP Library
Check below document link for more understanding how communication happens from ECC to ME through MEINT
SAP MEINT Overview and data communication between SAP ECC and SAP ME via SAP MEINT
Thanks,
Padma Rao