SAP ABAP IMG Activity /LIME/MASTER_DATAACT (BAdI: Read LIME Master Data)
Hierarchy
SAP_AP (Software Component) SAP Application Platform
   AP-LIM (Application Component) AP-LIM Logistics Inventory Management Engine
     /LIME/RFC_CORE (Package) Core Package of the RFC Interface
IMG Activity
ID /LIME/MASTER_DATAACT BAdI: Read LIME Master Data  
Transaction Code /LIME/86000094   (empty) 
Created on 20021030    
Customizing Attributes /LIME/MASTER_DATAATT   BAdI: Read LIME Master Data 
Customizing Activity /LIME/MASTER_DATAOBJ   BAdI: Read LIME Master Data 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name /LIME/MASTER_DATA    

Use

This Business Add-In (BAdI) is used in component SCM-ECT-LIM.

The Business Add-In /LIME/MASTER_DATA enables you to:

  • Determine the conversion type /LIME/QCI_TYPE for a movement: Type of quantity calculation
  • Compile a list of allowed units of measure for a stock posting and notify the system of it
  • Read master data to check postings (creation, changing, and deletion of stocks, locations, and HUs) in the system and carry out this check during the relevant activities

For each goods movement in the system, a conversion type /LIME/QCI_TYPE is necessary for each item. You can define the allowed conversion types in Customizing. The conversion type is the filter value for the Business Add-In /LIME/QCI and controls the product-dependent or product-location-dependent type of quantity calculation that may be necessary. SAP supplies two entries for these conversion types: DOC and MARM. The determination of these conversion types is implemented as an example in a default implementation supplied by SAP with this BAdI. The service class /LIME/CL_SRV_MASTER_DATA is supplied for this purpose. If you create your own implementation that overwrites the default implementation, we recommend creating your own service class derived from this service class.

As a rule, the default implementation of this BAdI sets the type of quantity conversion to the type DOC. The type MARM is set if a posting with SAP R/3 materials is involved and the master data is to be read from an SAP R/3 system and the stock index tables with the index number 001 (location plant + storage location) or 002 (location plant) are affected. These tables are supplied by SAP.

Type of quantity calculation: DOC

For this conversion type, there is generally no further master data access and no quantity conversion. The list of allowed units of measure is compiled from the list of the document units of measure.

Example:

  1. You post a goods movement (goods receipt) for a material A with 1000 kg. In this case, the list of allowed units of measure will contain just one unit of measure, namely the unit kg. This unit is flagged as inventory-managed. The stock figure for the material increases by 1000 kg following successful posting.
  2. You post a goods movement for a material B with 1000 kg and 22 pc. The list of allowed units of measure will now contain both units, namely the units kg and pc. Both units are flagged as inventory-managed. The stock figure for the material increases by 1000 kg and 22 pc following successful posting (parallel inventory management).

As a general rule, no units of measure are flagged as valuation-relevant for the type of quantity calculation DOC. The service class /LIME/CL_SRV_MASTER_DATA contains a method CHANGE_DOC_UNIT_FLAGS which can be redefined in the event that a customer service class is derived for a customer-specific implementation of this BAdI to define units as valuation-relevant.

Type of quantity calculation: MARM

The type MARM is set as explained above if a posting with SAP R/3 materials is involved and the master data is to be read from an SAP R/3 system, and the stock index tables with index number 001 or 002 are affected. The master data access is effected via the MDL (master data layer) and the relevant functions of this component. If an SAP R/3 system holds the master data, the list of allowed quantity units is compiled via the access from the tables MARA and MARM and the QCI-TYPE is set to MARM. The base unit of measure is then the only unit that is relevant with regard to both the stock update and valuation in subsequent systems.

Example:

  1. You post a goods movement for a material A with 1000 kg. The accessing of the master data in an SAP R/3 system is successful and determines L (liter), kg, and pc as allowed units of measure. The base unit of measure is kg. The stock figure is increased by 1000 kg following successful posting. There is no conversion into the quantities L and pc, since these are allowed for a goods movement but need not be known.
  2. You post a goods movement for a material A with 1000 pc. The accessing of the master data in an SAP R/3 system is successful and determines L (liter), kg, and pc as allowed units of measure. The base unit of measure is kg. This makes it necessary to calculate the quantity in the base unit kg. For this purpose, the default implementation of the Business Add-In /LIME/QCI is run through. The stock figure is increased by 200 kg following successful posting (assumption: 5 pc = 1 kg). Just one quantity conversion takes place: from the quanity in pc into the quantity in kg. The quantity in L is not calculated, since the quantity in this unit, although basically allowed for a goods movement, is not necessary for the further process steps.

Master data check

The Business Add-In /LIME/MASTER_DATA makes available a series of callback methods, which can be called during the processing of a LIME document. The methods enable you to carry out additional master data checks and add further information.

  • ON_CREATE_*
    The methods are called whenever a location, an HU, or a stock item is created. You have the opportunity to change the attributes of the object and can assign a GUID for the object to be created.
  • ON_CHANGE_*
    The methods are called if the attributes of an object are changed.
  • ON_DELETE_*
    The methods are called when a LIME object is deleted.
  • ON_POST_GM
    In the method, you have the opportunity to carry out further master data checks and terminate the posting if necessary.

SAP does not supply a default implementation for the callback methods.

Requirements

Standard settings

In the standard system supplied, the above-mentioned default implementation is run through.

Activities

To activate the Business Add-In, you must create an active implementation. To do so, go to Customizing and choose the relevant IMG activity under Business Add-Ins (BAdIs).

After you call the IMG activity, the system displays a dialog box where you enter a name for the implementation.

If implementations of this Business Add-In have already been created, the system displays them in a dialog box. You then choose one of them by choosing Create, and continue as follows:

  1. In the dialog box, enter a name for the implementation of the Add-In and choose Create.
    The system displays the initial screen for creating Business Add-In implementations.
  2. On this screen, enter a short description for your implementation in the Implementation Short Text field.
  3. If you choose the Interface tab, you will notice that the system has populated the Name of the Implementing Class field automatically, by assigning a class name based on the name of your implementation.
  4. Save your entries and assign the Add-In to a package.
  5. To edit a method, double-click its name.
  6. Enter your implementation code between the method <Interface Name>~<Name of Method>. and endmethod. statements.
  7. Save and activate your code. Navigate back to the Change Implementation screen.
    Note: You can also create an implementation for an Add-In and not activate it until later. If you want to do this, do not perform the following step:
  8. Choose Activate.
    When the application program is executed, the code you created is run through.

For more information, see the SAP Library under SAP Web Application Server -> ABAP Workbench (BC-DWB) -> Changing the SAP Standard (BC) -> Business Add-Ins -> Implementing Business Add-Ins.

Example

In addition to the already-mentioned default implementation, there is an example implementation for the callback methods.

See also

You can also call the documentation for a BAdI method from the menu:

  1. Select tab page Interface.
  2. Double-click on the corresponding method.
  3. Click the right-hand mouse button and choose Documentation on Component.

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 1   Critical 
Country-Dependency A   Valid for all countries 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20030205 
SAP Release Created in 401