cancel
Showing results for 
Search instead for 
Did you mean: 

Validation Rule for Accounting Document type

Former Member
0 Kudos

Hello Experts

I have an requirement to block certain accounting doc type to get vendor line item post in that. For that I tried to block direct through OBA7 but not be able to also can't delete number range as it is shared by another doc type. My last option is Validation rule but i never work on this ,so any suggest how to create validation rule " To Block Accounting Doc type SO THAT THERE WILL NOT BE ANY line item posting occur in that doc type.

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

ok sure. OB28 callpoint 1. Create a step under this callpoint.

1) Prerequisite is as follows: note XXXX is your company code and ZZ is your doc type.

BKPF-BUKRS = 'XXXX' AND

BKPF-BLART = 'ZZ'

2) Then you need to enter the check. Here you can just put FALSE.

3) The last part is to create your message. Message type E so they get an error and then create a message number in the class that you choose and give it a description:

Document Type 'ZZ' is not allowed

Save it and wah lah!

Let me know how it goes.

Thanks,

Jes

Former Member
0 Kudos

So Jes

I went to Tcode OB28 > selected my Company code> Change validation :FIGL(Header Data>Line Item>FIGL (here I can see 36 different step which step do i need to select to create rule ?

Former Member
0 Kudos

Hi,

You just need to create the step. Not a rule. So if you already have a validation at callpoint 1 - document head, you can highlight it and then click add step.

Let me know if you need anything else.

Thanks.

Former Member
0 Kudos

Thank You to all Expert for your Valuable Inputs

Special Thanks to Jessica .Your Input solved my issue. Points awarded to you and thread is close now.

Former Member
0 Kudos

Woohoo! Glad to be of help. just found out about this forum yesterday and been consulting for years. What a wonderful way to share knowledge.

Answers (4)

Answers (4)

Shirishak
Explorer
0 Kudos

My document type is customised document typ when im maintaining the validation using both company code then th validation is gettinf effected to all the custome document type why so can anyone please explain.

atif_farooq
Active Contributor
0 Kudos

Hi,

I dont think it will work that way.You need to put co code or any t code (in which you want to restrict this doc type) at pre-requisite level and document type at check level and then assign an error message to it. You can do it all using GGB0, once you are done with it assign the validation in OB28. Hope it will work .

Regards

Former Member
0 Kudos

Hi,

You need to do it in the exact way I specified. I have had this same requirement for a lot of my clients. You only need to go to OB28. Everything can be done directly in that transaction. Let me know if you want to me send you screen shots or if you have gotten it from my previous directives.

Thanks.

Former Member
0 Kudos

Hi

If this validation rule is not specific to Company code and it is at client level, simply follow as per Prasad suggestions

Reg

Vishnu

Former Member
0 Kudos

Hi,

Do you intend to restrict the usage of the docuemnt type for one particualr company code or at client level. If it is at client level then you don't need to write any validation for that. Within the docuemnt type configuration (OBA7) you can unflag all account types allowed and the system won't allow you to post anything using this document type.

Hope this helps you!

Regards,

Prasad

Former Member
0 Kudos

Hi,

If you no longer want to use a specific document type for en entire company code, then why don't you just change the number range so the last number used is the last number in that range (the to range). When posting, they will receive an error that the document number was already used. I hope this helps. If not, I can help you write the validation.

For example, doc type BC uses range 1 through 20. Current number is 15. Change 20 to 15.

Thanks,

Jes

Former Member
0 Kudos

Thank You Jessica

I can't change the number range as I said before number range is shared with another doc type. So if you can help me with validation rule it will be a gr8 help.