Limitation in BAPI Scheduling Agreement (SA) Create or Change PDF
Limitation in BAPI Scheduling Agreement (SA) Create or Change PDF
Applies to:
SAP ECC 6.0.For more information, visit the ABAP homepage.
Summary
The article describes the limitations in standard SAP BAPIs to create or change Scheduling Agreements with
multiple line items, each of which having multiple conditions.
Author: Saba Sayed
Company: Larsen & Toubro Infotech Limited
Created on: 07th August 2009
Author Bio
Saba Sayed is SAP certified NetWeaver ABAP Consultant, working in Larsen & Toubro
Infotech Limited. She has more than three years of SAP experience and has worked
extensively in ABAP, OO ABAP, Workflow, ALE / IDoc and SAP SRM.
Table of Contents
Business Requirement .................................................................................................................................. 3
1. Issue...................................................................................................................................................... 3
2. Function Module .................................................................................................................................... 3
3. Data ....................................................................................................................................................... 3
4.1 Header .......................................................................................................................................... 3
4.2 Item ............................................................................................................................................... 4
4.3 Condition Validity: .......................................................................................................................... 4
4.4 Conditions: .................................................................................................................................... 5
4. Observation: .......................................................................................................................................... 6
5. Analysis: ................................................................................................................................................ 6
6. Output:................................................................................................................................................... 7
7.1 Header Data: ................................................................................................................................. 7
7.2 Item Data: ...................................................................................................................................... 7
7.3 Condition Data: .............................................................................................................................. 8
7. Conclusion: ............................................................................................................................................ 8
Related Content ............................................................................................................................................ 9
Disclaimer and Liability Notice ..................................................................................................................... 10
Business Requirement
Create or change Scheduling Agreement with multiple line items, each of which is having multiple
conditions, using function module/BAPI.
1. Issue
Multiple SA conditions for multiple line items are not created at a time using BAPIs
„BAPI_SAG_CREATE‟ / „BAPI_SAG_CHANGE‟.
2. Function Module
“BAPI_SAG_CREATE” enables you to create a scheduling agreement. The BAPI uses the
technology behind the SA creation transaction (ME31L).
“BAPI_SAG_CHANGE” enables you to change a scheduling agreement. The BAPI uses the
technology behind the SA change transaction (ME32L).
3. Data
4.1 Header
4.2 Item
Item 00010 and 00020
Set respective flags for both the line items in ITEMX table.
Set respective flags for both the line items in ITEM_COND_VALIDITYX table.
4.4 Conditions:
Item 00010:
Item 00020:
Set respective flags for both the line items and its respective conditions in ITEM_CONDITIONX
table.
4. Observation:
At the time of SA creation/change, if multiple line item data along with its respective (multiple)
conditions were passed to BAPI_SAG_CREATE, only „PB00‟ condition was added to first line
item. For the rest of the line items conditions were not added.
5. Analysis:
On debugging the BAPI, to check the point where conditions data was added / created for the
SA, it was observed that for multiple line items, the ID number [ID_KONH] was the same. See
snapshot below:
First two records for conditions are for the first record.
Due to this, when code was checking the data consistency between corresponding, at that time due
to same ID number, it was switching to „Duplicate number‟ error and exiting from conditions creation
after executing first condition (PB00) for first line item.
6. Output:
Go to transaction ME33/ME33L to check SA.
Item 00020:
No conditions added to Item 00020. Net price is „0‟ in item level.
7. Conclusion:
We can create one SA line item with multiple conditions at a time.
Related Content
http://help.sap.com/saphelp_erp60_sp/helpdata/EN/75/ee1fa755c811d189900000e8322d00/frameset.htm
For more information, visit the ABAP homepage.