- We can find BADI or Exits for every t code and can put validation for each one of them but it would be a cumbersome process. And we might miss something or the other.
- Find a common BADI or Exit for validation on same but there might not be one common BADI or Exit to do so.
- Functional can do configuration (in SPRO) but it is also not possible because the requirement is to restrict user for specific T-Codes and not a generalized one.
After some serious brain storming and long discussions with the functional and business teams, I found a way to accomplish this by using GGB0 (Validation Maintenance).
What is GGB0?
GGB0 is the transaction code to Create and Maintain Validations.
Some other t-codes and components which helps and supports us in GGB0 Validations are:
- GS01: This t-code is to Create Set.
- SET: Set is like a Range. We can also use particular value.
- OB28: This t-code is for validation of Accounting Document to Activate and deactivate GGB0 Validations.
- Document Header is to Put Validation on Header Level.
- Line Item is to validate at line Item level.
- Complete Document is about the Rule and Help Document for validation.
We have created YARD as our validation name and all other details related to it is in the below image.
Validation – To create new validation.
Step – Is used to provide the details of validations. N number of steps are possible for one Validation Name.
Rule – To define theValidation Rules.
Also Read : How to update custom field of PRPS table
Prerequisite – Here we can program and write code (validation Conditions) using Table field and Status.
Check – Condition checks.
Message – Here we can write our custom Messages. Advisable best practice is to create message class.
Also, define the prerequisited for ‘T’ Type indicator, like to Select BSEG-UMSKZ = ‘T’. UMSKZ field holds – Special G/L Indicator.
Here USER ID is SET (Range) – User list
SET is created using T-code GS01 (Explained in subsequent Steps)
Here I am creating Company Code SET i.e. for these particular company code(s) our validation will work.
Also Check – GPS like tool in SAP using Google Map API
There are 3 options in Activation Level. 1 is for Active
Let’s check if our validation works or not.
We have maintained the necessary t-codes in SET (GS01) and the validation works only and only for the SET maintained.
We tried to post a document using t-code FB01. Since FB01 is there in the SET, therefore the validation gets triggered.
It’s giving the error message as expected. It’s successful.
As a technical developer and support personnel, you need know how to debug the Validations?
Then it will take you to the Source Code. Let’s say if you are using Step 001 then put Break Point at Step 001
And execute your T-code and debug the issue.
Free Video Training on SAP Debugging – SAP Debugging for Non-Technical Consultants
Go to t-code GGB0. Select your validation (put a cursor on it).
Then go to Menu -> Validation -> Transport.
Some of the useful Transaction Codes for Validation:
- GGB0 – Validation Maintenance
- GGB1 – Substitution Maintenance
- GCVZ – Rule Maintenance
- GGB4 – Action selection for validation/substitution, for example, activation of application areas, use of all messages or substituted fields
- GCX2 – Definition of the Includes for user exits
- OB28 – Activation of FI validations
- OBBH – Activation of FI substitutions
- OBBZ – Activation of cost of sales accounting substitution (in the FI area)
- OKC7 – Activation of CO validations
- OKC9 – Activation of CO substitutions
- GCT9 – Transport: Validations
- GCT0 – Transport: Substitutions
We have a very active Telegram (App) SAP Technical Group with more than 3900+ SAP Technical Practitioners from 6 Continents of the SAP World. Please join it using below link.
Telegram SAP Technical Discuss Group. You need to install the Telegram App first on your mobile device. Once you have it on your mobile, you can join the group and also access it from the Web on your computer and laptop.
Some Useful Enhancements in SAP
- Automatic Population of Values during Table Maintenance
- How to find BAdIs
- Oracle Upgrade
- Adding output message to a quotation/order/delivery/invoice
- Add events in the table to meet custom requirements
- Calling SAP Menu Areas From Program
- Pop Up Screen with Selection Option using FM POPUP_WITH_TABLE_DISPLAY
- Central Address Management (CAM) in MK02
- String wrap
- Send RV80HGEN as executable program in transport request to activate VOFM routines
- Add custom fields in standard MIRO header screen through BADI_FDCB_SUBBAS01
- PO re-price issue in BAPI_PO_CHANGE
- Steps to add custom Tab in standard MIRO item screen using BADI MRM_ITEM_CUSTFIELDS
- How to change the Maintenance Plan Category in T-code IP02?
- Sales Office Data … Can you change it even if config does not allow?
- Unwanted error: Maintenance planning plant xxxx not permitted
- BAPI_ALM_ORDER_MAINTAIN terminates with the runtime error MESSAGE_TYPE_X
- Handle the Handle Classes correctly
- Playing Sherlock Holmes to detect CONVT_CODEPAGE runtime error mystery
- How to update custom field of PRPS table
- GPS like tool in SAP using Google Map API
- How to Compel SAP Users to Go To Particular Transactions as per Roles after Log On?
- How to Add Customized Node in SPRO?
- eWay Bill Setup and Configuration Guide [2018 India Version]
- SO10 Enhancement to Add Texts to the Transport Request Automatically
- Dynamic Patterns – Let’s Automate the Documentation in SAP ABAP
- FI Accounting Validation using T-code GGB0
- How to pass Reversal Date & Reason to BAPI_ACC_DOCUMENT_POST?