cancel
Showing results for 
Search instead for 
Did you mean: 

Validation rule

Former Member
0 Kudos

Hi,

Please clarify: what t code is to be taken in writing a validation. Suppose I am writing a validation for f-28 and I want to make profit centre mendatory in it. How should I write it? Should I use F-28 or FBZ1 in t code?Please discuss in detail as I am new for writing validation.

Also where I can use shd0 for such restriction?

Thanks in advance.

Regards,

SAP FI

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

Firstly create a set via gs01. Select SYST table and TCODE field and add both t-codes F-28 and FBZ1, no harm doing that. Afterwords go to GGB0 and create a validation in financial accounting line item level.

Your prerequisite should be SYST-TCODE in <your set>

Your check should be BSEG-PRCTR = " "

Set a warning or error message and all done.

Now system will raise an error/warning message when profit center is not filled at tcodes F-28 and FBZ1.

Regards.

Former Member
0 Kudos

Hi,

You can create a set via t.code GS01.

Select SYST table and TCODE field. Add desired t.codes and then use the set on your validation as a prerequisite. Your validation will only work by selected t.codes.

Validation should be like;

Prerequisite : SYST-TCODE in <Your Set>

Kind regards.

Former Member
0 Kudos

Hi,

Use tcode GGB0 for validation and fallow below

Prerequisite: 'SYST-TCODE = 'F-28' (WHAT EVER TCODE)

Check: Profit center : <>

Message: Profit centr need to be filled (AS per your requirement)

Note: Tcode F-28 is used for Incoming payments so better  to maintain for bank accounts Profit center mondatory in FSG and Post keys.

regards

Sridhar

Former Member
0 Kudos

Hi Sridhar,

As per your thread, I have written validation but it is not working. Please see the below and tell if I am mistaken somewhere.

In OB28: Prerequisite:  'SYST-TCODE = 'F-28'

               Check: BSEG-PRCTR <> ' '

               Message: Error-Profit centre is mendatory.

Even I have tried FBZ1 in place of F-28 but still unsuccessful. T^hough in F-53, it is working with same rule thru FBZ2 but not by F-53. My question in first thread was also that which t code will work in writing validation. I have confusion in it.

Regards,

SAP FI

Former Member
0 Kudos

Any replies please?????

Former Member
0 Kudos

Hi,

Please refer below link for Validation:

http://wiki.sdn.sap.com/wiki/display/ERPFI/Validations+and+Substitutions

As mentioned in your post, making Profit Center mandatory Validation is not required, it could be achieve through making it mandatory via Field Status Group/ Document Splitting Characteristic.

For SHD0 refer below link:

http://scn.sap.com/docs/DOC-27275

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a070bfbb-d34a-2d10-b092-ecbe0b0d4...

SHD0 also helps for making Fields mandatory for certain users / all users.

Regards,

Jaymin R. Bhatt

Former Member
0 Kudos

Hi,

Agreed that it can be done by field status group and even I can do it thru posting key also but with it will make it required everywhere in both options. My requirement is that I want to make it required for certain t code only.

Regards,

SAP FI

iklovski
Active Contributor
0 Kudos

It's a strange requirement, but you can fulfill it by putting 'syst-tcode = 'F-28' as your pre-requisite.

Former Member
0 Kudos

Validations are controlled by field status variants.

Document header field validations ( Header text and reference) are controlled using Doc Type

Line item validations are controlled in GL master record. You need to use the appropriate field status variants in the master record of that GL. Both are done in configuration menu

Regards

Ramakrishnan G