499627 2020-01-03
499627 - FAQ: BAPIs for purchase requisitions
Version 23 Type SAP Note
Language English Master Language German
Priority Recommendations / Additional Info Category FAQ
Release Status Released for Customer Released On 17.09.2019
Component MM-PUR-REQ-BAPI ( BAPIs - Purchase requisition )
Please find the original document at https://launchpad.support.sap.com/#/notes/ 499627
Symptom
This note contains a list of frequently asked questions about BAPIs for purchase requisitions.
Catalog of questions
Can I use the BAPI BAPI_REQUISITION_CHANGE to add new items? 1.
Is the bill of material (BOM) exploded in the purchase requisition for subcontracting items? 2.
If the function module BAPI_REQUISITION_CREATE is used and the field ITEM_CAT (item category)
in the table REQUISITION_ITEMS is filled with the value K (consignment), L (subcontracting), S (third-party), U (stock transfer), W (material group), or D (service), the system issues error message ME 719:
"Item category ... does not exist (Please correct)".
3.
Can I use ALE (using IDocs/EDI) to call the BAPIs BAPI_REQUISITION_CREATE and
BAPI_REQUISITION_CHANGE?
4.
Can I use BAPI_REQUISITION_CREATE to set the fixed indicator? 5.
Can the BAPIs of the purchase requisition with the "CreateFromData" and "Change" methods cover all
of the functions of the EnjoySAP purchase requisition (transactions ME51N and ME52N)?
6.
Can BAPI_REQUISITION_CHANGE process the customer enhancements ExtensionIn? 7.
Can service items be created using BAPI_REQUISITION_CREATE or changed using
BAPI_REQUISITION_CHANGE?
8.
Can service items be created using BAPI_PR_CREATE or changed using BAPI_PR_CHANGE? 9.
In online transaction ME51, you can assign a 35 character vendor material number to an item.
However, I can maintain only 22 characters in the BAPI. Can I change this?
10.
I can use the user parameter CNT to maintain a cost center in the user master record;
BAPI_REQUISITION_CREATE can import this cost center. What is the correct format for entering this
cost center if the cost center is only numeric?
11.
What must I take into account when I use the BAPI BAPI_REQUISITION_CHANGE to change or
delete texts?
12.
Can the BAPI_PR_CREATE or BAPI_PR_CHANGE be called several times in a sequence? 13.
Can I use BAPI_PR_CREATE and BAPI_PR_CHANGE to use the same material in the BAPI structure
PRCOMPONENTS as a component several times?
14.
--------------------------1. Question:
Can I use the BAPI BAPI_REQUISITION_CHANGE to add new items?
Answer:
No.
1 of © 2020 SAP SE or an SAP affiliate company. All rights reserved
6
499627 2020-01-03
--------------------------2. Question:
Is the bill of material (BOM) exploded in the purchase requisition for subcontracting items?
Answer:
You cannot explode the BOM in a purchase requisition that has been created using
BAPI_REQUISITION_CREATE. However, the explosion takes place when the purchase requisition is
converted into a purchase order. For more information, read Notes 182787 and 102595.
As of SAP ERP 6.0, it is possible to trigger the BOM explosion for a subcontracting item.
--------------------------3. Question:
If the function module BAPI_REQUISITION_CREATE is used and the field ITEM_CAT (item category) in the
table REQUISITION_ITEMS is filled with the value K, L, S, U, W, or D, the system issues error message ME
719:
Item category ... does not exist (Please correct).
Why?
Answer:
You must enter the internal item category instead of the external item category. You can find the assignment
in purchasing Customizing (transaction OLME) in the "Define External Representation of Item Categories"
area.
--------------------------4. Question:
Can I use ALE (using IDocs/EDI) to call the BAPIs BAPI_REQUISITION_CREATE and
BAPI_REQUISITION_CHANGE?
Answer:
The logical message category PREQCR is provided for the BAPI BAPI_REQUISITION_CREATE. An ALE
connection is not going to be provided for BAPI_REQUISITION_CHANGE. PREQCR is only delivered with a
Support Package for Releases 4.0B to 4.6C.
---------------------------5. Question:
Can I use BAPI_REQUISITION_CREATE to set the fixed indicator?
Answer:
You cannot use the BAPI BAPI_REQUISITION_CREATE to set the fixed indicator.
When the BAPI BAPI_REQUISITION_CHANGE is used to make changes, the system sets the fixed indicator
2 of © 2020 SAP SE or an SAP affiliate company. All rights reserved
6
499627 2020-01-03
automatically only if the purchase requisition originates from requirements planning.
For more information, refer to Note 330206.
---------------------------6. Question:
Can the BAPIs of the purchase requisition with the "CreateFromData1" and "Change" methods cover all of
the functions of the EnjoySAP purchase requisition (transactions ME51N and ME52N)?
Answer:
The function modules BAPI_REQUISITION_CREATE and BAPI_REQUISITION_CHANGE do not cover all of
the functions of the EnjoySAP purchase requisition transactions. This is because the two asynchronous
BAPIs have been developed based on ME51 and ME52 (program SAPMM06B). The user exits from the
function group MEREQ (for example, MEREQ001) are therefore not available.
In SAP R/3 Release 4.70, two new API methods are developed that are based on the EnjoySAP technology
of the purchase requisition transactions ME51N and ME52N. The function modules BAPI_PR_CREATE and
BAPI_PR_CHANGE are released in Release 6.00 (ERP2005).
SAP does not provide support for this because these function modules have not been released for
Releases lower than 6.00. If you use these BAPIs in customer-defined programs, you must bear in
mind that you are responsible for any problems that might occur. In addition, you must read Notes
109533 and 415983.
A downport to a release lower than 4.70 is not provided because developing this would involve considerable
time and effort.
---------------------------7. Question:
Can BAPI_REQUISITION_CHANGE process the customer enhancements ExtensionIn?
Answer:
See Note 584902.
---------------------------8. Question:
Can service items be created using BAPI_REQUISITION_CREATE or changed using
BAPI_REQUISITION_CHANGE?
Answer:
No, this is only possible with the new API functions for the object BUS2105. See the following point.
---------------------------9. Question:
Can service items be created using BAPI_PR_CREATE or changed using BAPI_PR_CHANGE?
3 of © 2020 SAP SE or an SAP affiliate company. All rights reserved
6
499627 2020-01-03
Answer:
Yes. Release 6.04 (Enhancement Package 4) provides new API functions for the object BUS2105 that
include this function. In addition the business function LOG_MM_CI_2 or the switch MM_SFWS_SC2 must
be active.
See Note 1312947 for further information.
---------------------------10. Question:
In online transaction ME51, you can assign a 35 character vendor material number to an item. However, I
can maintain only 22 characters in the BAPI. Can I change this?
Answer:
When the BAPIs for the business object BUS2105 (PurchaseRequisiton) were developed, the field for the
vendor's material number (EBAN-IDNLF) was only 22 characters long. This definition has changed in SAP
R/3 Release 4.5B to include 35 characters.
You cannot change the field VEND_MAT in the relevant API methods for compatibility reasons.
However, the full length of this field is provided in the new API methods.
---------------------------11. Question:
I can use the user parameter CNT to maintain a cost center in the user master record;
BAPI_REQUISITION_CREATE can import this cost center.
What is the correct format for entering this cost center if the cost center is only numeric?
Answer:
You must enter the cost center with leading zeros. The BAPI does not convert the format.
---------------------------12. Question:
What must I take into account when I use the BAPI BAPI_REQUISITION_CHANGE to change or delete
texts?
Answer:
To ensure the persistent processing of the texts, you must always call the function module COMMIT_TEXT
after BAPI_REQUISITION_CHANGE.
--------------------------13. Question:
Can the BAPI_PR_CREATE or BAPI_PR_CHANGE be called several times in a sequence?
Answer:
No. If you use the BAPIs for the same business object - for example, purchase requisitions (BUS2105) - in a
sequence in customer-specific programs, this may lead to the following problems:
4 of © 2020 SAP SE or an SAP affiliate company. All rights reserved
6
499627 2020-01-03
Example: Let us assume you want to update the price for several purchase requisitions. If several
documents are processed in a sequence, this may lead to the dump
'OBJECTS_OBJREF_NOT_ASSIGNED'.
Solution: We recommend using the parameter DESTINATION 'NONE'. This has the result that the BAPIs
are executed in a separate context, thus preventing the data of one BAPI from overlapping another.
--------------------------14. Question:
Can I use BAPI_PR_CREATE and BAPI_PR_CHANGE to use the same material in the BAPI structure
PRCOMPONENTS as a component several times?
Answer:
No. Due to the complexity occurring during sorting and updating of the RESB table, SA strongly recommends
NOT using the same materials in the BAPI structure PRCOMPONENTS several times.
Other Terms
-Reason and Prerequisites
-Solution
-This document refers to
SAP Note/KBA Title
747132 APIs in BUS2105 and vendor's material number
584902 BAPI_REQUISITION_CHANGE: ExtensionIn is not connected
582221 FAQ: BAPIs for purchase orders
499626 FAQ: BAPIs in the service procurement
485557 BAPI_REQUISITION_CREATE: 'EXTENSIONIN' customer enhancements
330206 BAPI_REQUISITION_CHANGE:No fixing of PReqs from MRP
182787 No planning file entry with PReqs from SD/PP/PS
109533 Use of SAP function modules
102595 Subcontracting Preqs generated from SD/PS have no components
5 of © 2020 SAP SE or an SAP affiliate company. All rights reserved
6
499627 2020-01-03
This document is referenced by
SAP
Note/KBA
Title
1936731 EBAN-BPUEB (Adopt Requisition Price in PO) is reset during PR creation in BAPI_PR_CREATE
2406654
BAPIs called in sequence returns wrong data or OBJECTS_OBJREF_NOT_ASSIGNED short
dump
1638852 FMCF108 error during reassignment
582221 FAQ: BAPIs for purchase orders
584902 BAPI_REQUISITION_CHANGE: ExtensionIn is not connected
499626 FAQ: BAPIs in the service procurement
102595 Subcontracting Preqs generated from SD/PS have no components
747132 APIs in BUS2105 and vendor's material number
485557 BAPI_REQUISITION_CREATE: 'EXTENSIONIN' customer enhancements
182787 No planning file entry with PReqs from SD/PP/PS
330206 BAPI_REQUISITION_CHANGE:No fixing of PReqs from MRP
6 of © 2020 SAP SE or an SAP affiliate company. All rights reserved
6