‎2008 Nov 07 2:53 PM
Hi
As per our busniess requiment we have a set of data stored in a Z table.
We have to do GR and GI at the same time for set of records which stoted in a Z table.
If GR fails GI will not trigger and vice - versa means means if any GR fails GI will not happen and GI fails GR will not happen.
The Business should not want reversal of GR and GI .
I am using the standard BAPI BAPI_GOODSMVT_CREATE for both GR and GI. It is working fine for the below exceptions.
To handel the above situation I am running a simulation of GR first. If that is success then I will simulate a GI . If both are sucess we are doing a real posting for the GR and then GI.
But at the time of real posting for GI some of the records are failing with defict of of Quantity or there is Item 002 Order PGPGA3800001 budget exceeded.
My questions is at the time of simulation we are not getting these errors but at the time of actual posting we are getting this errors.
Since it is a busniess requirement that GHR and GI will onlypost if both are succesfull.
Please help me on this ASAP ... please.
‎2008 Nov 07 4:17 PM
If the BAPI doesn't do this validation for you, then I guess you'll have to do it for yourself. Make a list of all the things that you know of that could possibly go wrong when posting the documents and do the checks yourself on your source data before calling either BAPI.
‎2008 Nov 07 4:44 PM
Thanks For the reply .But there are hundreds of error codes which can happen but may be I am not fully aware.
My Question Is all the error not encountered at the time of simulation. Then it is a Bug in the BADI
‎2008 Nov 11 11:27 AM
>
> Thanks For the reply .But there are hundreds of error codes which can happen but may be I am not fully aware.
>
> My Question Is all the error not encountered at the time of simulation. Then it is a Bug in the BADI
It's not a BADI......it's a BAPI. It you consider this to be a bug, then you should raise an OSS note with SAP and ask them to fix it.
However, since you say that you are facing problems only with the two situations that you have identified (and I'm assuming that you have tested thoroughly to try to find out if there are any more), I'd think I'd still want to try adding my own validation for those two checks and trust to the BAPI to find any other errors.