Hi,
You have to do one of below to achieve this,
- Search if there is any user exit available to build it, so you can insert the check on output type in standard logic.
- Create transaction variant ZVT70 and insert a check in Z with the help of any standard object or custom auth object as modification to standard one is not recommended.
Hope this helps.
BR,
Mangesh