cancel
Showing results for 
Search instead for 
Did you mean: 

Validations while creating a PO

Former Member
0 Kudos

Dear SAP Experts,

We have a requirement that when a user creates a PO against a project with account assignment category as 'P' the G/L account should belong to only a particular series of G/L accounts (Eg: 52000 to 529999).

Any other G/L entered other than the series mentioned should trigger an error.

How will we able to achieve this requirement?


I have tried bringing this requirement by cost accounting validations (Validations in Controlling) but not able to meet the same

Can you kindly guide me?

If I need to mention the pre-requisite and rules via ggb0 can you kindly specify how should I enter them?(with technical fields if possible)

Thanks and Regards,

Varun Rudrabhatla

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Varun

you can create a validation in

GGB0 (Cost Accounting) that could work as

PreReq: SY-TCODE = 'ME21N' AND COBL-PS_POSID <> ''

Check cobl-hkont in ZSET

The ZSET can be created in gs01 with all accounts that should be accepted as valid.

Check it and let us know

Kind Regards

Panagiotis

PS Finally check in GGB4 if your validation is active (1)

Former Member
0 Kudos

Hi Panagiotis,

Your solution was really helpful. Thanks a lot. This has provided the required solution.

Regards,

Varun Rudrabhatla

0 Kudos

I am glad you found it useful

cheers

Pan

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Varun,

Yes you may go for Badi as as suggested by Nag A C, but I am thinking of other way round solution. I am not sure, but I believe that your process can be achieved by using following scenario. Try this if it works.

Actually, whenever you create PO then every time you usually encounters with Material Group. Now, think of a situation where you can use valuation class in a material group and that valuation class can have fixed number of GL's .. Isn't .?

So I suggest you to go to path : SPRO->Materials Management->Purchasing->Material Master->Entry Aids for Items w/o Material Master. There you can assign valuation class to your material group.

After this, execute OBYC. There you can search for PR/PO related business transactions. I am not sure but I think Inventory Posting (BSX) can be taken in your case. But its better to discuss this with your MM person which business transaction can be taken in your case. Now, for an example. when you double click on Inventory Posting (BSX), system will ask you to bring Chart of Accounts. Put your entry. Then another window will get open.

There you can create new entry after clicking on Create button icon from the top and bring your same valuation class that you have attached to your material group. After that, attach your fixed series of GL's that you wanted to have in your PO with account assignment category P.

Try this, it it works and let me know.

Regards,

Amit Rajoria

former_member203098
Active Contributor
0 Kudos

Hi Varun,

you could try to implement the BAdI: ME_PROCESS_PO_CUST to validate the G/L account field in ME21N.

Regards,