Creating Warning/Error Messages


Hallo Guys ,

Iam very new in JDE devlopment and i need help in this

what i did When finalising a purchase order from a previous period the order date is set to the first date of the new period and the request date is still in the previous period. This results in an error message, request date before order date, and the OP and Receiving are not being created. Also the request date and the receipt date needs to be set to the first date of the new period.
and now what i want to do is

When the check is done that the financial period is closed can we add a warning so the user knows that the purchase order has a date in a closed period.

You are creating a purchase order and receiving in a closed financial period. Click Cancel to stop the finalization process and change the date in the purchase order or click Ok to continue to book the transactions on the 1st of the current month

Cancel: roll back what has been done if something has been done or stop the finalization
Ok: Continue with the current code to book the purchase order and receiving on the 1s of the open financial period

Can any one help with the steps that i need to follow to do this ?