Hi Kiran,
there are several approaches to achieve this.
You can define mandatory single value variables in filter and/or function which are set by web item selection. If no line is selected this variable stays empty and on execution the variable Dialog will popup requiring the missing variable values to be entered.
Another variant would be using the Selection Exit for planning functions.
Hinweis 1101726 - Aktiven Filter von Planungsfunktionen verändern
Here you can check c_t_charsel and if any Information/Restriction is missing raise exception empty accompanied with some error message.
Using a customer Extension item to Access the variable Container is an Option too - but compared to the first two a rather complicated.
And there might be a way using JS to check wether or not a line is marked before executing the planning sequence.
Hope this helps.
Nils