Application Development 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: 

BAPI_REQUISITION_CREATE

rockingstar
Explorer
0 Kudos

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.

6 REPLIES 6

raymond_giuseppi
Active Contributor
0 Kudos
  • For several years now, BAPI_REQUISITION_CREATE (ME51) has been obsolete, use BAPI_PR_CREATE (ME51N).
  • Check SKIP_ITEMS_WITH_ERROR parameter
  • Put a break-point in FM ME_STATISTICS_EBAN_RKO

0 Kudos

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.

0 Kudos

BAPI_PR_CHANGE and ME52N are at level with BAPI_PR_CREATE and ME51N

Carlos_Idiaquez
Participant
0 Kudos

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.

0 Kudos

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.

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:

  • Starting with release SAP R/3 4.6C the "old" transactions and BAPIs related to business objects Purchase Order and Purchase Requisition were replaced by new single-screen (Enjoy-)transactions, new IDocs and new BAPIs. All of these new transactions, IDocs and BAPIs are available with SAP R/3 Enterprise Release 4.70 and in subsequent releases.
  • Therefore, from April 2013 onwards, all functionality that is available through the "new" transactions, IDocs and BAPIs are NO longer supported in the "old" transactions, IDocs and BAPIs (see list below).
  • "old" FMs of function group MEWQ -> will be replaced by "new" FMs of function group 2105, e.g.:
  • BAPI_REQUISITION_CREATE, BAPI_REQUISITION_CHANGE -> BAPI_PR_CREATE, BAPI_PR_CHANGE