How to drop an IDOC and stop message type to trigger ?

Question: Hey Guys,


I am creating oubound IDOC for sales order confirmation. Based on storage location values I have to restrict line items which should go in IDOC. I am using program ZXVEDU02 to write the code and achieve this.

The problem is that based on the logic and conditions when there are no line items are to be sent in sales order to particular partner, I have to drop IDOC itself. How to do this? please help.

If in the above program, I write delete int_edidd, the sales order is not getting created with update termination message coming in user inbox.

I wanted to stop the trigerring of message type also.
any inputs on this will be appricated.

Thanks and Regards,
Vishwanath Purohit
_________________
Thanks & Regards,
Vishwanath Purohit

Answer:
You could write an output requirement on BA00 output type in txn NACE. You do this to perform extra checks before the output is even issued. This output requirement gets called before the IDOC processing has even started.

Another option if the above does not suit, is you could copy program RSNASTED to another Z version to put in extra checking logic. You then need to link your new Z program in txn NACE to the output type for EDI instead of RSNASTED.

If you try to error the IDOC from within the IDOC processing function (ZXVEDU02), you will not get a clean process.
Copyright ?2007 - 2008 www.jt77.com