SAP ABAP IMG Activity SIMG_HPM_0004 (BAdI: Dimension Conversion)
Hierarchy
BBPCRM (Software Component) BBPCRM
   CRM (Application Component) Customer Relationship Management
     CRM_APPLICATION (Package) All CRM Components Without Special Structure Packages
       OIB (Package) HPM Hydrocarbon Product Management
IMG Activity
ID SIMG_HPM_0004 BAdI: Dimension Conversion  
Transaction Code S_SO5_65000067   IMG activity: SIMG_HPM_0004 
Created on 19990913    
Customizing Attributes SIMG_HPM_0004   BAdI: Dimension Conversion 
Customizing Activity SIMG_HPM_0004   BAdI: Dimension Conversion 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name SIMG_HPM_0004    

In this IMG activity, you configure the BADI for dimension conversions.

This business add-in consists of one central method, DIMENSION_TO_DIMENSION, which replaces the following function modules of the old QCI (which was used prior to release 4.6B) and a method which allows you to implement a customer specific air buoyancy adjustment of the SI base density for a volume to mass or mass to volume conversion.

  • EXIT_SAPLOIB1_004
  • EXIT_SAPLOIB1_005
  • EXIT_SAPLOIB1_006

Recommendation

Use the coding delivered as a part of the sample code of this BAdI as a blueprint for the methods. It contains the correct structure to be used for the method. Place already existing code which you used in one of the above-mentioned exits in the correct positions in the method. Note that method DIMENSION_TO_DIMENSION uses the product type as a filter value.

Example

You have implemented a customer function in release 3.1H with the following coding in customer function EXIT_SAPLOIB1_004 (mass_to_volume): How do you transfer that coding to the new business add-in?

*----------------------------------------------------------------------*

* INCLUDE ZXOIBU04 *

*----------------------------------------------------------------------*

DATA : L_GALLON LIKE T006-MSEHI VALUE 'UGL',

L_POUND LIKE T006-MSEHI VALUE 'LB ',

L_FACTOR1 TYPE F VALUE '8.338370' ,

L_FACTOR2 TYPE F VALUE '0.0101580',

L_C_FACTOR1 TYPE F ,

L_C_FACTOR TYPE P DECIMALS 5.

* calculate with standard quantity conversion from volume to gallon

CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'

EXPORTING

INPUT = I_TRQTY

NO_TYPE_CHECK = 'X'

ROUND_SIGN = ' '

UNIT_IN = I_TRUOM

UNIT_OUT = L_POUND

IMPORTING

OUTPUT = C_TGQTY

EXCEPTIONS

CONVERSION_NOT_FOUND = 01

DIVISION_BY_ZERO = 02

INPUT_INVALID = 03

OUTPUT_INVALID = 04

OVERFLOW = 05

TYPE_INVALID = 06

UNITS_MISSING = 07

UNIT_IN_NOT_FOUND = 08

UNIT_OUT_NOT_FOUND = 09.

IF SY-SUBRC NE 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY

NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2

SY-MSGV3 SY-MSGV4

RAISING UNIT_CONVERSION_ERROR.

ENDIF.

* specific calculation based on fixed calculation parameter

* related to table 26

L_C_FACTOR1 = L_FACTOR1 * I_PA1-BDICH - L_FACTOR2 .

L_C_FACTOR = 1 / L_C_FACTOR1.

* l_c_factor = 1 / i_pa1-bdich.

C_TGQTY = C_TGQTY * L_C_FACTOR.

* calculate with standard r3 from pound to the desired mass

CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'

EXPORTING

INPUT = C_TGQTY

NO_TYPE_CHECK = 'X'

ROUND_SIGN = ' '

UNIT_IN = L_GALLON

UNIT_OUT = I_TGUOM

IMPORTING

OUTPUT = C_TGQTY

EXCEPTIONS

CONVERSION_NOT_FOUND = 01

DIVISION_BY_ZERO = 02

INPUT_INVALID = 03

OUTPUT_INVALID = 04

OVERFLOW = 05

TYPE_INVALID = 06

UNITS_MISSING = 07

UNIT_IN_NOT_FOUND = 08

UNIT_OUT_NOT_FOUND = 09.

IF SY-SUBRC NE 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY

NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2

SY-MSGV3 SY-MSGV4

RAISING UNIT_CONVERSION_ERROR.

ENDIF.

  1. Implement this BAdI.
  2. Implement the method.
  3. Copy the coding from the sample implementation into the method implementation code section.
  4. Copy the coding (above) and place it in the correct position in the case statement structure copied from the sample code. Add the coding that has "NEW 4.6B" or make the changes as indicated with "CHANGE 4.6B".

Further notes

Test the new BAdI coding and compare the results with the results from the old exits.

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 
Assigned Application Components
Documentation Object Class Documentation Object Name Current line number Application Component Application Component Name
SIMG SIMG_HPM_0004 0 I270009306 A  
SIMG SIMG_HPM_0004 1 I400000014 Production 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20070320 
SAP Release Created in