5/21/2018 Validations in Project System
1/17
riting Validations in Project Systemcreated byChanabasappa Kallapuron Nov 14, 2013 7:30 AM, last modified byChanabasappa Kallapuron Nov
14, 2013 10:09 AMVersion 1inShare
Writing Validations in SAP Project System
This document will help to understand how to write validations for Projects / WBS Elements.
In few cases the requirement would be to restrict certain things based on some other parameters
while creating projects in SAP PS. To achieve this, SAP has provided option to write our own
validations. In this document we can see sample case with example end to end.
Contents
1. Case: Validate Project Definition with Project Profile1.1 Creating Validation
1.2 Creating step
1.2.1 Defining Prerequisite1.2.2 Check
1.2.3 Message2. Defining Messages
3. Assigning Project Validation to Project profile
4. Testing the validation
1. Case: Validate Project Definition with Project Profile
First 4 characters of project definitions should be common for all the projects which were created
using project profile XXXX
In this case the requirement is whenever we are using project profile HMCL001the first 4
characters of project definition should starts with HMCL.
Follow the path:
http://scn.sap.com/people/channabasappa.kallapurhttp://scn.sap.com/people/channabasappa.kallapurhttp://scn.sap.com/people/channabasappa.kallapurhttp://scn.sap.com/people/channabasappa.kallapurhttp://scn.sap.com/people/channabasappa.kallapurhttp://scn.sap.com/people/channabasappa.kallapurhttp://scn.sap.com/people/channabasappa.kallapurhttp://scn.sap.com/people/channabasappa.kallapur5/21/2018 Validations in Project System
2/17
SPRO >> Project System >> Structures >> Operative Structures >> Work Breakdown Structure
(WBS) >> Maintain Validations (OPSI)
After execution, select the ProjectDefinitionnode and click on Validation icon as shown.
1.1 Creating Validation:
http://scn.sap.com/servlet/JiveServlet/showImage/102-48890-1-323558/1.jpg5/21/2018 Validations in Project System
3/17
1.2 Creating step:Click on Step icon to create step for the validation
Enter the description for Step
http://scn.sap.com/servlet/JiveServlet/showImage/102-48890-1-323568/4.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/102-48890-1-323567/3.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/102-48890-1-323560/2.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/102-48890-1-323568/4.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/102-48890-1-323567/3.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/102-48890-1-323560/2.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/102-48890-1-323568/4.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/102-48890-1-323567/3.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/102-48890-1-323560/2.jpg5/21/2018 Validations in Project System
4/17
1.2.1 Defining Prerequisite
Select Prerequisite to define on what parameters system should carry this validation
Select the project profile by double clicking on it.
http://scn.sap.com/servlet/JiveServlet/showImage/102-48890-1-323585/6.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/102-48890-1-323569/5.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/102-48890-1-323585/6.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/102-48890-1-323569/5.jpg5/21/2018 Validations in Project System
5/17
Project profile = select constantand enter the required projectprofilein this case Projectprofile is HMCL001.
http://scn.sap.com/servlet/JiveServlet/showImage/102-48890-1-323586/7.jpg5/21/2018 Validations in Project System
6/17
1.2.2 Check:
Now we need to define against the above prerequisite what should be the validation.
In this case we want to check the first 4 characters of projectdefinition.
http://scn.sap.com/servlet/JiveServlet/showImage/323594/9.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/323587/8.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/323594/9.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/323587/8.jpg5/21/2018 Validations in Project System
7/17
http://scn.sap.com/servlet/JiveServlet/showImage/323596/11.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/323595/10.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/323596/11.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/323595/10.jpg5/21/2018 Validations in Project System
8/17
Click on Constant icon to enter the first 4 characters of project definition.
1.2.3 Message
http://scn.sap.com/servlet/JiveServlet/showImage/323605/12.jpg5/21/2018 Validations in Project System
9/17
You can define the required message using transaction SE91 by entering message class; in this
case the message class is /ISDFPS/MISCas below.
2. Defining Massage:
http://scn.sap.com/servlet/JiveServlet/showImage/323673/14.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/323610/13.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/323673/14.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/323610/13.jpg5/21/2018 Validations in Project System
10/17
If you want to give additional information to user about the error, remove the Self-explanatory
check box and click on Long text icon to enter additional information.
http://scn.sap.com/servlet/JiveServlet/showImage/323665/15.jpg5/21/2018 Validations in Project System
11/17
Preview of the long text.
http://scn.sap.com/servlet/JiveServlet/showImage/323681/16.jpg5/21/2018 Validations in Project System
12/17
3. Assigning Project Validation to Project profile
After entering Validation, need to select AutomaticValidationcheck box.
http://scn.sap.com/servlet/JiveServlet/showImage/323690/18.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/323687/17.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/323690/18.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/323687/17.jpg5/21/2018 Validations in Project System
13/17
4 Testing the validation
Project Definition as GMENP114 using project profile HMCL001.In this case, first 4
characters of the project definition were supposed to be HMCL, but we are using wrongcombination. So we can expect error here.
5/21/2018 Validations in Project System
14/17
http://scn.sap.com/servlet/JiveServlet/showImage/323692/19.jpg5/21/2018 Validations in Project System
15/17
http://scn.sap.com/servlet/JiveServlet/showImage/323698/20.jpg5/21/2018 Validations in Project System
16/17
While saving the project, system will validate the project definition with project profile and
throws the error as below.
So now system is giving error while saving project, it means the validation is working correctly.
Using Validations in Project System with ExamplesPosted byMohamed RafiinSAP Project Systems (SAP PS)on Dec 20, 2010 7:28:03 AM
inShare
PurposeThe purpose of this blog is to help the beginners in creating validation in Project system, also it lists some examplesof the commonly used validations with prerequsities and checks.
ValidationSAP Help explains validation as a check of values or combination of values in the SAP environment. In the Std SAP
System almost all datas are validated against some tables or master datas. In addition to SAP defined validation, a
user can define his own set of validation to carry out project specific checks.
A validation has three areas, Pre-requisites, Checks & Messages.
Pre-requisites:
It is the statement which determines whether validation should be carried out or not. If the statement is true, then
system proceeds to check area otherwise allows the transaction.
Check:
This is the condition which is to be validated. If the statement is true, then the transaction continues, but if the
statement is false, the system displays the message.Message:
This is the message which is to be displayed if the check statement fails.
Validation in Project system:You can create the validations for Project systems using Tcode OPSIor from the following menu path:
SPRO >Project system> Structures> Operative Structures> Work Breakdown Structure/Network> Maintain
Validation.
Once you create the validation, this validation should be maintained in Project profile (for Project Definition and
WBS element) or in Network Profile (for Network header and Network Activity) Make sure to tick the check
http://scn.sap.com/community/erp/project-systems/blog/2010/12/20/using-validations-in-project-system-with-exampleshttp://scn.sap.com/community/erp/project-systems/blog/2010/12/20/using-validations-in-project-system-with-exampleshttp://scn.sap.com/people/mohamed.rafi2http://scn.sap.com/people/mohamed.rafi2http://scn.sap.com/people/mohamed.rafi2http://scn.sap.com/community/erp/project-systems/bloghttp://scn.sap.com/community/erp/project-systems/bloghttp://scn.sap.com/community/erp/project-systems/bloghttp://scn.sap.com/servlet/JiveServlet/showImage/323702/21.jpghttp://scn.sap.com/community/erp/project-systems/bloghttp://scn.sap.com/people/mohamed.rafi2http://scn.sap.com/community/erp/project-systems/blog/2010/12/20/using-validations-in-project-system-with-examples5/21/2018 Validations in Project System
17/17
box automatic validation in project profile, so that system performs validation automatically whenever you save the
project.
You can assign only one validation name per object, say project definition or WBS Element, in project profile. But
you can create 999 validation steps for a single validation name.
Examples of Commonly used Validation:
Purpose Pre-requisite Check Acti on
To allow specific project
codes for specific project
profiles PROJ-PSPID like A* PROJ-PROFL = 1000
System checks if the pro
code starts with A, then
project profile 1000 has
used or not.
To check 1stlevel WBSE code
is same as project code PRPS-STUFE = 1
PRPS-POSID =
PROJ-PSPID
System checks First leve
WBSE and Project defin
number are same or not
To check project code and
WBSE code are same PROJ-PROFL = 00001
PRPS-POSID :1-X: =
PROJ-PSPID
System allows to have
different WBSE code un
project code, in order to
this, you can perform th
check. Here, X denotes length of the project wit
special characters.
To check specific characters
in the WBSE code PROJ-PROFL = 00001 PRPS-POSID :X-X: = A
System checks whether
X th position of WBSE
is A for the project pro
00001
To allow only certain user to
enter a value in certain fields PRPS-PRCTR SYST-UNAME = ABC
System allows only user
to enter the value for Pr
center for all WBSE
To make project type
mandatory for particular
project profile and for 1st
levelWBSE
PROJ-PROFL = 001
ANDPRPS-STUFE = 1 PRPS-PRART
System checks whether
project type has been en
for 1st
level WBSE of thproject with profile 001
To make resp cost center as
madatory field for a particular
network type and profile.
CAUFVD-PROFID = 0001
AND
CAUFVD-AUART = PS02
CAUFVD-KOSTV
System makes sure that
cost center is filled for a
particular network profi
network type.