SAP ABAP IMG Activity ME_DEFINE_CALCTYPE (BAdI: Control of Pricing Type: Additional Fields)
Hierarchy
BBPCRM (Software Component) BBPCRM
   SRM-EBP (Application Component) Enterprise Buyer
     BBP_APPLICATION (Package) Structure Package EBP
       ME (Package) Application development R/3 Purchasing
IMG Activity
ID ME_DEFINE_CALCTYPE BAdI: Control of Pricing Type: Additional Fields  
Transaction Code S_AL0_96000868   (empty) 
Created on 20020208    
Customizing Attributes ME_DEFINE_CALCTYPE   BAdI: Control of Pricing Type: Additional Fields 
Customizing Activity ME_DEFINE_CALCTYPE   BAdI: Control of Pricing Type: Additional Fields 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name ME_DEFINE_CALCTYPE    

Use

Application components MM-PUR-PO-GUI, MM-PUR-GF-PR, MM-PUR-GF-TAX

Function group: MEPO

The Business Add-In (BAdI) ME_DEFINE_CALCTYPE provides you with additional options for controlling the price determination process when creating or changing a purchase order (transactions ME21N, ME22N).

When a purchase order is created or changed, the system carries out a price determination process at various points in the process. The type of price determination (pricing type) depends on the relevant status of the ordering transactions. The following types are possible (among others):

  • Pricing type B ("Carry out new pricing"): Always invoked when you create a new PO item, for example.
  • Pricing type C ("Copy manual pricing elements and redetermine the others"): Invoked when you change data that can influence the price determination process at item level, for example (e.g. when you change the account assignment category).

Using the BAdI ME_DEFINE_CALCTYPE, you can define the conditions for triggering a price determination process that differ from those of the standard system. Furthermore, you can specify the pricing type in this case. This is of interest, above all, when you determine prices via conditions and, in the process, make use of fields that are not taken into account in the condition tables supplied.

If you reference the Incoterms (EKKO-INCO1) in a condition table, for example, it makes sense to trigger a new price determination process if this value changes. In the standard system this is not the case. This BAdI enables you to intervene at this point.

If - as in this example - you wish to trigger a new price determination process depending on a change in the header data, you must also use the BAdI ME_CHECK_ALL_ITEMS. A new price determination is only possible if the items are reprocessed. In the standard system, this is not the case with all changes made to the header data. The example implementations for the BAdIs ME_DEFINE_CALCTYPE and ME_CHECK_ALL_ITEMS are adjusted to each other.

Requirements

You can only use the functionality of the BAdI ME_DEFINE_CALCTYPE in the "new" purchase order transaction ME21N. In the "old" PO transaction ME21, the code is not utilized.

Standard settings

  • In the standard system the BAdI ME_DEFINE_CALCTYPE is not active (not implemented).
  • The BAdI is not filter-dependent.
  • The BAdI cannot be used multiple times.

Activities

To activate the Business Add-In, you must create an active implementation. To do this, choose the following path in the SAP Menu: Tools -> ABAP Workbench -> Utilities -> Business Add-Ins -> Implementation

For more information about this procedure, see the SAP Library under

  • Basis Components -> ABAP Workbench -> Changing the SAP Standard -> Business Add-Ins -> Implementing Business Add-Ins.

Example

In example implementation for BAdI ME_DEFINE_CALCTYPE supplied, the following system behavior is defined:

  • First a check is made as to whether the system previously specified a price determination (pricing) process of type B. In this case, you should on no account intervene with your own code, since the regular system behavior should not be interfered with.
  • If the check is negative, a new price determination process is triggered with pricing type C depending on a change in the Incoterms.

Since the Incoterms belong to the header data, you must ensure that the item is processed again with the BAdI ME_CHECK_ALL_ITEMS if the Incoterms are changed.

The following data is available to control a new price determination process with the BAdI:

  • Purchasing document header (EKKO) - old and new status
  • Purchasing document item (EKPO) - old and new status
  • Fields of transfer structure BEKPO - old and new status

Further notes

Documentation for BAdI method DEFINE_CALCTYPE.

Documentation for Business Add-In ME_CHECK_ALL_ITEMS.

Business Attributes
ASAP Roadmap ID 153   Design enhancements 
Mandatory / Optional 3   Nonrequired activity 
Critical / Non-Critical 1   Critical 
Country-Dependency A   Valid for all countries 
Assigned Application Components
Documentation Object Class Documentation Object Name Current line number Application Component Application Component Name
SIMG ME_DEFINE_CALCTYPE 0 HLA0006041 Purchase Orders 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20050718 
SAP Release Created in 470