In Sage X3, we do have Indian Legislation addon module developed which is suitable for Indian business. Good and Service tax is part of the Indian Legislation where defining HSN code against product and service is mandatory. HSN stands for “Harmonized System of Nomenclature”. HSN code is a 6-digit uniform code that classifies 5000+ products and is accepted worldwide. In India, HSN code has extra 2 digits for further classification. The main purpose of HSN is to classify goods from all over the World in a systematic and logical manner. This brings in a uniform classification of goods and facilitates international trade.
There was a requirement from one of the client to add validation on HSN master where HSN number will take minimum 7 digits for creation not less than that. For example, if the user is trying to enter the HSN code less than 7 digit then it will give a popup message as “HSN code should be greater than 6 digit” and it won’t allow to create HSN Code till user enters the HSN Code greater than or equal to 7. Also client had requested us to add same validation on the Sales Invoice screen while selecting HSN Code in the detail line where the length of HSN code should not be less than 7 digits.
To achieve the above requirement follow the below steps:
Step 1: Go to Development ->Script Dictionary ->Windows and open HSN master window(XX1P4HSN)
Step 2: Jump to ‘XX1P4HSNMST’ screen and add ‘After field’ & ‘After change’ actions on HSNCODE field as per below screenshot :
New Stuff : Restriction on Sales Order if date exceeds the defined due date
![[HSN Master screen]](https://www.greytrix.com/blogs/sagex3/wp-content/uploads/2021/10/HSN-Master-screen.jpg)
Step 3: Save and validate the screen and global validate the window
Step 4: Add the below code in SPEHSN script :
![[Script-SPEHSN]](https://www.greytrix.com/blogs/sagex3/wp-content/uploads/2021/10/script-SPEHSN.jpg)
Add the similar code in AP_XX1P4HSNCODE action and compile the script.
Now if the user tries to enter less than 7 digits in HSN code field then it will give a popup as “HSN code should be greater than 6 digit”.
![[HSN master popup]](https://www.greytrix.com/blogs/sagex3/wp-content/uploads/2021/10/HSN-Code-popup.jpg)
Similarly, add same validation for the HSN Code in the detail line of the Sales Invoice screen
-Go to OSIH window, jump to SIH4 screen and add ‘After field’ & ‘After change’ action on ‘HSN Code’ field.
-Save and validate the screen and global validate the window.
-Add the below code in AM_XX1P4HSNCODE & AP_XX1P4HSNCODE actions in SPESIH script and compile the script
![[Script-SPESIH]](https://www.greytrix.com/blogs/sagex3/wp-content/uploads/2021/10/Script-SPESIH.jpg)
After applying above validation on sales invoice screen if the user tries to select the HSN code having less than 7 digits from HSN Code finder it will give a popup as below screenshot:
![[Sales Invoice- HSN Code popup]](https://www.greytrix.com/blogs/sagex3/wp-content/uploads/2021/10/Sales-Invoice-HSN-Code-popup.jpg)
In this way we can add validation on HSN Code field in HSN Master of GST Module and in detail line of Sales Invoice screen.
About Us
Greytrix – a globally recognized and one of the oldest Sage Development Partners is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience and expertise, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development, and implementation competence.
Greytrix has some unique integration solutions developed for Sage CRM with Sage ERPs namely Sage X3, Sage Intacct, Sage 100, Sage 500, and Sage 300. We also offer best-in-class Sage ERP and Sage CRM customization and development services to Business Partners, End Users, and Sage PSG worldwide. Greytrix helps in the migration of Sage CRM from Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes addons like Greytrix Business Manager, Sage CRM Project Manager, Sage CRM Resource Planner, Sage CRM Contract Manager, Sage CRM Event Manager, Sage CRM Budget Planner, Gmail Integration, Sage CRM Mobile Service Signature, Sage CRM CTI Framework.
Greytrix is a recognized Sage Champion Partner for GUMU™ Sage X3 – Sage CRM integration listed on Sage Marketplace and Sage CRM – Sage Intacct integration listed on Sage Intacct Marketplace. The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for the processing and execution of application programs at the click of a button.
For more information on our integration solutions, please contact us at sage@greytrix.com. We will be glad to assist you.