SAP ABAP IMG Activity _ISUISST_000022 (Define Formulas)
Hierarchy
IS-UT (Software Component) SAP Utilities/Telecommunication
   IS-U (Application Component) SAP Utilities
     EE80 (Package) IS-U: Customizing
IMG Activity
ID _ISUISST_000022 Define Formulas  
Transaction Code S_KK4_74001005   IMG Activity: _ISUISST_000022 
Created on 19990816    
Customizing Attributes _ISUISST_000022   Define Formulas 
Customizing Activity _ISUISST_000022   Define Formulas 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name _ISUISST_000022    

When updating key figures, it is often necessary to define complex update rules.

These include the definition of formulas for determining the key figures.

The definition of formulas is subject to widely differing conditions; for this reason, a flexible medium is necessary for the defining them.

The maintenance of formulas is subdivided according to application.

Activities

Choose the application for which you want to maintain formulas.

An overview of all the existing formulas for the selected application is displayed.

  1. If you want to define a new formula, enter a new number for the formula in the field Routine number.

    Note

    A specific name range is reserved for standard SAP formulas.

    For that reason, please use numbers 600 through 999 for your formulas.

  2. Enter an explanatory text for your formula.
  3. If you would like to save a long text to describe your formula, proceed as follows:
    1. Position the cursor on the formula.
    2. Select the function Long text.
    3. You branch to the SAP editor.
    4. Enter the text.
    5. Save your text.
    6. Return to the overview screen.

Create/Change

  1. To change a formula, place the cursor on the line of the respective formula.
  2. Select the function Source text.

    The system branches to the ABAP/4 editor.

    Caution

    A name is automatically predefined for the FORM routine when the formula is defined.

    You may not change this name.

  3. Now define your formula using ABAP language elements.

    To define the formula, you can use all the source fields that are valid for the event which you have selected for the respectve update rule and to which the formula is to apply.

    Note

    If you use transaction SM30 to evaluate the view V_QUTAB, the system displays an overview of the source tables permitted for each event.

  4. If you define formulas for key figures with numerical data type (type F, N, P, or X), you must assign the result of the formula calculation to the field formula_value.

    If you define formulas for characteristics or key figures with alphanumeric data type, you need to use the field formula_value_object.

    You can use the field returncode, to specify the validity of value determination via the formula.

    You should always define the return code (for example, CLEAR RETURNCODE).

    The fields formula_value, formula_value_object and returncode have already been defined in a common data range.

  5. Save the formula definition.
  6. Return to the overview screen of the formulas.

Example of the Formula Definition

For the event "Billing document", you want to determine the profit margin I.

The profit margin I is the difference between the net value of the billing document and the corresponding cost.

FORM MCV2_600.

FORMULA_VALUE = MCVBRP-NETWR - MCVBRP-WAVWR.

RETURNCODE = 0.

ENDFORM.

Activate

A formula definition can only be used in updating if it is active.

To activate a formula, proceed as follows:

  1. Position the cursor on a line.
  2. Select the function Edit -> Activate.

Delete

You can only delete a formula if it is inactive.

If you want to delete a formula, proceed as follows:

  1. Position the cursor on the line of the formula you wish to delete.
  2. Select the function Edit -> Deactivate.
  3. Select the function Edit -> Delete line.

    The formula is then deleted.

Business Attributes
ASAP Roadmap ID 207   Establish Reporting 
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 _ISUISST_000022 0 I110004884 Sales Statistics 
Maintenance Objects
Maintenance object type C   Customizing Object 
Assigned objects
Customizing Object Object Type Transaction Code Sub-object Do not Summarize Skip Subset Dialog Box Description for multiple selections
VOFM T - Individual transaction object EI1F ISU0000001 Define Formulas 
History
Last changed by/on SAP  19990816 
SAP Release Created in