Hi Mike,
So you only need to take the intermediate message type of Material_Resp and map it to MaterialTargResp or you need to take message type MATERIALS and parse data from Material_Resp and associate that information together to get MaterialTargResp? If you are doing the former then I don't think you need any special UDF logic to handle that.
Regards,
Ryan Crosby