Skip to end of metadata
Go to start of metadata

Purpose

This page is to provide basic information about the PR rule processing framework.

Overview

The rule framework sets the field values of the PR. Almost every field in EBAN has a corresponding rule, but also accounting information is processed within this framework and the line item attachment documents are also manipulated here.

Hierarchy of rules

The rules have their own hierarchy. Every rule can have subordinate rules. The PR line item has more than 100 subordinate rules, so the number of rules executed while PR processing is more than 100 per line item.

At the top of the hierarchy, there are 4 rules. They are executed first. 

LCL_R_HD_ESTKZ 

Checks and determines the value of the field EBAN-ESTKZ - Creation indicator (purchase requisition/schedule lines)

If the field value is not allowed, it returns error MEPO 081 (Creation indicator & invalid)

See also: PR Creation indicator

LCL_R_HD_BSART

Checks if the document type does comply with the customizing (T161). Field EBAN-BSART - Purchase Requisition Document Type.

LCL_R_HD_BANFN

Checks the field EBAN-BANFN - Purchase requisition number.

If the requisition number does not comply with the customizing in place (T161), it returns error 06 223 (Document number not within defined interval).

LCL_R_HD_ITEMS

Collection of other rules related to the PR item. More than 100 rules belongs here, they are

  • checking or setting the field values for EBAN fields
  • determining the accounting information
  • manipulating line item attachments in DMS

Recommended breakpoints and debugging tips

When debugging the rules, the best breakpoint is to set in the IS_VALID method of the rule local class.

You can find the rule local classes in the function group MEREQ in SE80.


The rules are appended to the PR while processing the header and the line item information, in the CLASS_CONSTRUCTOR method of the classes LCL_REQ_HEADER and LCL_REQ_ITEM.

In the class LCL_REQ_ITEM there are multiple enhancement points, where customer can append or remove rules, by manipulating the MY_RULES table of the object LCL_RULE_FACTORY.

Related Content

Related Documents

Purchase requisition - Main page

PR Creation indicator

  • No labels