cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a validation rule for a certain document type

Former Member
0 Kudos

Using t-code OB28, can somebody please give me a brief tutorial on how to create a validation rule for a list of GL accounts that only a specific doc type will be allowed for posting? As far as i know, I have to create a set first for the GL accounts. The next step is where OB28 steps in. Please help. Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Patrick,

For creating a validation you have to go to T-code: GGB0

Select Financial accounting menu and expand.

You can validate your data at Document Header, Line Item and Complete Document.

For Example: I want to check that when running T-code: F-02 my document type should be SA only.

Now i need to create validation at Document header level only

Selcect Document header and click on create validation (Test)

Click on Test and Click on Create Step (Test)

System will automatically create 3 steps below this node

Prequisite, Check and Message.

Select Prequisite and from the below data select ABAP system fields and select Transaciton code= f-02

select check from left side and select Accounting document header from right side you will be displayed with all the documetn header fields

select document type ='SA'

Select message from lefe and create your own custom message example: Please enter only SA documetn type here.

Click on save. Once you save system will genereate program for this validation and will execute and call up point

Now you need to activate this validation wehn entering the data using F-02

T code for activation is OB28

Co Code, Call up point(Document header, Line item, Complete document), activation level-1.

Now this validation will work at document header level for T-code F-02

Hope this will clear

Regards

Ashish Jain

Answers (2)

Answers (2)

Former Member
0 Kudos

I appreciate all the replies. Thanks a lot guys. Will start working on it. God bless!

former_member188826
Active Contributor
0 Kudos

Use t-code GGB0 (GGB Zero)

Alternatively, you can double click in OB28, depending on the call point.

You may get more idea to maintain the validation. You have to specify a pre-requisite where you specify the condtions and specify the check, which if fails, provide a message. You can maintain all in one place there.