2010 Oct 29 9:08 PM
Hi all,
We have enhancement in invoice for specific sales org - if list price is $0 then do not generate invoice. so for that we have done enhancement so it will give Error(hard error). But if we run in batch job, because of this reason job is getting cancel. Could you please update me how we can handel that error so invoice also not generate for that case and job is also not get canceled. so it will not impact other delivery to create invoice.
Hi all,
We have enhancement in invoice for specific sales org - if list price is $0 then do not generate invoice. so for that we have done enhancement so it will give Error(hard error). But if we run in batch job, because of this reason job is getting cancel. Could you please update me how we can handel that error so invoice also not generate for that case and job is also not get canceled. so it will not impact other delivery to create invoice.
2010 Oct 29 9:35 PM
That should not be done via enhancement in the invoicing code (as you've already figured out). Use a copy requirement for that purpose - a copy requirement simply logs the reason that the subsequent document was not generated and billing due moves on to the next document. However, it sounds like your item category has not been applied correctly. Many free items, such as text items or services, show up on invoices because there needs to be a record of them on the invoice for a customer. If an item should not show up on an invoice, then the item category should not be relevant for billing.
2010 Nov 01 2:32 PM
We are coppying data but then we are repricing invoice. after that only we need to check for price.
2010 Nov 01 2:46 PM
You can still use a copy requirement though. The 'standard' process checks whether or not an item should be copied, then determines what should happen when that item is copied, e.g., how or if re-pricing is carried out. This is determined by copy control configuration. You can still check for the price change scenario in your requirement with the appropriate code and stop the copy; it's just not the 'normal' way to go about it.
2010 Nov 01 3:28 PM
Hi Brad,
But On copy contorl I checked we will not have XKOMV table available - so i can check list price value. then how could i check we have list price or not.
could you please let me know strp by step what i need to do in copy control to check these condition.
1> list price shoul be populated with some value.(>0)
2> net price should not be 0 or less then 0.
2010 Nov 01 3:35 PM
2010 Nov 01 3:40 PM
Hi Max,
Right now we are using user exit. - "USEREXIT_NUMBER_RANGE". But the issue is - if list price not found or net price is "0" we are raising Error. so when i tried to run in batch job it cancel the batch job because of error.
2010 Nov 01 3:50 PM
Hi
but you don't need to raise am error message but just you need to set a message in the log, so you need to fill the table VBFS
Max
2010 Nov 01 3:56 PM
Hi Max,
So Exit is fine if we fill VBFS table over ther - User exit is - USEREXIT_NUMBER_RANGE.
2010 Nov 01 4:02 PM
And also Max,
Importnat thing is it should not generate invoice Doc # if error raised.
2010 Nov 01 4:07 PM
Yes
I think so
In that user-exit u can try to fill the table for the log error, the internal table used by the program should be XVBFS;
Perhaps u can use the form VBFS_HINZUFUEGEN_ALLG in order to fill it, I believe u need to customize a new message, but u can force a standard one in order to test the solution
Max
2010 Nov 01 4:10 PM
Hi
If the log table contains error message, the process should be aborted
Max
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |