Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Creating a validation rule for a certain document type

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!

Former Member
Former Member replied

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


Ashish Jain

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question