Overview

 

Aim of this document is to show how price variance is calculated in a context of standard cost.

 

Standard cost, is a agreement between Engineering and Finance areas, regarding the price of raw materials and operative supplies, this estimated price is a key input to calculate gross margins.

 

PPV impact on Gross Margin

 

The Purchasing Price Variance or PPV is a warning flag that says that the gross margin will have variance, taking care about the situation, on a nimble way, enable the organization to keep margins going forward.

 

 

Our scenario is built it to buy 1,000 LB of raw material, where:

 

  • Standard Cost is 10 USD per LB
  • Order Price is 11 USD per LB
  • Actual Price is 12 USD per LB

Standard Price

 

First of all, we have our raw material master data created:

 

ppv-001

Purchase Order Price

 

Then, we create an order; price is above our estimated standard price:

 

ppv-002

PPV at Goods Receipt

 

Now, lets assume that we had received the material before the invoice, so a difference is calculated:

PPV during GR = Standard Price – PO Price

 

ppv-003

 

The journal entry for this GR is:

 

Inventory Account DR 10,000 USD Standard Price
GR/IR Account CR 11,000 USD PO Price
PPV Account DR 1,000 USD Balance

PPV at Invoice Receipt

 

Now, when invoice is received, we realize that market change and now, the actual price is different than the PO price

PPV during IR = PO Price – IR Price

ppv-004

 

Journal entry is:

 

Vendor CR 12,000 USD Actual Price
GR/IR Account DR 11,000 USD PO Price
PPV Account DR 1,000 USD Balance

 

This means that the net PPV is:

Net PPV = Standard Price – IR Price = 10 – 12 = -2 USD per LB

 

This is an unfavorable Purchasing Price Variance.

Net PPV

 

Now, on SAP there is a report that can be customized (configured) to get this Net PPV, this is:

 

ppv-005

 

You can use transaction MC$G, to get the report with data related to PPV.  This is infostructucture S012 that can be enhanced to take advantage of Logistics Information System features, or a simple query using structure S012 can be created.

 

How to enhance LIS for MM.

http://scn.sap.com/docs/DOC-50821

http://scn.sap.com/docs/DOC-50822

 

Note: This note was originally posted on my personal blog at angelreyes [dot] wordpress [dot] com

Dear Community,

 

Do you have queries from your business users around inventory management valuations regarding the changes of the moving average price of certain materials? If so you may have already noticed that the moving average price of materials can be changed by several different documents in ERP systems, for example: material documents, price change documents, invoice documents, production settlements or even credit memos or material ledger documents. Due to the complex cross-application knowledge required to find all these documents it can be quite complicated to access and review all relevant documents.


Our new pilot supportability tool provides a new report to help the analysis of such scenarios. I would like to invite everyone to check out our new initiative as in the end our partners' and customers' feedback will decide the future of this tool. If the community supports our initiative this new solution may be released in a standard note in the near future.


You can download the pilot version and find a detailed explanation of how the new report works in the MM Trouble Shooting Guides here:
http://wiki.scn.sap.com/wiki/display/ERPSCM/Unexpected+changes+in+the+Moving+Average+Price

 

Please let us know in the comment section how you find the tool and whether you would like to see something similar in the standard software!

 

Kind Regards,
Peter

Since there are many contents in our MM SCN space, it is hard to find the information regarding particular topic.
But many of them are very useful, it's really a shame that they are submerged in the large  number of articles.
I will create an index about the most useful Documents/Blogs in MM-PUR area, hope it can be helpful when
searching information in SCN. I will also update it regularly to add the new postings into this blog.

 

 

★Correction Reports:
-Useful Correction Reports in MM-PUR area (Ⅰ)  and (Ⅱ)

 

 

★Function:

-Pricing procedure Steps and Details in SAP MM

-Purchasing Release Strategy - an expanded explanation and a GPS through SCN and SAP notes
-SAP EHP 5 – New Procurement Functionalities - business function “LOG_MM_CI_3”

-Are you planning to change your pricing calculation schema?

-Frequently updated Configurations

-Automation of Texts (terms & conditions) in Purchasing documents

-Transport of Release Strategies? Not a good idea

-Dealing with unit of measure in purchasing document and goods movement

-Report of Master data's Texts and Purchasing Document's Text for Header and Item Level.

-Rebate in MM

-Pricing Report in MM

-Partner determination

-Search / Change / Display Condition record by using Condition Index

-Round off Condition Values - Pricing Configuration

-Triggering of release strategy for a Purchasing document – a developmental overview

-Deletion of Existing Release Strategy in SAP ECC

-Define your own sequence for Text in Purchasing document.

-Third-Party Subcontracting using SC Vendor Concept

-Copy Control in MM (Conditions, Fields and Texts)

-MM Customizing Tcodes

-Release Strategy Scenarios

-Important MM Tables

-MM Authorization objects

-sap mm valuation scenario

 

 

★Purchase Order
-Vendor / Material Intelligent Search in Purchase Order

-Delivery Complete Indicator of PO and Goods Receipt

-Why Decimal Format in Purchase Order Print Preview Displays Incorrectly?

-My view to prepare a report for all completed PO numbers with or without open invoice

-Query Report Tips Part 1 - How to Display PO ME23N in SQ01

-Plant Wise Currency In Purchase order for a Specific Vendor

-Having actual event description at PO History tab of any Purchase Order  display

-Do you know what you can or can´t do with the BAPI´s for Purchase Orders?

-Error/Warning message during PO Creation Against Specific Material+Plant Combination

-How to Reset Purchase Order Release Strategy

-The trouble with Blanket POs

-MM - Check List to detect and solve Release Strategy Issues

-Would you like to prevent copying deleted requisition ítems into your purchase order?

-Who else wants to have a quick view of the Stock Transport Order customizing in the MM area?

-Why can certain fields not be changed using MEMASSPO, or which fields can be changed?

-Multiple Currencies in Purchase Order Release Strategy

-Release Strategy: Restrict lower users to revoke PO after the complete release by superior

-Defaulting Tax Code in PO - Condition Technique

-Automatic creation of STO from multiple Stock Transport Requsitions

-Purchase_Accounting_In_SAP

-Return STO in SAP Logistics

-Automatic Tax Code Determination in PO

-Mass Maintenance for Purchasing Document or Master Data

-Park & Hold in PO & PR

-Wiping off storage location address from Purchase order

-How to Create a Custom Field on Table EKKO and Populate with IDoc PURCONTRACT_CREATE

-STO - Key settings for Shipping tab in STO and Delivery creation against STO

-A Document On Auto PO process

-Automatic Purchase order creation for Return Delivery

-Create and print a new item text type for purchase order

-Returns Stock Transfer Order – Overview and Implementation in SAP

-Settings in the Purchase Order to deactivate default net price

-How to execute report by using object class for changes in the PR and PO documents

-MM: FREIGHT COST IN PO OUTPUT

-How 'Reduced quantity' (EKES-DABMG) is calculated in Purchase Order

-Deactivating Hold Functionality in Purchase order Screen

-Release Strategy configuration for Contracts and Purchase Order

 

 

★Outline Agreement/Contract

-Brief overview of Outline agreements

-Scheduling Agreement Process

-SAP FIORI : Approve Purchase Contract App

-How to use Shopping Cart in PO

 


★Info Record

-Difficulties in price condition load for purchasing info records with COND_A IDoc method

-How to correct Info Record with split validity periods

-Create Info Record for different Order Unit

-Multiple Vendors in a Single Purchasing Info Record – SAP MM

 

 

★Purchase Requisition
-Purchase Requisition Conversion Strategy
-Setting Up Release Procedure for PR without classification.

-How to Add Custom Header Text in Purchase Requisition

-MM:Define copy rules for PR texts

-Setting a default Purchasing Org in Create Purchase Requisition Screen

 

 

Quota Arrangement/RFQ
-Configure Quota Arrangement in SAP MM

-RFQ Rejection Process

 

 

★Report/LIS

-Having performance issues with reporting in purchasing with ME2* transactions?

-Update History Data to user defined LIS (Purchasing)

-How to Create an LIS info structure - Purchasing - Part 1

-How to Create an LIS info structure - Purchasing - Part 2

-Enhance purchasing reports with new fields

-To find the logic for field in the Report



......CONTINUOUSLY UPDATED (weekly)......

JAHEER HUSSAIN,CRISTAL.

______________________________________________________________________________________________________________________________
Hi,

 

Objective:

 

    Recently I have implemeted Badi(ME_PROCESS_PO_CUST)  for 'Not allowing create PO(with dcoument type NBPJ and CRPJ) without PR.

 

If user tries to create PO(PO document type PJCR or NBPJ) with out PR,then system will throw error message.The Error message is "There is NO Purchase Requisition for this PO !".

 

How to do this?

 

You can use transaction SE18 to Implement it.

1.Go to transaction SE18.

1.jpg

2.Press 'Display'.

 

3.From the menu Implementation->Create

1.jpg

 

4.Give your implemenation name as below(starts with Z..) Here I have given as  zme_process_po_cust.

1.jpg

5.Then give implementation  short text as you like.

 

6. Then click 'Interface ' tab and select   method 'PROCESS ITEM' (BY DOUBLE CLICKING)

1.jpg

 

 

7.In this method,please add the following coding.

 

 

method if_ex_me_process_po_cust~process_item.


  include mm_messages_mac . "useful macros for message handling

 


  CALL FUNCTION 'MEPO_DOC_HEADER_GET'


    IMPORTING


      EX_EKKO = LS_MEPOHEADER.



  IF ( LS_MEPOHEADER-BSART = 'NBPJ' OR LS_MEPOHEADER-BSART = 'PJCR' ) .  "here I am checking my document type



    CALL METHOD IM_ITEM->GET_DATA


      RECEIVING


        RE_DATA = LS_MEPOITEM.



    IF LS_MEPOITEM-BANFN IS INITIAL.


     MESSAGE E025(ZQ).

   

    ENDIF.



  ENDIF.

 

 

 

endmethod.

 

 

--------------------------------------------------------------------------

How to create error message?

Here my error message  is E025 with message class ZQ.You can use transction code SE91,you can create your own message.

1.jpg

 

8.Finally 'SAVE' and  'ACTIVATE'.

 

9.Now try to create PO with your own PO document type without PR,then you will get error message and without rcreating PR,you can not complete your PO..However you can 'HOLD' your PO.

 

 

I welcome your suggestion,please.Thank you.


......Press Here to See More......


31.ZCORR_EKETEINDT_CD

     It is from note 1707638, to put a given date into scheduling dates that are initial and need

   to be corrected.

32.Z_A016_KONH_EVRTN

     It is contained in note 1102280, and in order to correct the inconsistencies in table A016.

33.ZZ_CORR_MATCAT

     It is in note 1839366, to reset several fields in table EKPO which contains unexpected value

     when publishing a contract with a material group line item (item category W/8) from SAP Sourcing.

34.Z_MM_QUANTITY_CHECK

     You can use this report from note 1370784 to detect inconsistency when an inbound delivery

     is displayed in transaction MD04 despite goods receipt, or goods receipts are assigned incorrectly.

35.ZZGRREDI

     It is from note 164004, and subjects the relevant items to a GR reassignment over the schedule

     line quantities.

36.ZCREEKUB

     You can find it in note 369732 and use it to generate the missing entries in index table EKUB again.

37.ZZMRPAREA

     You can run it from note 383042, to update the change in the SA when there are changes in the

     material master assignment of MRP areas.

38.ZKORR_EKEK_LWEMG

     You can run it from note 1059195 to solve the termination DYNPRO_FIELD_CONVERSION "FLAB_

     HEAD-LWEMG" When you display or change the scheduling agreement release (SAR).

39.Z_KORR_RSDB_PUR

     This is from note 953281 and used to correct the entries for purchase orders which are missing from

     table RSDB or for deleted purchase orders or enquiries.

40.Z_SET_ELIKZ2

     You can use it from note 160525 to set EKPO-ELIKZ for PO so that "Issued quantity", "Goods receipt

     quantity" and "Quantity delivered (stock transfer)" are the same.

41.ZKOREKKI, ZZEKKI01 and ZKOREKKI2

     It is from note 304671, 92083 and 444557, to find the items which lead to update termination on table

     EKKI. Then the unnecessary entries in table EKKI are deleted from the database using test = ''.

42.ZCORRECTBEDAT1

     It is from note 951328, to fill EKET-BEDAT fields which are missing from purchase orders.

43.ZKOGLMNG, ZKOWEMNG, ZKOMENGE, ZKORWEM2, ZKOWAMNG, ZKORWEMN3,

     ZKORWEMN4 and ZZ_CORR_EKET_WEMNG_WAMNG_GLMNG

    They are from note 100690, to correct inconsistencies with EKET-GLMNG, EKET-WAMNG, and

    EKET-WEMNG.

44.ZEKPO_UMREZ_UMREN_EQ_0

     It is contained in note 339267, to correct the redetermination of the conversion factors (EKPO-UMREZ

     and EKPO-UMREN) between the base unit of measure (EKPO-LMEIN) and the order unit (EKPO-

     MEINS).

45.ZELIMDBS

     You can find it in note 104475, to subsequently set the "delivery completed" indicator in purchase

     order that have already been fully delivered, in order to prevent performance problems during ATP check

     or running MD04.

46.ZKOEKB1

     You can find it in note 167242. It shows you which records of the purchase order history are linked

     incorrectly, and corrects the purchase order history.

47.ZKORVETV and ZZ_CLEANUP_VETVG

     You can find them in note 61148, to set up or delete the table VETVG (Delivery Due Intex) for an

     individual purchase order.

48.ZDELESDUS

     It is from note 197012, to delete the entire settings of a user to solve termination TSV_TNEW_PAGE_

     ALLOC_FAILED in ME21N.

49.Z_RSDBS

     It is from note 670262, to insert in RSDBS all missing entries for a selected network.

50.ZCORREKAB2

     It is contained in note 864839, to clean up the EKAB table and solve the update termination because

     of a duplicate table entry in the EKAB table.

51.ZKSTAPO1

     You can run it from note 527995, to correct existing purchase orders that haven't indicator EKPO-

     STAPO set, although the deletion indicator is set.

52.RM06HL04

     You can find it in note 171331, when the quantity ordered in PR is not correspond to the quantity of

     the purchase order to which it belongs.

53.ZCORLOGS

     It is from note 769394, to change the logical system in the "old" source list records after you transfer

     the source list maintenance into a central system.

54.ZCOREINA and ZDLEINAE

     You can find them in note 836917, when there are info records with different info record numbers but

     with the same material number etc.

55.ZCORR_EINA_URZDT

     You can find it in note 451114, to set the initial value of EINA-URZDT to '00000000', if the value is ' '.

56.ZKORR_EINE_INITIAL

     This is contained in note 359469, to initialize some EINE fields with the help of SAP development

     support.

57.ZKOREINA

     It is from note 208976, and to archive the purchasing organization data/plant data (EINE).
58.ZZ_COMPLETE_ASN, ZZ_CORR_EKES_DABMG and ZZ_CORR_EKES_EKBE

     They are from note 636853, to do correction of MRP relevance of inbound deliveries.

59.ZKOEKBEPO

     You can find it in Note 431145, to reestablish consistency between the purchase order history (table

     EKBE) and the replenishment delivery.

60.ZCREA_EKBE_2

     You can use if from note 433505, to reinsert the missing EKBE records.


 


****************************************************************************
I would suggest you

 

 

-Read the corresponding SAP note carefully before running the report, pay attention to any

special statement in the note.

-Run the report in Test mode firstly if possible, and check the result before running it in Update mode.

-Run the report in non-production system firstly.

In this blog, I will summarize the useful reports in MM-PUR area. I would suggest you

 

-Read the corresponding SAP note carefully before running the report, pay attention to any
  special statement in the note.
-Run the report in Test mode firstly if possible, and check the result before running it in Update mode.
-Run the report in non-production system firstly.

 


1. RSVARIDVARIS
    It is described in Note 175178, to load the standard variant SAP&STANDARD delivered by SAP.
    This report has to be run in client 000 since the SAP standard variants only exist in this client.
2. ZCORRDABMG
    It is introduced by Note 202875, to create one batch input folder for purchase orders and one for
    delivery schedules. It analyzes the documents selected and only puts the FAULTY documents
    into the batch input folders.

3. RM06ME59
    It allows the user to enter a certain purchase requisition or to enter a range of purchase requisitions
    to be checked with it/they cannot be converted to PO due to error ME261 in ME59(N).
    This report is introduced by Note 786303.
4. ZCORADDR
    You can find this report in Note 91001, it is to remove the address number from the document item
    when termination message AM010 shows for delivery address error.
5. ZCHECKPO
    It carries out several checks for a certain interval or an interval from purchase orders or scheduling
    agreements, when user cannot post goods receipt for them due to error M7064.
    You can find it in Note 886735.
6. ROPS_SE_PUR_SELECT_MESSAGES
    It is contained in ERP 6.0 Enhancement Package 4. It provides additional selection parameters to
    search messages based on PR number, PO number and (SRM) Central Contract Number.

7. Z_UPD_EKKO
    It is from note 821981, after running it, the Purchasing Document address and Vendor address
    linkage is removed.
8. ZCORR_EKAB_LOEKZ
    It is from note 451605, to set the Deletion Indicator (EKAB-LOEKZ) value to 'L', if the value is 'X'.
9. ZKORR_EKAB_INITIAL

    It is from Note 422589, to set the deletion indicator in Table EKAB, if a document does not exist

    in EKKO.
10.ZCOR_FPLA_FPLT

     It is attached to note 1025024, to correct the inconsistency of the tables FPLA and FPLT for the   
     old data.

11.Z_BUSINESS_OBJECT_CHANGE
     You can find it in note 304541, it is to adjust Customizing and to change existing links with the  
     EKKO business object to BUS2012 (purchase orders) and BUS2010 (requests for quotation).

12.ZHIGETENS and ZCORETENS

     They are introduced by note 407371, for the reorganization of the ETENS numbers.

13.ZCORREKESGRRTV

     It is from note 536190, and it corrects the MRP reduced quantities (EKES-DABMG) of confirmations

     with GR assignment and the MRP reduced quantities of the corresponding schedule lines.

14.ZCORR_EKESMENGE

     It is from note 521164, to set field EKES-MENGE to the same value as EKES-DABMG with the

     result that the shipping notification is no longer displayed in the requirements and stock management.

15.ZDELEKES and ZDELEKES2

    They are introduced by note 544896. You can use them when the inbound delivery exists but

    individual delivery items do not exist, or when the inbound delivery was archived but entries

    still exist in the purchase order history (table EKBE),

16.ZZMMPUR_CREATE_EKES

     This is contained in note 1725906, to recreate the missing link in the Purchase order based on

     inbound delivery documents.

17.ZDIME23N

     They are from note 423416. In the error long text of the respective error message in workflow, you

     can replace the call of transaction ME22 by the call of report ZDIME23N (as of Release 4.6), 

18.Z_EKBEAUFL

     It is contained in note 574494, to explode a large number of aggregated purchase order histories.

19.ZZCCM_RESET_UEBTK

     You can find it in note 1508153. It is to be used when central contracts are distributed from SAP

     SRM to SAP ECC but delivery tolerances are not adopted from Material Master.

20.ZZ_CHECK_EBAN_CUOBJ_LOST and ZZ_CHECK_EKPO_CUOBJ_LOST

     They are contained in note 703450, they read all purchase documents which contain a reference

     to a configuration. If the configuration no longer exists, the reference will be deleted.

21.ZZLOEKZ_RESET

     You can find it in note 1618369, for resetting the deletion indicator on header level of schedule

     agreement or contract.

22.ZKORKONV

     This is from note 205723, to display the incorrect conditions when there are inconsistencies between

     database table EKPO and KONV.

23.ZCHECK_EBAN

     You can find it in note 456261, when you got error message VD346 in any transactions like ME21N.

24.ZZ_OM_CLOSEORDER

     It is from note 1570035, to set the CO Production order to completed so that the follow on documents

     can be archived.

25.RM06C020

     It is from note 115899, to identify and correct inconsistencies for dependent requirements for

     subcontracting purchase order proposals. You can only use this report when the inconsistencies

     can be traced back to errors that are already known.

26.Z_CCOMP_SET

     You can find it in note 892748. After upgrading to Rel 4.7 or higher, old cross company STOs need  
     to be adapted to correct "Posting Logic in the Case of Stock Transfers" at the item level.

27.ZSIT_DELETE_WEBRE

     It is contained in note 1899151, to deletes the "GR-Based Invoice Verification" indicator for the

     affected purchasing document item.

28.ZDELTEXT

     It is contained in note 496577, in order to delete the incorrect text which is stored in database without

     a document number.

29.ZCOR_ELBK_ELBP

     You can run it from note 941299, when you got error WY 017 or WY 026 in ME65.

30.ZKORR_EKKO_DCM

     You can find it in note 702205 in order to determine and correct incorrect purchase orders and RFQ,

     when runtime error SAPSQL_ARRAY_INSERT_DUPREC happens.


......To Be Continued...

The Trouble Shooting Guide(TSG) wiki page of Inconsistency in Inventory Management contains information that enables you to cope with different kinds of inconsistencies in inventory management. As many of these inconsistencies are not real database level inconsistencies,  this TSG wiki page intends to provide fundamentals of most common inconsistency cases in inventory management. With this information you should be enabled to

  • Detect the inconsistencies
  • Understand the reason why inconsistency happens
  • Resolve the inconsistencies by yourself

 

The TSG wiki page is available in link below, and you can navigate it using error message i.e. M7314 or M7308:

http://wiki.scn.sap.com/wiki/display/ERPSCM/Inconsistency+in+Material+Management+-+Inventory+Management

 

It also provides the list of hot news note which you need to apply in the system to avoid future inconsistencies.

 

Check out the link for more details, and please don't hesitate to let us know if you have any suggestion.

 

Best regards,
Polly

During a purchasing document creation or a goods movement posting, you may can face some performance issue like any kind of short dump or it may can take long time to execute a transaction. Generally, a performance issue can occur because of a huge data. Sometime system can't able to read information from table and execute a dump message. That's because may company prefer the archiving process after some time (even some year). There can be many more different reasons when a performance issue occurs. Normally a performance issue can be resolve by archiving process, but many of cases, you need to do some program correction with the help of some OSS note(s). You can also improve performance by creating index with correspond table. Such as, you have performance issue regarding the table EBAN, then create a database index from transaction SE11 on table EBAN as per your requirement, then save and activate the index, then run your transaction, you can see the performance improvement.

In general, when you create a purchasing document, system checks many function which may not need for you but to avoid any kind of inconsistent, system will check and generate all information into all related tables. Some functions are most important which should be executed when you create a purchasing document like as Price determination, create or update purchase info records, release procedure, partner determination, text determination etc etc. This information should be executed when you will create a purchasing document according to your requirement and IMG configuration. If you read the OSS note 188837 - Purchase order generation performance , you can find how many functions are executed during a purchase order creation. This OSS note has given the information how you can optimize or control these all functions during creation of purchase order. However, it could not be possible to delete some functions which are required as per your business process. Read the OSS note and deactivate the listed functions as per your requirement and be sure that you do not need this function to be executed during purchase order creation. Please read this KBA document 1942976 - Performance issue when using transactions ME21N, ME22N, ME23N , here you can find some more options to avoid the performance issue during purchase order transactions. System can perform a slow performance while creating a account assigned document or even a service document (like service purchase order, service contract, service requisition etc.). It is because of the extra table EKKN, system need to reread the table EKKN for account assignment document, that's because system can take long time to read data from table.

During a goods movement (like as goods receipt, goods issue, transfer posting), system can take long time to execute. For a general performance issue (or even a runtime error) during goods receipt, use the OSS note 1738158 - Long runtime for goods receipt for purchase order. There can be different different reason as per the transaction. Like when you will post a goods receipt, system can take long time due to the purchase order or schedule agreement's line item, while you post a goods receipt for many item for purchase order or many purchase order into one goods receipt. System will take long time to fetch data from various purchasing tables (like EKPO, EKKN). You can improve the performance by splitting this into multiple. Slow performance can occur when you will use the price determination process during goods receipt. System will try to fetch many records from various tables for the price determination process during goods receipt. Another reason for slow performance during goods receipt of purchase order or goods issue for a stock transport order is unnecessary copy data for group condition (from GKOMV to TKOMV). Transaction code ST12 has been developed by SAP to trace the performance issue and any kind of ABAP dump.


Let me explain some issues with details explanation (with view from OSS notes), why a performance issue occurs during various purchasing transaction execution or goods movement and how you can improve performance while executing a transaction.


When you set a deletion flag or archiving process for purchasing document, you may face performance issue. The performance issue may can raise at the time accessing table EKKN or EBAN (according to document). The OSS note  1411343 - Setting the deletion flag: Performance problems says there could be performance issue occurs after implementing the OSS note 418988, and if there are no reference of purchasing document, system will try to access all records from table EKKN or EKBN. However, this OSS note 1411343 has given a modification to avoid the same. Read the OSS note accordingly, additionally read the OSS note 673290 - Setting the deletion flag: Performance problems also.

A large number purchase item or purchase order history item can also causes of performance issue. When you call a transaction (like ME2* reports, transaction MIGO, MB01, MIRO, MIR7, MRRL etc) which is fetching data from purchase order item (EKKO) or purchase order history item (EKBE), system can return you a dump message or can take a long time during execution of these t-codes. To improve performance you can use the aggregation facility for purchase order history by using the transaction ME87, which can remove (reversibly) old data from your purchase order history. Read the OSS note for more details 311089 - Performance problems because of long PO history and 574494 - Explosion the aggregated purchase order history via report . However, there are some cautions for the aggregation feature. The caution can be found on the OSS note 311089. This aggregation can remove your purchase order history which are old more than two months (however it is possible to change the period according to the OSS note  756293 - ME87 Aggregation duration purchase order history).

During creation of purchase order from transaction ME57, you may can face performance issue. System read the table EBAN, to fetch information during execution of the transaction ME57. Because of a huge data on EBAN table, system can take long time (or even fail to execute with dump) to create a purchase order. The solution is provided in this KBA  2108907, that you should archive the all old requisition along with give some selection parameter in ME57. Read the KBA document for more information.

You have some issue regarding purchase requisition creation, some performance issue can occur after implement the OSS note 1836886. SAP has given another OSS note to improve the performance after implemented the OSS note. You can find more information in this OSS note 1910134 - Performance Improvement in Purchase Requisition (note: this OSS note is only relevant for Brazil localization).

Some performance issue can occur when you will go for release a purchase requisition from transaction code ME54N, SAP has given an OSS note for a program correction 1377556 - Performance issue during release of PR-ME54N

When you will go for purchase requisition list from ME5A, system can take long time to execute or even can fail to show result. Performance issue can occur also after giving some selection field(s). As per the report logic, system is fetching data from EBAN, during the data fetching, system can take long time to execute. You can implement OSS note 942106 - Performance of ME5A: List display of purchase requisitions to improve the performance. Also by indexing the table EBAN, you can reduce the performance issue, read the KBA document for performance issue during ME5A transaction 2111467 - Performance issues in ME5A

At the time of mass maintenance of purchase requisition from transaction code MEMASSRQ, you can have some performance issue. Its because of as per the logic of mass maintenance, system will call the record twice for a document while it should be called only once per document, this can causes of the performance issue. You can implement the OSS note 1448621 - Performance problems when changing PReqs (transaction MASS) to avoid the performance issue during the mass maintenance transaction.

You may can face some performance issue at the time of converting purchase order from a service purchase requisition. There is an OSS note 1658177 - Performance: Creation of purchase orders , by implementing the OSS note, you can reduce the performance issue.

At the time of using BAPI for purchase order create or change, you can face some performance issue. The reason of this performance issue can be long text. As per the OSS note 917290 - Performance: Long texts in EnjoySAP order BAPI , system can take long time to process the text during execution of BAPI. Read the OSS note for more details and implement the correction to avoid the performance issue. Also please have a look into the OSS note 1355577 - BAPI_PO_CREATE1: Runtime problems when calling RTTS, it also explains about the performance issue regarding the bapi BAPI_PO_CREATE1 or BAPI_PO_CHANGE

There can be poor performance during creating or changing a contract or a schedule agreement via BAPI. With release 600, 602 and 603, SAP has found program error which can causes of the poor performance. By implementing the OSS note 1475971 - BAPI: Performance for contract and scheduling agreements , you can improve the performance for this selected EHP release. Not only performance issue, you can read the OSS note for some additional issue during calling BAPI_CONTRACT_CHANGE and BAPI_SAG_CHANGE.

System can take huge memory during running BAPI_PR_CREATE or BAPI_PR_CHANGE, this can cause of slow performance. This performance can occur for a program coding. You can use this OSS note 1571867 - Performance issue when executing Purchase Requisition BAPI , here a program correction suggested by SAP.

For a higher release (from 605), you can face performance issue during creating a request for quotation from ME41 with multiple items as text item. The causes of the slow performance can be the multiple item for one RFQ document. Either you should divide the RFQ document to multiple or you can try by applying the OSS note 2086200 - ME41: Performance optimization when using item texts to improve the performance while perform multiple line item in one document. Another reason system can take long time to execute the transaction, it is time dependent condition (specially the case of batch input). When you will use time dependent condition for many items in one document, system can take some time to find and execute the supplementary conditions with regards to the time dependent condition.

You may can face a performance issue during goods receipt against outbound delivery for a inter company stock transport order. This slow performance can occur because of a lots of line item in the purchase order (EKPO entry) or a lots of purchase order history line item (EKBE entry). You can implement this OSS note 1328939 - Performance issue when posting Goods Receipt against STO , it includes a program change, which can improve the performance during goods receipt.

Some performance issue can occur after activate SAP HANA during goods receipt from MIGO. It is for enhancement package 6.04 along with the business function LOG_MM_OM_1. In that case, use the OSS note 1729650 - HANA Performance issue when creating Goods Receipt for a program correction.

During posting or reversing a goods receipt with regards to a production order, you may can face some performance issue. This performance issue can occurs due to the volume of large order history, instead of fetching the single order history, system is trying to fetch the total record. To improve the performance issue SAP has given a feature to fetch the data record as summarized. You need to add an entry in the table CKMLMVADMIN as 'CKMO_READ_MLAUF = S'. A details explanation can be found in this OSS note 1759860 - Incorrect GR reversal for production orders and performance improvement , along with consider this OSS note 1611053 - Performance: Production Order history compression for a manual steps details for production order history compression.

For any goods movement from MIGO, system can perform slow performance. This slow performance can be occurred due to a number of storage locations are assigned to the plant. During the determination of storage location with regards to the transaction, system is copying the number of storage location into an internal table from table T001L and then reads all data from that internal table. After implement the OSS note 1016033 - MIGO: Performance improvement when reading table T001L system has changed the logic not to use the internal table, system will fetch the data directly from table T001L table. This can improve performance during goods movement in MIGO.

During posting a goods receipt from MIGO with regards to a purchase order with multiple account assignment, system can occur slow performance. The main reason of this performance issue is huge data of purchase order history item. Along with at the time of goods receipt for a multiple account assigned PO, system will run the source code of the business function LOG_MM_MAA_1 although this business function is not active. Use this OSS note 1605930 - MAA: MIGO: Poor performance as a source code correction.


At last, there can be some performance issue due to your own custom development / enhancement. Due to poor coding from an ABAPer, you system can issue short dump or even take a long time to execute the function. In that case, you need to consult with your abaper to improve the quality of coding. By using a Badi or user exit, system can take long time to execute the function.


In above, I have given some example of OSS notes with brief explanation about the performance issue. There are many more OSS notes are given in service market place for any kind of performance issue. Most of all performance issues will get improved by implementing correspond OSS note. So, whenever you will face any kind of performance issue, first search in service market place for some OSS notes.

Hello Folks,

 

From time to time I see customers raising incidents regarding error SE508 when trying to create a Service Entry Sheet based on some PO.

 

Last year I wrote KBA 1680030 explaining how to fix the problem and I realized that some times the solution proposed in the KBA does not work.

 

I have updated the KBA with another solution that should cover the cases where the previous proposal would not help, so in case you face this error just check how to fix it in the KBA.

 

Cheers,

Eduardo Junior

SAP Active Global Support - ERP MM

Hi,I would like to share with you one of Procurement Scenario which involved replacing of Purchase Order by Scheduling agreements.

 

Business Scenario : Business involved in manufacturing standard products,raw material required for producing these product are on continuous basis,each raw material is having fixed vendor.requirement for standard products generated base on re-order level planning.requirement generate for raw materials generate in system after MRP run.purchase order is created for open purchase requisition and sent to vendors.vendors delivering goods as per communication with buyers.every new Purchase requisition generated later included in old PO with new line item,message sent to fix vendor through telecommunication,on receipt of material at shop,goods receipt not possible at stores because of reasons like PO was not created,PO was not released this result in delay in goods receipt at stored in system.due to urgency at production line goods issue to shop without entry in system.later this result in mismatch of inventory etc.

 

Major Issues :

1.Component not available for production on time.

2.Continuous amendments in same PO frequently,this affect vendor evaluation process

3.PO approval required frequently due changes in PO,Buyer has to do follow up with Purchasing Manager for PO release.

4.Delay in PO release result in delay to communication to vendors and delay in Material delivery.

5.Vendors not having formal document with right quantity,for future planning.

 

Solution :

To Overcome such issues scheduling agreement are use as replacement of purchase orders for standard components which are required frequently.

steps follows in process:

1.Scheduling agreements created with validity period of 6 months with maximum possible quantity for all vendors.(ME31L)

SA-H.PNG

2.All Open PO for vendors identified and closed.(TCODE-MEMASSPO)

PO Mass Change.PNG

3.All Scheduling agreements released by Purchasing Manager ( TCODE-ME35 )

SA Release.PNG

4.Source list created for components with Scheduling agreement and MRP usage 2 ( Record relevant to MRP. Sched. lines generated automatically )

SL.PNG

5.After MRP run,system generate schedule lines for requirements.

6.To avoid over-written of schedule line orders trade-off-zone updated with more than Planned delivery time.(TCODE-ME32L )

SA item.PNG

5.These schedule are email to vendors.

6.Vendors deliver goods as per delivery dates.stores takes goods receipt against SA for open schedule line quantity.

7.Invoice receipt will be done against SA for GR Quantity.

 

Benefits:

1.Reduction in vendor follow-up time of buyers.

2.Saving of buyer time which was spent for amendment of POs.

3.No follow up for order approval required,Once SA is released it will be valid for validity period mention in it.

4.Accuracy in vendor evaluation process.

5.Timely availability of components at production line.

Material document duplication is an usual issue faced by many customers when posting goods issues at SAP System. In particular, I faced this case many times.

 

In a case where you have duplicate material documents you can create and run the report ZZWASTOR of note 424414.

 

You must first check the effects of the report in a test system or with "test mode = X" if it is in production system.

 

Usually, the root cause is related to unforeseen events like:

  • Inconsistencies caused by hardware defects, user handling and customizing changes
  • Closely related time wise (seconds apart) of MM postings in conjuncture w/ ENQUEUE/DEQUEUE settings
  • Customer reports without consistent updates on the database (user exits or custom programs)
  • Manipulation on the database
  • Data quality after migration
  • Database update errors

 

The most common reason for the duplication of material document are lock issues. I mean, for example, the end-user opens a session and tries to post a goods movement, if the system is facing poor performance for the moment, the same end-user (or another one) opens a new session and post the goods movement again and then later the first movement is completed. This lock issue will allow the creation of two goods movements. It happens a lot with several customers. In case, OMJI should be set as exclusive lock to avoid new cases.

 

By the way, report ZZWASTOR will delete duplicate material documents and follow on documents.

 

If you are facing similar case, please follow the below steps for resolution:

 

  1. run report ZZWASTOR (contained in note 424414) which enables you to reverse one of the material documents. Please note as stated in this note it is best to check this report in a test environment first
  2. you might possibly get error message 'M7 310' which means that negative stock is not allowed. If so, need to be able to allow neg. stock by changing the setting in transaction OMJ1 to allow negative stocks and set messages 'M7 310' and 'M7 309' as 'no message' in transaction OMCQ
  3. so, run ZZWASTOR
  4. change OMJ1 back to not allow negative stocks and set messages 'M7 310' and 'M7 309' back to error message in transaction OMCQ
  5. if delivery appears in status in process and not complete, run RVDELSTA (note 506510) which will reset the status of the delivery.

 

 

Regarding to OMJI, waiting time '10 seconds' is usually set for 'late block' and this is correct. But keep in mind that there are advantages and disadvantages of each option. Using 'late block' duplications can happen again.

 

OMJI.png

 

EXCLUSIVE BLOCK DURING GOODS MOVEMENTS
When material master data is read for the first time during a goods movement, this indicator specifies that tables MARC (plant data) and MBEW (accounting data) are locked exclusively until the goods movement has been fully posted. Another user cannot maintain the material during this time. The disadvantage is the long period of time for which the lock is set (from the time the material master data is first read when the  goods movement is entered through to  completion of the update posting).

 

LATE BLOCK FOR GOODS MOVEMENTS
Specifies that a material:

  • is not always blocked exclusively, but only if data is actually to be saved.
  • is blocked exclusively as late as possible to keep the lock time to a minimum

 

The advantage is that several users can enter goods movements at the same time because only one shared lock is set for the material when the movement is entered. The disadvantage is that the material master record is read several times and, in the case of an outward stock movement, that the lock entries of other users on the ATP server also have to be considered. These additional accesses have a negative effect on performance.

 

The late blocking works on the material level, if the material is being updated, all in relation to that material will be blocked until the posting is complete. The block works for any type of goods movement.

 

Check the following notes for further information on this topic:

 

70865   - Material block during goods movements

322989 - Late block: Number of blocking attempts
521945 - FAQ: Material block

 

 

See additional info of note 322989.
...
Cause and prerequisites
"Late block" does not mean "No block". It is required for sending exclusive blocks. This is carried out online for a short time and then only when entering the hot phase of the update preparation so that several movements can be entered at the same time. This creates situations where a process requests this block, however the exclusive block is held by another process which is currently in update. In this case, the waiting process tries several times to request the
block by itself. When a certain number of attempts have been made, it then abandons this and generates the error message.

...


I hope this info could be useful to SCN Community!

 

Kind Regards,

Fábio Almeida - MM Support Consultant

Interacting with many different customers along last 12 years of experience, I noticed there are recurrent issues when using BAPI_GOODSMVT_CREATE to post goods receipt.

 

One example is to receive stock in transfer via BAPI by posting movement type ‘315’. Suppose here, BAPI is being called multiple times and, as a consequence, allows receiving quantity more than the stock in transfer.

 

Why does it happen?

 

Read the following Wiki documentation to get further details:

http://wiki.sdn.sap.com/wiki/display/ERPSCM/How+To+Goods+Movements+with+BAPI#HowToGoodsMovementswithBAPI-CallingtheBAPIseveraltimeswithinonerollarea

 

This document explains how to call the BAPI BAPI_GOODSMVT_CREATE several times within one roll area.

 

As stated there, when you want to post depending Goods Movements in a series like a goods receipt and then, immediately afterwards, a transfer or a new receipt and issue for the same material, you need to consider the stock is read only from the database in the case of an actual goods issue.

 

For a goods receipt, the data is read from the buffer and thereby at the time before the last posting in the same roll area. A goods receipt, for example with movement type 315, automatically posts an implicit goods issue in the stock in transfer. This situation is not taken into account in the current design. You may get an error message like ‘M7 021 - Deficit of ... stock’. To avoid this, you have to call the BAPI in a different way, as mentioned on the note 369518:

 

“Make sure that the program buffer is deleted by changing the roll area. You can accomplish this by logging off and then logging in again for the BAPI process. If the BAPI is called from an ABAP program, you can also use the command: CALL FUNCTION func DESTINATION 'NONE'.”

 

In addition, take into account the impact of ‘COMMIT WORK’ and ‘ROLLBACK’ commands. BAPI_GOODSMVT_CREATE is used to create goods movements. The ‘COMMIT WORK’ command, which triggers the actual update of the document to the database, is performed in the calling program. In the case of an error during the posting, a ‘ROLLBACK’ work should be performed in the calling program. If this is not performed the underlying object (purchase order, material etc.) referenced in the failed goods movement will remain locked until the program is finished.

 

This will cause locking problems if other user/programs try to access this object while the program is active. Take into account that the enqueue for documents is at header level, so the complete document is always locked, even when a Goods Receipt for a single line item is being performed.

 

If a ‘COMMIT WORK and WAIT’ is performed, the dialog work process waits until the update has been performed before continuing. This can negatively affect the overall runtime of the transaction/BAPI.

 

You should review the coding after the call to the BAPI_GOODSMVT_CREATE (also for other BAPI’s) in your transactions ‘Z-transactions’. It needs to be analyzed in details to see if a sufficient error handling logic (with a ‘ROLLBACK WORK’) has been implemented and how the ‘COMMIT WORK’ is triggered. Often the BAPI BAPI_TRANSACTION_COMMIT is used to perform the COMMIT, however notice if this BAPI is called with the parameter ‘WAIT = X’, then a ‘COMMIT WORK and WAIT’ is performed.

 

Note: this cannot be seen as a general recommendation for all programs, each ‘Z-transaction’ needs to be analyzed individually. For example, if the program needs to immediately perform an additional goods movement for the same stock, a ‘COMMIT WORK and WAIT’ is necessary.

 

As I mentioned, you should consider the approach described on the note 369518 to ensure that each BAPI call is done in a separate roll area then you should have no problem with buffered data being used.

 

Check also the following note:

187687 - BAPI_PO_CREATE and Commit Work

 

I hope this info can be helpful to SCN Community!

 

Kind Regards,

Fábio Almeida - MM Support Consultant

Fabio Almeida

MIGO Running Slowly

Posted by Fabio Almeida Apr 10, 2015

In my experience as MM Support Consultant, I faced many customers reporting poor performance issues in transaction MIGO when posting goods movements.

 

A common cause of poor performance in MIGO is due to a "COMMIT WORK" being sent in a user-exit, or BADI, or even custom modification. And, this is not recommendable under SAP-standard perspective.

 

For more details read note 607203 which shows an example.

 

So, we should look for BADIS and EXITS which are called during MIGO. The easiest way of checking would be by debugging mode.

 

In case, we should run the steps below:

 

  1. Navigate to MIGO
  2. Activate the debugging, input '/h' in the command
  3. Carry out the goods posting
  4. Once the debugging session is triggered, go to the menu 'Debugging' > 'Switch to classic ABAP debugger'
  5. Go to the menu 'Breakpoint' > 'Breakpoints at' > Statement
  6. Input the statement ‘COMMIT’ and confirm, then the system will stop at each ‘COMMIT WORK’, and you can click the button 'Call stack' to see in which program (BADI or user exit or modification) the commit is called

 

 

If you are not aware of debugging, you may work with an ABAP developer.

 

Usually, it points to BAdi MB_MIGO_BADI.

 

In case, you should deactivate BAdi MB_MIGO_BADI and retest your scenario in MIGO.

 

I hope this information could be useful for SCN community.

 

Kind Regards,

Fábio Almeida - MM Support Consultant

Standard Process:

 

As per standard SAP, system determines G/L account as per defined rule for the account determination. Where, we can’t use the option account modifier for some transaction event keys (like BSX, WRX) at the time goods movement (like goods receipt). As we know, account modifier or valuation modifier is an option to use different G/L account within a transaction event key. Although, you can assign a G/L account as per account modifier for the transaction event key WRX or BSX from OBYC, but system will not determine the G/L account as per your settings, system will still determine the G/L account which is assigned for blank account modifier. It is well possible to use the account modifier for some transaction event keys (like GBB, PRD) in standard SAP. But SAP has given an option for customer requirement. You can determine the G/L account by using the account modifier for the transaction key WRX via some user exit. But, it is not possible to use the account modifier for the transaction event key BSX. SAP has written it as hard code for the account modifier as blank for the transaction event key BSX. System reads the function module ‘MR_ACCOUNT_ASSIGNMENT’ for the account determination process. Here is the coding line for the transaction event key BSX:

1.jpg

The value VORGANGSSCHLUESSEL is equal to transaction event key (T030 – KTOSL) and KONTO_MODIF is equal to account modifier (T030 - KOMOK). You can find it also in the same function module:

2.jpg

So, you can’t use any account modifier for the transaction event key BSX. Also as per the business process, it should be. You should not use multiple G/L accounts for one valuation class for the stock account posting. It can create many problems during the balance sheet finalization.

Now, for the transaction key WRX, in standard, system will determine the G/L account without using the account modifier. But system has given an option to write your own coding to call the account modifier as per your defined rule. System is calling the user exit ‘EXIT_SAPLKONT_011’ to read the customer defined rule during the account determination process. Here is the customer call function:

3.jpg

You can see here, system is clearing the KONTO_MODIF and calling the customer function ‘011’, which means ‘EXIT_SAPLKONT_011’. You can double click on the call function to check the user exit name. So if we will define our own rule for the account modifier by coding in this user exit, then we can determine G/L account with regards to the account modifier as per our requirement.

 

Now let’s explain about the business requirement:


Suppose your company is using two different processes as standard and subcontracting for same material. We know that one material can have only one valuation class (without using split valuation). So, as per the standard SAP, it should get determine the same G/L account for transaction event key WRX for both standard and subcontracting process. But your organization wants it different. They want to use G/L account ZZZZ for the standard purchase order and G/L account YYYY for the subcontracting purchase order for the GR/IR clearing account (WRX).


Prerequisites:


You need to find the differences between these two PO types. I am going to use different document type for both processes. NB for the standard purchase order and ZSC for the subcontracting purchase order. As result, system will determine the G/L account ZZZZ for standard PO with document type NB and G/L account YYYY for subcontracting PO with document type ZSC. You can make some changes in your document type. Allow only the item category L for ZSC document type (for subcontracting purchase order) and do not allow the item category L for the document type NB (for standard purchase order). So that user can’t do mistake to choose document type for both processes.


Enhancement and Coding:


As explained, we need to use the user exit EXIT_SAPLKONT_011. The user exit includes the program ZXM08U18. Here, you need to take help from your ABAPer. You need to create this include program from SE38 (tell your ABAPer to do the same). Then you need to write the code accordingly:


TABLES:ekko.
IF sy-mandt = '400'.

   
SELECT SINGLE * FROM ekko
       
WHERE ebeln = i_wrxmod+0(10).
ENDIF.

   
IF ekko-bsart = 'ZSC'.
        e_konto_modif =
'JWK'.
   ENDIF.


Here, 400 is client, ZSC is document type for subcontracting purchase order and JWK is the account modifier which will be used to determine the G/L account. If you do not want to include the client, then you can remove the line item. Here, I've just defined the different account modifier for the subcontracting process, so that system will consider this account modifier (JWK) for the subcontracting process and blank account modifier for the standard process (as defined in standard program code). Activate the include program.

Now go to OBYC and enable the account modifier option from rule (note: before enable, take a backup of the all entries as because, once you change the rule, you will lose the existing entries). Now assign the G/L account as per your requirement:

4.jpg

Save the entry.


Result:


Create two purchase orders, one with document type NB and item category blank for standard purchase process, and create another purchase order with document type ZSC and item category L for subcontracting purchase process.

Post the goods receipt for the standard purchase order and check the accounting entry:

5.jpg

You can see the G/L account 150039 has been determined for the standard purchase order. Now post goods receipt for the subcontracting purchase order and check the accounting entry:

6.jpg

Here you can see the G/L account 150196 has been determined for the subcontracting purchase order.


Note: I have given an example by using the document type. If you want to do it differently (like as by using item category or any other which would be different for standard process and subcontracting process), then you can also do it by changing the coding part.

Dear community

 

Do you have queries from your business users around Inventory Management valuations for GR/IR clearing postings ?
(Posting key WRX) Have you ever looked into the details of a GR/IR clearing valuation, where you have a large PO

history with several different types of postings, goods receipts, reversals and/or account maintenance postings to
consider. If so you will be very familiar with the amount of time and manual effort that is required to clarify the
valuations in these circumstances.


Report MBEXPLAINWRX is now available in the standard system. This report can be used by your support team or
business super users to retroactively analyse GR/IR clearing valuations. A detailed explanation of how the new report
works can be found in the MM Trouble shooting Guides here: Report MBEXPLAINWRX - ERP SCM - SCN Wiki

 

The report can be used to automatically verify most WRX valuation cases, but some cases are too complex and will
still require manual analysis by your support team.


Check the documentation at the link above for more details.


Kind regards
Brian

Actions

Filter Blog

By author:
By date:
By tag: