cancel
Showing results for 
Search instead for 
Did you mean: 

Use Validation at the time Creating Purchase Order

Former Member
0 Kudos

Hi Guru

W create a Validation rule for certain GL Account associates with Cost centers. When I am crating a document is FB50, it create mssage "Must Post Account XXXXXXXXXX to XX-XX tier Cost Center. but at the time of creating purchase order in Account Assignemnt table I allow to use any combination of Gl account and cost center. Business requirement is to create a same error message as we are getting at the time of creating document in FB60.

Please advice.


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kanp...

Please find the below which i have post the message....its wokring fine for us .also.

http://scn.sap.com/thread/1443112

Thanks.

Regards

asuvamsi

Former Member
0 Kudos

Hi Svami

The requirement is when we creating a Purchase Order and if the GL Account >= 9990000000 or <= 9990000999 and


KOSTL LIKE '++++++0+++' OR

BSEG-KOSTL LIKE '++++++1+++' OR

BSEG-KOSTL LIKE '++++++2+++' OR

BSEG-KOSTL LIKE '++++++3+++' OR

BSEG-KOSTL LIKE '++++++4+++' OR

BSEG-KOSTL LIKE '++++++5+++')


So if we try to use cost center ++++++6+++ this would not allow to create or save and create an error message


Thanks


Former Member
0 Kudos

HI SHOEB,

Please check below sreen shot for more details....

Hope it will helps you....

Regards

asuvamsi


ajaycwa1981
Active Contributor
0 Kudos

Hi Shoeb Bhai

You reverted very late, I thought its resolved 😉

For this you can simply use OKC7 validation.

Check condition would be COBL-KOSTL LIKE ++++++0++ OR ++++++1++ and so on

For any check other than account assignment, use the Badi I gave earlier Br. Ajay M

Former Member
0 Kudos

Thanks Ajay and svamsi. The issue is resolved I just follow the logic as swamsi describe in his link.

Thanks Again

Former Member
0 Kudos

its very happy to resolve your issue.

Answers (2)

Answers (2)

ajaycwa1981
Active Contributor
0 Kudos

Salaam Shoeb Bhai

In my opinion, implement this custom check using Badi ME_PROCESS_PO_CUST

It will work for sure.

Br. Ajay M

ajaycwa1981
Active Contributor
0 Kudos

Hi Shoeb

You may like to have this check for Purchase Req as well

For that, use ME_PROCESS_REQ_CUST

Br. Ajay M

anand_raichura
Contributor
0 Kudos

Hi,

We had a similar type of requirement in past.

You can try create a validation using transaction code OKC7 at Callup point 1. Use Field COBL-HKONT as prerequisite for validation and Check using the Cost Centre in your case.

This will help you to throw error message at time of PO creation as well.

Regards,

Anand Raichura

Former Member
0 Kudos

Hi Anand;

In OKC7, I don't see the call point 1. The so have a following fields for the input:

COAr, Event, Validation, Name and Active.

Do you you some kind of documentation?. please send me on following Email: shoaib.kanpurwala@gmail.com.

Thanks

anand_raichura
Contributor
0 Kudos

Hi,

Select event as 1 or you can go to GGB0 and create validation at cost accounting. After creating validation you can assign and activate it using T.code OKC7.

Regards,

Anand Raichura

Former Member
0 Kudos

Hi Anand,

I coping from the existing steps by using the expert mode. after I finish and click the syntax check icon, it gives me the following error

"The Formula was composed up tp the first syntax error"

Secondly, How to insert the "COBL" table name in list of structure.

anand_raichura
Contributor
0 Kudos

Hi Shoeb,

To avoid syntax error kindly don't use Expert mode, try to select the field. COBL structure is availalbe in prerequisite and check for cost accounting call up point 1.

Regards,

Anand Raichura

Former Member
0 Kudos

 

Hi Anand,

How do I select the Field "COBL". here is the formula I am inserting in the pre-requist

( COBL-HKONT >= '9990000000' AND

COBL-HKONT <= '9990000999' ) AND

( COBL-KOSTL LIKE '++++++0+++' OR

COBL-KOSTL LIKE '++++++1+++' OR

COBL-KOSTL LIKE '++++++2+++' OR

COBL-KOSTL LIKE '++++++3+++' OR

COBL-KOSTL LIKE '++++++4+++' OR

COBL-KOSTL LIKE '++++++5+++' )

What is your email address. I will send you the documentation and the error I am getting it.

anand_raichura
Contributor
0 Kudos

Hi,

I will try to provide screen shot once tomorrow. Meanwhile, you can try to use beloe BAdI suggested by Ajay.

Regards,

Anand Raichura