Controlling Printing output through output type issue??

Question: Hi Guys,

Need your help with a typicall issue.

The Scenario:
I am creating a billing document using Vf03 tcode. And as soon as the billing document is saved the custom output type is propsoed based on the condition record maintained and the output is triggered and subsequently printing is triggered.
So far so good.

The Issue:
In the printing we need to have one check. If some of the data is missing which needs to be printed then it should not print the document.
I am doing the check for the data in the print program. If the data is missing i am issuing a error message.

The Problem is sincce the output is configured to be triggered on save of the billing document. SAP Calls CALL FUNCTION IN UPDATE TASK to create the billing on saving. The error which is issued in the print program is creating a Update termination errror as the saving of the billing is done in the Update task.
If i dont issue the error message then everything is fine. Even the printing does not get triggered but we want to display a error message so that the user is aware there is an issue.

How to control such a situtation?

Cheers
VJ
_________________
Dare to Share

Answer:
The only way to do this is to validate before the UPDATE TASK is triggered. Otherwise you're back into Update Terminated terrority every time.
_________________
Kind Regards

Rosie Brent

Please remember to search the forum and check the FAQ before posting questions, thank you.

Tuly Idiot most of the time, part-time Guru

Answer:
Change your condition records from "Send immediately (when saving)" to "Send with periodically schedule job." Then schedule a job to run your print program as frequently as you desire. Your tests will then kill individual output instead of the underlying document.
_________________
ABAP-BE-BOP
Copyright ?2007 - 2008 www.jt77.com