Documente Academic
Documente Profesional
Documente Cultură
Welcome to the new version of SAP Community Wiki: Learn What's New? and what has changed.
Dashboard / … / Demand Management PP-MP-DEM
Purpose
The purpose of this page is to explain how to maintain PIR by BAPI by test cases.
Overview
Via these BAPIs, one can generate PIRs out of external data and use them this way within the SAP-System. The BAPIs
are a shell around the function module REQUIREMENTS_MAINTAIN. There are four function modules, where just the
first three can be edited within the transaction BAPI.
1. BAPI_REQUIREMENTS_CREATE: create planned independent requirement
2. BAPI_REQUIREMENTS_CHANGE: change planned independent requirement
3. BAPI_REQUIREMENTS_GETDETAIL: display details about planned independent requirement
4. BAPI_REQUIREMENTS_SIMULATE: test by simulation, if change/create PIR would be possible
<BAPI_REQUIREMENTS_CREATE>
Import parameters:
REQUIREMENTS_ITEM:
You use this parameter to define the item for which the planned independent requirements are created.
For more information on the individual parameter fields, see the data element documentation in the ABAP Dictionary.
The following fields are required:
MATERIAL
PLANT
VERSION
If you wish to create independent requirements for a requirements plan, specify the requirements plan in the
REQ_NUMBER field.
You use the REQU_TYPE field to define the requirements type. Note the following:
If the field is blank, the requirements type is derived from the planning strategy in the material master.
If an invalid requirements type is transferred, the system issues an error message depending on the Customizing setting
(transaction OMPJ).
If no requirements type can be determined, the system issues an error message.
This occurs if the requirements type is not transferred or derived from the planning strategy in the material master.
The MRP_AREA field should only be filled if the MRP areas are active. In this case, you can create planned independent
requirements for an MRP area. Note the following:
The MRP area must be assigned to the material (field MATERIAL) in its material master.
The planned independent requirements are created automatically for the plant MRP area when MRP areas are blank.
REQUIREMENT_PARAM:
As a rule, this parameter is not evaluated and should not be used.
DO_COMMIT:
You use this parameter to define whether the command COMMIT WORK is entered within the method.
Value range
X: A COMMIT WORK is entered
https://wiki.scn.sap.com/wiki/display/ERPMan/%5BTEST+CASE%5D+PIR+Maintenance+via+BAPI 1/7
1/13/2020 [TEST CASE] PIR Maintenance via BAPI - ERP Manufacturing (PP) - Community Wiki
Tables:
REQUIREMENTS_SCHEDULE_IN:
You use this parameter to define schedule lines that are to be created.
For more information on the individual parameter fields, see the data element documentation in the ABAP Dictionary.
The following fields are required:
DATE_TYPE
REQ_DATE
REQ_QTY
Value range
You can use the following values for the period indicator DATE_TYPE:
1: Day
2: Week
3: Month
4: Posting period (if defined in material master)
5: Planning calendar (if defined in material master)
REQUIREMENTS_CHAR_IN:
This parameter is used to create configuration supporting points for planned independent requirements. See the detailed
documentation of this parameter in SE37.
RETURN:
This parameter contains messages about errors that have occurred.
https://wiki.scn.sap.com/wiki/display/ERPMan/%5BTEST+CASE%5D+PIR+Maintenance+via+BAPI 2/7
1/13/2020 [TEST CASE] PIR Maintenance via BAPI - ERP Manufacturing (PP) - Community Wiki
Result:
https://wiki.scn.sap.com/wiki/display/ERPMan/%5BTEST+CASE%5D+PIR+Maintenance+via+BAPI 3/7
1/13/2020 [TEST CASE] PIR Maintenance via BAPI - ERP Manufacturing (PP) - Community Wiki
<BAPI_REQUIREMENTS_CHANGE>
Import parameters:
DELETE_OLD:
You use this parameter to determine whether exising schedule lines are deleted.
Value range
X: All existing schedule lines are deleted and the transferred schedule lines are entered.
Initial: Existing schedule lines are not deleted.
Newly transferred schedule lines for existing requirement dates overwrite the existing schedule lines.
Default
X: All existing schedule lines are deleted and the transferred schedule lines are entered.
NO_WITHDR
You can use this parameter to define whether the transferred planned quantity is reduced by the withdrawal quantity of
the same period.
Value range
X: The schedule lines are created with the transferred planned quantity.
Initial: The transferred planned quantities are reduced by the existing withdrawal quantity.
Default
Initial: The transferred planned quantities are reduced by the existing withdrawal quantity.
https://wiki.scn.sap.com/wiki/display/ERPMan/%5BTEST+CASE%5D+PIR+Maintenance+via+BAPI 4/7
1/13/2020 [TEST CASE] PIR Maintenance via BAPI - ERP Manufacturing (PP) - Community Wiki
BAPI input:
Result:
https://wiki.scn.sap.com/wiki/display/ERPMan/%5BTEST+CASE%5D+PIR+Maintenance+via+BAPI 5/7
1/13/2020 [TEST CASE] PIR Maintenance via BAPI - ERP Manufacturing (PP) - Community Wiki
<BAPI_REQUIREMENTS_GETDETAIL>
Result:
<BAPI_REQUIREMENTS_SIMULATE>
https://wiki.scn.sap.com/wiki/display/ERPMan/%5BTEST+CASE%5D+PIR+Maintenance+via+BAPI 6/7
1/13/2020 [TEST CASE] PIR Maintenance via BAPI - ERP Manufacturing (PP) - Community Wiki
It is only for simulation purpose. The import and export parameters are similar to BAPI_REQUIREMENTS_CREATE and
BAPI_REQUIREMENTS_CHANGE
Related Content
Related Documents
Related SAP Notes/KBAs
No labels
https://wiki.scn.sap.com/wiki/display/ERPMan/%5BTEST+CASE%5D+PIR+Maintenance+via+BAPI 7/7