Show TOC
Maintain
Requirements
When updating key figures, it is often
necessary to define complex update rules.
This includes the definition of requirements
which either allow or prevent the update.
The definition of requirements is subject to
widely differing conditions; for this reason, a flexible medium is necessary
for the definition.
Maintenance of the requirements is subdivided
into the specific applications.
Activities
Select the
application for which you want to maintain requirements.
An overview of all
existing requirements for the selected application appears.
Create
1. If you want
to define a new requirement, enter a new number for it in the field
Routine number .
Note
A specific name
range is reserved for standard SAP requirements.
For that reason,
please use numbers 600 through 999 for your requirements.
2. Enter an
explanatory text for the requirement.
3. If you want
to save a long text which describes the requirement, proceed as
follows:
a) Position the
cursor on the requirement.
b) Select the
function Documentation.
You branch to the
SAP editor.
c) Enter the
text.
d) Save your
text.
e) Return to
the overview screen.
Create/Change
1. To change a
requirement, place the cursor on the line of the respective
requirement.
2. Select the
function Source text.
The system branches
to the program editor.
Caution
A name is
automatically predefined for the FORM routine when the requirement is
defined.
You may
not change this name.
3. Now define
your requirement using ABAP language elements.
To define the
requirement, you can use all the source fields that are valid for the event
you have selected for the relevant update rule and to which the requirement 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. When you
define requirements, you must assign the result of the check to the
Return code field.
The following then
applies:
- Return code equals 0 requirement was
satisfied
- Return code does not equal 0 requirement
was not satisfied
The field
Return code has already been defined in a common data
area.
5. Save the
requirement definition.
6. Return to
the overview screen of the requirements.
Example
You want to define a requirement so that data
from sales order processing is only updated if the document has been
completely processed.
The completeness of
document processing is recorded in the document via a status
field.
FORM
MCV1_600.
IF MCVBUK-UVALL =
'C'.
RETURNCODE =
0.
ELSE.
RETURNCODE =
4.
ENDIF.
ENDFORM.
Activate
A requirement definition can only be used in
updating if it is active.
To activate a requirement, proceed as
follows:
1. Place the
cursor on the line of the requirement you wish to activate.
2. Select the
function Edit -> Activate.
Delete
You can only delete a requirement if it is
inactive.
If you want to delete a requirement, proceed as
follows:
1. Place the
cursor on the line of the requirement you wish to delete.
2. Select the
function Edit -> Deactivate.
3. Select the
function Edit -> Delete line.
The requirement is
then deleted.