Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Batch Job Cancel

Former Member
0 Likes
1,840

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.

11 REPLIES 11
Read only

brad_bohn
Active Contributor
0 Likes
1,650

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.

Read only

Former Member
0 Likes
1,650

We are coppying data but then we are repricing invoice. after that only we need to check for price.

Read only

brad_bohn
Active Contributor
0 Likes
1,650

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.

Read only

Former Member
0 Likes
1,650

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.

Read only

Former Member
0 Likes
1,650

Hi

Why don't use the user-exit?

Max

Read only

Former Member
0 Likes
1,650

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.

Read only

Former Member
0 Likes
1,650

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

Read only

Former Member
0 Likes
1,650

Hi Max,

So Exit is fine if we fill VBFS table over ther - User exit is - USEREXIT_NUMBER_RANGE.

Read only

Former Member
0 Likes
1,650

And also Max,

Importnat thing is it should not generate invoice Doc # if error raised.

Read only

Former Member
0 Likes
1,650

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

Read only

Former Member
0 Likes
1,650

Hi

If the log table contains error message, the process should be aborted

Max