SAP ABAP IMG Activity OALE_CONVRULEMAINT (Maintain Rules)
Hierarchy
SAP_BASIS (Software Component) SAP Basis Component
   BC-MID-ALE (Application Component) ALE Integration Technology
     SALE (Package) Application Link Enabling
IMG Activity
ID OALE_CONVRULEMAINT Maintain Rules  
Transaction Code S_ALR_87008963   (empty) 
Created on 19990209    
Customizing Attributes OALE_CONVRULEMAINT   Maintain Conversion Rules 
Customizing Activity OALE_CONVRULEMAINT   Maintain Conversion Rules 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name OALE_CONVRULEMAINTXT    


In this section, you perform the second step for the rule. The rules are determined for each field.

______________________________________________________________________________________________

Note: You can use this tool only if you are using the Web Application Server (SAP_BASIS) together with SAP application components.

______________________________________________________________________________________________

You specify how the fields of a source object are converted and mapped to a target object. This object could be a master record, a transaction data record, or an IDoc segment. The rule maintenance functions are used for various purposes. For example, you might want to define how records from a file are mapped to master data, or want to define derivation rules for transaction data. In a derivation, any missing characteristic values are added to a transaction data record. Another application is the definition of an IDoc segment mapping in which the values of the fields of a segment are changed.

Different Options for Each Object

The options have different structural properties. For example, the validity of transaction data depends on the master data. For this reason, when you maintain the rules for transaction data, you have the option of testing the values against the master data. This option is not required when you maintain rules for master data. This means that you see different options depending on which object's rules you are maintaining.

Sender and Receiver Structure

You define how fields in the sender structure are mapped to fields in a receiver structure. The receiver structure is a set of selected fields that defines an object in the SAP system. The sender structure is the layout of records for the mapped data. It describes the structure of the mapped data, byte by byte. Unlike the sender structure, the fields in a receiver structure are derived from the object that you want to update. You either enter this object yourself when you maintain the sender structure, or it is predefined for certain applications. This means that some fields do not appear, such as the client, the last user to change the object, the date of the last change, or the currency key. These fields are application-specific. You assign a variable to the receiver field. This allows you to enter the field when the data is transferred. For example, you can specify the company or company code for each file.

In this step, you define which fields in the sender structure are mapped to the fields of the receiver structure, and how.

Prerequisites

You must define the sender structure before you define the mapping rules.

Initial Screen

On this screen, you assign the mapping rules to the sender structure. Enter the name of the sender structure for which you want to define or modify the mapping rules. Choose Rules -> Maintain to see the screen Maintain Rules for <Name of Sender Structure> .

Overview

The table is split into two logical parts.

The left part shows the fields of the receiver structure, is grayed out, and cannot be changed. The receiver structure is determined from the data you specified when you defined the sender structure.

The right part shows the fields of the sender structure, and other fields for the definition of the rules.

If the sender structure of the data you want to map matches the receiver structure, then you can generate an explicit MOVE rule (choose Rules -> Create Proposal for Rule). Any fields for which no assignment could be generated are highlighted in color.

Otherwise, in the Sender Field column, you can enter the name of the sender field that you want to assign to the receiver field.

You can specify that the receiver field only gets a value if the sender field has a value defined by you. Enter the required information.

You can define more rules on a detail screen. To do this, select the line of the receiver field for which you want to define special rules.

Detail Screen

The detail screen for defining mapping rules varies according to whether the field for which you want to define a rule is filled with a characteristic or a key figure:

Characteristic fields are fields that have the role of characteristics, attributes, or classification keys in the SAP system (company code, posting date, order number, for example). From a technical perspective, these are fields with the data type C, N, D, or T, which are not usually unit keys or currency keys, and which do not have a purely technical meaning (like, for example, the client number).

Key figure fields are fields that have the role of key figures, values, or balances in the SAP system (sales, revenue, headcount, for example). From a technical perspective, these are usually fields with the data type P, which can be used for calculations.

Detail screen for maintaining rules for characteristics

You can use the following rules for characteristics:

1. Copy Sender Field
You assign the values of the sender field to the receiver field. However, you can only assign those sender fields whose type is compatible with the type of the receiver field. For example, you cannot assign a field with type C (any character string) to a field of type T (used to store times). This prevents the field from containing invalid values. You can use the Restrict Value Range function to specify that only those values specified by you in the sender field can be copied to the receiver field. You can also specify conditions for other fields in the sender structure, so that the fields are copied only if the data record contains certain values.

2. Set Constant

You assign a fixed value from the set of valid characteristic values to the receiver field. This value is then used for each mapped data record.

1. Set Variable

You assign a variable (see Create Variable below) to the receiver field. This enables you to enter the field when the data is mapped. For example, you can specify the company or company code for each file that is to be read.
You can also assign a fixed value to the variable. In this case, the mapping works in the same way as with a constant. The difference is that the constant fixed value can be used in other locations in the system, with the variable name. In this way, you can improve the consistency of data mappings.

2. Convert Sender Fields
You assign certain values of the sender field to a single value of the receiver field. To do this, you specify the sender fields from the list that you want to include in the conversion.
You can specify an offset and length if you only want to use part of the sender field.
You can also specify a conversion routine. This is executed before the conversion in the sender field value. You might need this conversion routine to fill fields with leading zeros.
Choose Conditions to display a screen where you specify which values the sender fields need to have before they are converted to a specific value of the receiver field. In the left column, specify the target values of the receiver field. In the following columns, specify the individual values or intervals for the sender fields. To enable a receiver field to contain the specified value, all sender fields must have the specified values. If you want to convert different sender fields to the same value of the receiver field, then select the line and choose the pushbutton on the right of the field. A symbol on the right of the field, or the color of the pushbutton indicates that multiple conditions exist.
You can specify complex rules in multiple lines for a receiver field value. When the rules are processed, the first suitable rule is used, however, the rules are not processed in a defined order. You can also set the initial value explicitly for a receiver field value.

3. Use General Rule
You specify a previously defined general rule that you want to use in the data mapping. You can define general rules by declaring the settings made with one of the previous options as a general rule. To do this, enter a unique technical name and a description in the field Use Rule Defined Here as General Rule. After you have saved this general rule, you can use it for other mappings.
You might, for example, always want to assign the company code 0003 to the company code 0002 when you map data. To enable this, you have created a general rule that you can reference for the Company Code characteristic. If you select this rule, the sender fields of the general rule that need to be converted are displayed.
Remember that once you have referenced a general rule, you can no longer delete it.

Business Attributes
ASAP Roadmap ID 255   Create Interfaces 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
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
IMGDUMMY D - Dummy object BD79  
History
Last changed by/on SAP  19991215 
SAP Release Created in