2023 Nov 08 4:05 PM
BAPI_REQUISITION_CREATE is creating PR even if the budget exceeded error coming. Error message BP-603
It should not create any PR if any error occurs but it's creating PR.
How to resolve this ? Input is appreciated.
2023 Nov 08 4:40 PM
2023 Nov 10 1:05 PM
Hi,
I had checked this SKIP_ITEMS_WITH_ERROR parameter but we are not using it.
I had tried to post the same values to BAPI_PR_CREATE but I am getting - Enter WBS Value.
As we are using BAPI_REQUISITION_CREATE I don't want to disturb the existing logic but I want to know why it is creating PR even though we are getting budget exceeded error not in the BAPI_REQUISITION_CREATE return table but the error is coming in the BAPI_PR_CHANGE.
Thanks,
Haneesh.
2023 Nov 10 1:30 PM
BAPI_PR_CHANGE and ME52N are at level with BAPI_PR_CREATE and ME51N
2023 Nov 10 3:57 PM
Hi Haneesh,
In this case you are using a FM that avoid several restrictions. When you exceed your budget, the message its just a warning message, so the FM execute and create the PR. You can try to change the message to an error message to stop the process without a document post. (Configuration step that sends you directly to the enhancement spot).
If this solution doesnt work and you still want to keep using BAPI_REQUISITION_CREATE, befor you call the FM, you need to check your actual budget and the limit of your budget.
Add the amount of the future PR to your actual budget and if this its bigger than your limit budget, you dont execute the FM and rise an error message that you are trying to create the internal orden but you exceed your limit.
I hope this solve your requirement.
2023 Nov 11 6:15 AM
Hi Carlos,
I just want to know the include or method in BAPI_Requisition_create where it will get the error message - Budget exceed error message.
I had tried to check but unable to find exact place where we get this error message.
Any help on this.
2023 Nov 11 9:37 AM
Why do you both keep talking about BAPI_REQUISITION_CREATE?
You must use BAPI_PR_CREATE, as Raymond explained.
Excerpts from 1803189 - FAQ: End of Support of ME21, ME51, BAPI_PO_CREATE and Archiving Reports etc. - SAP for Me: