Contents:-
1. Creating the validation.
2. How to activate the validation
3. About few Condition logics used during validation creation.
4. Creating Set & Rule and how to use in the validation. and the purspose of set and rule used in validation
5. How to activate trace/total trace to find out the setp triggered during validation.
6. How to transport validation
Transaction code :- GGB0 (Creating the validation)
As shown in the above screen shot dropdown the Financial Accounting and place cursor on the "Line Item" and click on validation
New line item will appear as above (1). Enter the Validation name (2) and description (3). and press enter
Note: - Kindly ignore the lines wherever I strikeout using blue pen those are my client information which already created in system.
Enter the Validation Step description. We will take simple example ( restricting Transaction Type for a GL account, however i will explain in details the validation logics so that you can create your own validations.
I am naming the validation as "Transaction Type Validation" as shown in the below screen shot
than click on prerequisite
I am going to restrict transaction types for a GL account 1650000. Meaning system should accept only few (specified) transaction types for the GL. so the GL can only be posted with the specific transaction type.
Prerequisite:- The name Prerequisite itself self explanatory. The system will determine based on the logic/criteria mentioned here whether the validation is relevant for the business transaction we do or not. If the prerequisite is satisfied than only system will go for the further check (for the Check step). If not it will exit from the validation.
system behaves as below
Prerequisite => if True => go to Check condition
=> if False => the validation is not relevant for the transaction type.
Check:- here we mention the condition for the business transactions. System check the condition during business transactions performed. the condition should get satisfied. If condition is not satisfied than the system will behave as per the message we define in the next step
Check = > if True than business transaction is allowed proceed further
=> if False than will react as per the message we define in the next step
Message:-
E = > Error. In this step the user is not allowed to proceed further unless he satisfies the check condition.
W = > Warning. Just warning will be given by system to make aware the user about the condition. user needs to decide whether to proceed or correct the business transaction.
Ok. now we will proceed with our validation creation.
I am going to give GL account as prerequisite. Meaning when the GL account is used than the user should use only certain Transaction types.
Double click on the Structure BSEG = > Accounting Document Segment ( refer the below screen shot). BKPF only for header data. Since we are searching the field in the BSEG table.
Once you double click the screen will appear as below
click search button and search for G/L or HKONT. You can see the field G/L from the below screen shot.
again double click on field G/L. It will get added in the argument as below.
And click on symbol "=". It will get added in the argument. again click on constant and input the GL name. Finally the argument field will appear as below
meaning if the GL account 1650000 is used. We have completed the prerequisite.
Than choose step "Check" . I am going to restrict the GL for the below transaction types ( Z03, Z04, Z08, Z90)
Ok, we have used condition "OR" here. Hence, we will see about the conditions
let me explain based on our example transaction type
OR (meaning either) => whether any one of the transaction type is used than the check condition comes true. Otherwise the check condition fails
And (meaning both/all) => The And condition needs to be used when you check values from more than one field. example. i say transaction type should be XXX and posting key should be YY. so both the condition needs to be satisfied by the user during the business transaction he perform.
IN = > we need to use the condition when we use Set or Rule
LIKE = > you can use this when you want to mention only prefix of suffix. for example transaction type like 'Z0*'. in this case all transaction type starts with Z0 will be considered
please refer the below link if you like to work with boolen logic
http://help.sap.com/saphelp_46c/helpdata/EN/27/06e23954d9035de10000000a114084/frameset.htm
Step 3. Message
I have set message E (error).
The message you can create using SE91
input the message class and click on view. see the next available number range can be used. and agin come to main screen and click on change buttton. Input the description and save it.
Ok. we completed the validation sucessfully. whether it is will work now.
Unless you activate the validation at company code level it wont work in the company code. How to activate ?
Go to transaction code OB28
Company code
Validation are controlled at company code level. The validation needs to be activated here for the specific company code.
Callup point
1. Document header (here you define validation for BKPF table fields)
2. Line Item (here you define validation for for the PKPF and BSEG table fields)
3. Complete document ( (here you define validation for for the BKPF, BSEG & Structure SYST)
Validation - which we created. all the steps created under this Test validation will be active
Activate Level- here you define whether the validation is ativate or not in the company code.1 is active 2 is inactive.
How to Activate the trace
The trace can be used to find out the validation step getting triggered at the time of postings.
Either you can activate trace only for the folder you placed cursor or you can activate total trace ( trace will be activated for all validation created in the system)
Place cursor on the validation folder and from menue Extras = > Activate trace Or Activate total trace
------------&-----------------
Set
We can use the set when you have many number of GL accounts company codes etc to be mentioned in the validation. It simplfies the maintenance of the validation. If you directly mentioned in valdiation itself than you need to use many number of OR & AND conditions.
GS01
Enter the set name you want. and the table name ( the fields you are going to maintain in the set belongs to ).
press F4 and select the respective field and press enter ( i have choosed company code)
Rule:-
It is just next node in the valdiation. Which you can see below screen shot
Use:-
1.You can maintain the same logic as you maintain in prerequist and check condition. It also makes the easy maintenance of the validation.
2. When every you transport validation you can find Transport sets open box in the screen. You can check the box and transport the sets along with the validation.
How to transport
Place cursor on the validaton folder and from menu Validation => Transport
Note:- you need to untic the boxes other than rule. rule also need not to be ticked if you have not created any rule