WE57 to link function module to Message type
WE57 - Link function module to Message type / Basic type
Also if you get the an error when processing your IDoc saying "Function Module Not Allowed:" it is within WE57 that you need to set this up

When setting it up in WE57 note the object type is important and denotes the description and name fields
