Skip to Content
author's profile photo Former Member
Former Member

Validation rule

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 03, 2012 at 12:06 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 03, 2012 at 12:09 PM

    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-ecbe0b0d4a4c?QuickLink=index&overridelayout=true&48056389077615

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

    Regards,

    Jaymin R. Bhatt

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 03, 2012 at 08:17 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 04, 2012 at 08:59 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 04, 2012 at 10:27 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.