Creating a Substitution

  1. In Customizing for Special Purpose Ledger , choose the activity Maintain Substitution. For more information about creating substitutions, see the Implementation Guide (IMG) under Start of the navigation path Tools Next navigation step Maintain Validation/Substitution/Rules Next navigation step Maintain Substitution End of the navigation path .

  2. The Change Substitution: Overview screen appears. In the Control area on the left, expand the node for the required application area. You can then expand the node for your required callup point.

    This node contains both the substitution and the rule list that have been created for this application area and callup point. You can also process the rules from here (create/change/display/delete).

  3. Choose Start of the navigation path Substitution Next navigation step Create End of the navigation path .

  4. The Create Substitution: New Substitution (Header data) screen appears.

  5. Enter the following data:

– Substitution name

– Substitution description

You can also enter an authorization group to limit the number of users that can process this substitution.

To accept these entries, press Enter .

If you want to create a substitution by copying an already existing one, choose the corresponding callup point in Control and mark the substitution you want to use as a reference. Wait until both screen areas of the system are ready for entry, and then choose Start of the navigation path Substitution Next navigation step Copy End of the navigation path . Enter data as described in Step 3 above.

The substitution must have the same Boolean class as the substitution you are creating.

Note Note

If you are creating a matrix substitution, allowing you to validate data for an entire document, you use callup point code 0003 in Financial Accounting (FI), Legal Consolidation (FI-LC), and Consolidation (EC-CS). If you want to create a matrix substitution in the FI application component for callup point 0003, use the SAP note no. 42615 (this function is not included in the standard delivery).

End of the note.

The following table shows example entries for application area/callup point combinations.

Application area

Callup point

Description

CO

0001

Document line item

GL

0001

0002

Document header

Document line item

FI

0001

0002

0003

0005

Document header

Document line item

Total document

Cost of sales accounting

  1. Press Enter .

The Create Substitution: <Substitution Name> (Header data) screen appears.

  1. You can use the following additional functions in this screen:

Additional Processing Functions Create Substitution: <Substitution Name> (Header data) Screen Screen

Choose

Function

Start of the navigation path Substitution Next navigation step Create End of the navigation path

Create a substitution

Start of the navigation path Substitution Next navigation step Select End of the navigation path

Select substitution: The system expands the corresponding node down to the selected substitution automatically. A confirmation prompt gives you the opportunity to change your selection.

Start of the navigation path Substitution Next navigation step Copy End of the navigation path

The system creates a new substitution by copying the substitution currently marked.

Start of the navigation path Substitution Next navigation step Change End of the navigation path

Switch to change mode

Start of the navigation path Substitution Next navigation step Display End of the navigation path

Switch to display mode

Start of the navigation path Substitution Next navigation step Save End of the navigation path

Save the substitution

Start of the navigation path Edit Next navigation step Insert step End of the navigation path

Insert new step (empty). If steps already exist, the new step is inserted as the last step.

Start of the navigation path Extras Next navigation step Flds in Bool.statmnt End of the navigation path

Display a list of valid fields that you can use for the substitution. These fields are determined based on the Boolean class of the substitution.

Start of the navigation path Extras Next navigation step Substitution flds... End of the navigation path

Display a list of valid fields that can be changed within a substitution

Start of the navigation path Extras Next navigation step Rule list End of the navigation path

Display a list of rules that you can use for the newly created substitution

Start of the navigation path Extras Next navigation step Set directory End of the navigation path

List sets that have been created in your system. For more information, see Displaying a Set Directory .

Start of the navigation path Extras Next navigation step Switch on trace End of the navigation path

Switch on the tracing function. While posting a document, the system calls the substitution and shows you which data is used. This function allows you to diagnose possible errors in the substitution definition. For further information, see Tracing a Validation/Substitution/Rule .

Start of the navigation path Extras Next navigation step Switch off trace End of the navigation path

Switch off the tracing function

Start of the navigation path Extras Next navigation step Usage End of the navigation path

Display where the substitution is currently used

Start of the navigation path Environment Next navigation step Maintain rules End of the navigation path

Create/change/display rules. Select the node containing the rule list.

Start of the navigation path Environment Next navigation step Create rule End of the navigation path

Create a rule

Start of the navigation path Environment Next navigation step Select rule End of the navigation path

Select a rule

  1. To create a new step for your substitution, choose Start of the navigation path Edit Next navigation step Insert step End of the navigation path or choose the corresponding function from the application tool bar.

A dialog box appears, listing the fields that you can use for substitution for this Boolean class.

Select the field that you want to use for substitution and choose Choose .

For each of the fields you selected a dialog box appears in which you can define the substitution method. You can choose between:

  • Constant value

  • Exit

  • Field-Field assignment

You can then later enter either a constant value, the name of an exit to be carried out at runtime or the name of a field, the content of which is to be used for the substitution.

The Create Substitution: <Substitution Name> - Step <Step Number> - Overview appears.

You can use the following additional functions on this screen:

Start of the navigation path Edit Next navigation step Insert step End of the navigation path

Insert a new step directly before the step currently being processed

Start of the navigation path Edit Next navigation step Copy step End of the navigation path

Insert a new step with the content of the step currently being processed

Start of the navigation path Edit Next navigation step Delete step End of the navigation path

Delete a step

Start of the navigation path Goto Next navigation step Header End of the navigation path

Return to substitution header data

  1. To process an existing substitution step, mark the step <no.> node in Control. You will then see an overview of the prerequisites and substitution entries created for this step. Enter a substitution step description. To edit one of these elements, double-click the appropriate area or navigate by selecting the corresponding node in Control.

  1. Define the Boolean statement used as the prerequisite statement for selecting data for substitution.

If the prerequisite is false, the value is not substituted and the transaction continues with the next substitution step.

The Formula Builder provides an easy-to-use interface for entering logical statements in validations, substitutions, and rules. For more information, see Formula Builder .

For more information about the syntax rules for entering Boolean statements, see Syntax Rules for Boolean Statements .

Note Note

You can also enter a user exit (type 1 or 3) in the prerequisite statement. For further information about user exits, see User Exits in Validations/Substitutions/Rules .

End of the note.
  1. On the Create Substitution: <Substitution Name> - Step <Step Number> - Overview screen you can enter one of the following for each substitution entry, depending on your chosen method:

  • Constant value

  • Exit name

  • Source field of assignment in <structure name> - <field name> format

An input help is available for all three input possibilities.

If the substitution step prerequisite is true at runtime, the system substitutes the contents of the field with a constant value, the contents of the source field or the system carries out an exit.

You use a user-defined exit to create complex substitutions. You use user exits of type 1 or 2 as substitution exits for a normal substitution or exits of type 2 or 3 for a matrix substitution. The substitution entry Exit only , where you can only use exits of type 1 or 3, forms an exception.

You can use the three pushbuttons in the right-hand screen area to insert, delete or move substitution entries:

  • Select the entries to be deleted and use the pushbutton Delete subst.entry

  • Select an entry and use the pushbutton Insert subst.entry to insert the new entry before the selected entry

  • If you want to insert the new entry as the last entry, do not select an entry. Instead, place the cursor on the step description and then use the pushbutton Insert subst.entry .

  • Select several steps and then use the pushbutton Move subst.entry . A message appears and you can move the steps by placing the cursor on a different entry and pressing Enter . The entries to be moved are inserted in front of the last selected entry.

  1. During processing of a substitution the steps are numbered sequentially by the system automatically. Move steps as follows: Mark the node of the step you wish to move. You can then move the step to the node of a different step. The selected step is inserted after the target step (Drag and Drop method). This is only possible within a substitution.

  2. Once you have finished processing the substitution, choose Start of the navigation path Substitution Next navigation step Save End of the navigation path .