Hi TE,
If i understood correctly , You are trying to display errors / warning message from the function module
L_TO_CREATE_DN.
1. Initialize the messages
MESSAGES_INITIALIZE
2. Loop the T_WMGRP_MSG from the FM and pass message id, message no , message type MESSAGE_STORE
3. Display message with MESSAGES_SHOW
Example,
Function module to display error
Thanks & Regards,
Arun