2011 Oct 28 10:14 AM
Hello,
We only want to create invoices with a price gretater than a minimum. Currently we have implemented userexit EXIT_SAPLV60B_001 with the check and we display an error message when the price is less than the minimun we have defined.
Our problem comes when we try to create several invoices (from VF04) because if, for example, the first invoice returns an error the other invoices wont be processed even if they are correct.
We think the problem is that the userexit we are currently using is not prepared to manage error, so when we display the error message the program stops. We tried several userexits in the invoce creation but we havent found any where manage this situation.
Any suggestions? About any other userexit / badi we can use to do our check?
Thanks in advance!!
2011 Oct 28 10:27 AM
well if it´s really the case that the error message is your problem, then why dont you just gather it in some log, DO NOT process error message but print log when ready?
2011 Oct 28 10:34 AM
Hello,
Thanks for your comments. But in the current exit we dont have any log to add our message.
Do you know any userexit where I can manage the log? Thats would probably work !
2011 Oct 28 10:41 AM
oh well, i was rather tinking of a log of your own in some way.
E.G. appending "log" entries to some internal table, exporting this to memory or making it available to some coding in a later processeduserexit, and there just print or write or export the log.
Or just checking if your log has lines with "errors" and when this is true, give an error message telling the user that there were errors during invoicing and that he has to check what he just did.
2011 Oct 28 10:50 AM
Oh no, In fact we need to return an error for the invoice that doesn't verify the check and avoid its creation.
What I mean is that when you execute for just one invoice our code works perfectly. The problem "with the error message" is becuase when you are processing several invoices (like in VF04) and you get an error on the first one --> Then you are not able to process the others
So what we really need is an userexit where when you return an error, it "skip" to next entry and continue with the execution.
I hope my problem is clearer now
Thanks for your help!
Regards,
2011 Oct 28 10:46 AM
Hi
Try it with requirement pricing VOFM subroutines in the pricing procedure. Do a mix between a VOFM as 23 or 24 (only invoices) and 85 (applied in IS-Retail related with competitor prices, think in other statistical condition). If the condition is mandatory and it's not determined, surely the invoice won't be created. It's an idea. But maybe will be better idea to control it in SO in my opinion.
I hope this helps you
Regards
Eduardo
Edited by: E_Hinojosa on Oct 28, 2011 11:46 AM
Edited by: E_Hinojosa on Oct 28, 2011 11:47 AM