What kind of IDoc are we talking about exactly? In general, in case of the RFC port there is nothing special to be done by SAP customer other than configuring RFC connection. Naturally, there must be some ABAP program or function involved in sending the data, but this should not be the customer's concern.
If you believe there is an error in the standard SAP program then I'd suggest to open an incident with SAP.