---
title: How to Import a XML report into Sage X3
description: When writing code for Sage EM (formerly Sage X3), alphanumeric variables must be declared with a size, otherwise the number of characters will be defaulted to 30; causing unexpected behavior, specially when a bigger variable is required.
image: https://blog.southeastcomputers.com/hubfs/Copy%20of%20SCS%20-%20Blog%20Template%20(18).png
---

**[Sage X3](https://www.southeastcomputers.com/sage-enterprise-management-infomation) | **[Sage 100cloud](https://www.southeastcomputers.com/sage-100cloud-information) | [Acumatica](https://www.southeastcomputers.com/acumatica-information) | [LATAM Fiscal Requirements](https://www.southeastcomputers.com/latam-fiscal-requirements-localize-sagex3-sage-500) | [Contact Us |](https://interact.southeastcomputers.com/contact-us) [ 888-773-2161](tel:888-773-2161)****

[![logo-naw-southeast-website](https://blog.southeastcomputers.com/hs-fs/hubfs/logo-naw-southeast-website.png?width=578&height=160&name=logo-naw-southeast-website.png "logo-naw-southeast-website")](https://www.southeastcomputers.com)

This is a search field with an auto-suggest feature attached.

- There are no suggestions because the search field is empty.

![Florida Miami Image](https://blog.southeastcomputers.com/hs-fs/hubfs/Banners/Florida-Miami.jpg?width=2880&name=Florida-Miami.jpg "Florida Miami Image")

# Blog

Want our new blog posts delivered right to your inbox? 

August 14, 2018

# How to Import a XML report into Sage X3

- [Tweet](https://twitter.com/share)

![authorIcon](http://www.sparkreaction.com/hubfs/Oceania%20Theme%202016/Images/authorIcon.png) By [Eric Casal](https://blog.southeastcomputers.com/author/eric-casal) ![topicIcon](http://www.sparkreaction.com/hubfs/Oceania%20Theme%202016/Images/topicIcon.png) [Sage X3](https://blog.southeastcomputers.com/topic/sage-x3), [Sage Enterprise Management](https://blog.southeastcomputers.com/topic/sage-enterprise-management), [All](https://blog.southeastcomputers.com/topic/all)

[![How to Import a XML report into Sage X3](https://blog.southeastcomputers.com/hubfs/Copy%20of%20SCS%20-%20Blog%20Template%20(18).png) ](https://blog.southeastcomputers.com/how-to-import-a-xml-report-into-sage-em-formerly-sage-x3)

When writing code for [Sage X3](https://blog.southeastcomputers.com/10-ways-sage-x3-keeps-you-in-compliance-with-the-fda), alphanumeric variables must be declared with a size, otherwise the number of characters will be defaulted to 30; causing unexpected behavior, specially when a bigger variable is required.

 

 

One of the many benefits of using Sage X3 is that it is extremely configurable. Users with the appropriate rights can manually change the length. No need to go in the lines of code to change some parameters like the size of a data type. You can successfully increase the number of the decimal places in the price screens for example without having to touch the logic.

 

For example, the supplier data type BPS is 15 characters in length

 

![pic 1](https://blog.southeastcomputers.com/hs-fs/hubfs/pic%201.png?width=502&name=pic%201.png)

 

When a variable is required for a supplier, the variable could be declared like this:

 

**Local** **Char** YBPSNUM(15) #Supplier

 

 

Or,

 

The product data type ITM is 20 characters in length:

 

![pic2](https://blog.southeastcomputers.com/hs-fs/hubfs/pic2.png?width=443&name=pic2.png)

 

 

When a variable is required for a product, the variable could be declared like this:

 

**Local** **Char** YITMREF(20) #Product

 

 

In the examples above, the code will not work properly if any of those data types is changed to a bigger number of characters, a scenario that we have encountered with some of our clients.

 

Imagine wanting to increase the number of characters authorized for the length of the product code. A modification seemingly innocent, that would nonetheless require to review ALL the places in the code where the length of the product code was declared as above. Every single screen and reports would need to be reviewed and tested.

 

## **Solution**

The solution to the problem described above is to use GLON variables.

These variables have this format: GLONXYZ, where XYZ indicates the related data type (it will only work if the data type is the main key to the object).

 

GLON variables are available for any object defined in the system.

 

Below we can see the proper way of defining the variables in the code, so any change in the data type length is accounted for.

 

 

 

 

---

 

 

[![The Return of Sage X3 Tips, Tricks & Tactics to Make Your Life Easier](https://no-cache.hubspot.com/cta/default/418036/ff0cb281-384e-46a0-a2b9-27a708d1ed5e.png)](https://cta-redirect.hubspot.com/cta/redirect/418036/ff0cb281-384e-46a0-a2b9-27a708d1ed5e)

 

 

### [Talk to Us About](https://www.southeastcomputers.com/software-support) [Sage Software Support](https://www.southeastcomputers.com/software-support)

 

![sage-Partner-AuthorizedPartner-preferred](https://blog.southeastcomputers.com/hs-fs/hubfs/Images/sage-Partner-AuthorizedPartner-preferred.png?width=458&name=sage-Partner-AuthorizedPartner-preferred.png)

 

 

 SHARE THIS STORY [**](https://www.facebook.com/sharer/sharer.php?u=https://blog.southeastcomputers.com/how-to-import-a-xml-report-into-sage-em-formerly-sage-x3&title=How%20to%20Import%20a%20XML%20report%20into%20Sage%20X3&picture=https://cdn2.hubspot.net/hubfs/418036/Copy%20of%20SCS%20-%20Blog%20Template%20%2818%29.png&description=When%20writing%20code%20for%20Sage%20EM%20(formerly%20Sage%20X3),%20alphanumeric%20variables%20must%20be%20declared%20with%20a%20size,%20otherwise%20the%20number%20of%20characters%20will%20be%20defaulted%20to%2030;%20causing%20unexpected%20behavior,%20specially%20when%20a%20bigger%20variable%20is%20required.) | [**](https://twitter.com/intent/tweet?source=https://blog.southeastcomputers.com/how-to-import-a-xml-report-into-sage-em-formerly-sage-x3&text=How%20to%20Import%20a%20XML%20report%20into%20Sage%20X3) | [**](http://www.linkedin.com/shareArticle?mini=true&url=https://blog.southeastcomputers.com/how-to-import-a-xml-report-into-sage-em-formerly-sage-x3&title=How%20to%20Import%20a%20XML%20report%20into%20Sage%20X3&summary=When%20writing%20code%20for%20Sage%20EM%20(formerly%20Sage%20X3),%20alphanumeric%20variables%20must%20be%20declared%20with%20a%20size,%20otherwise%20the%20number%20of%20characters%20will%20be%20defaulted%20to%2030;%20causing%20unexpected%20behavior,%20specially%20when%20a%20bigger%20variable%20is%20required.)

[NEXT POST **](https://blog.southeastcomputers.com/how-to-import-a-custom-generic-inquiry-gi-in-acumatica)

### Search



---

### Recent Posts

### Posts by Topic

- [All (267)](https://blog.southeastcomputers.com/topic/all)
- [Sage Enterprise Management (94)](https://blog.southeastcomputers.com/topic/sage-enterprise-management)
- [Sage X3 (85)](https://blog.southeastcomputers.com/topic/sage-x3)
- [ERP (60)](https://blog.southeastcomputers.com/topic/erp)
- [Productivity (31)](https://blog.southeastcomputers.com/topic/productivity)
- [Inventory Control (30)](https://blog.southeastcomputers.com/topic/inventory-control)
- [Acumatica (21)](https://blog.southeastcomputers.com/topic/acumatica)
- [Food and Beverage (21)](https://blog.southeastcomputers.com/topic/food-and-beverage)
- [Cloud Computing (14)](https://blog.southeastcomputers.com/topic/cloud-computing)
- [Community (13)](https://blog.southeastcomputers.com/topic/community)
- [Sage 100cloud (12)](https://blog.southeastcomputers.com/topic/sage-100cloud)
- [Sage 100c (11)](https://blog.southeastcomputers.com/topic/sage-100c)
- [Add-Ons (10)](https://blog.southeastcomputers.com/topic/add-ons)
- [UDI (9)](https://blog.southeastcomputers.com/topic/udi)
- [Manufacturing (8)](https://blog.southeastcomputers.com/topic/manufacturing)

[![Sage100cloud_RGB](https://blog.southeastcomputers.com/hs-fs/hubfs/Sage100cloud_RGB.png?width=442&name=Sage100cloud_RGB.png "Sage100cloud_RGB")](https://blog.southeastcomputers.com/sage-100cloud-information)

[![Sage500_logo](https://blog.southeastcomputers.com/hs-fs/hubfs/Sage500_logo.png?width=369&name=Sage500_logo.png "Sage500_logo")](https://blog.southeastcomputers.com/sage-500-information)

[![sage x3 logo](https://blog.southeastcomputers.com/hs-fs/hubfs/sage%20x3%20logo.png?width=640&name=sage%20x3%20logo.png "sage x3 logo")](https://blog.southeastcomputers.com/sage-enterprise-management-infomation)

[![Acumatica_Logo450](https://blog.southeastcomputers.com/hs-fs/hubfs/Acumatica_Logo450.png?width=450&name=Acumatica_Logo450.png "Acumatica_Logo450")](https://blog.southeastcomputers.com/acumatica-information)

### About Us

Successful transformation of a company’s systems and business processes requires strong project leadership with a passion to create effective processes-processes that will work for today and assist in further growth.

![scs-logo-short.png](https://blog.southeastcomputers.com/hs-fs/hubfs/scs-logo-short.png?width=500&name=scs-logo-short.png "scs-logo-short.png")

### Useful Links

#### Services

- [Software Implementation](https://www.southeastcomputers.com/software-implementation)
- [Project Management](https://www.southeastcomputers.com/project-management)
- [Software Training](https://www.southeastcomputers.com/software-training)
- [Software Support](https://www.southeastcomputers.com/software-support)
- [Custom Programming](https://www.southeastcomputers.com/custom-programming)
- [IT Consulting](https://www.southeastcomputers.com/it-consulting)
- [International](https://www.southeastcomputers.com/international)

---

#### Products

- [Sage X3](https://www.southeastcomputers.com/sage-enterprise-management-infomation)<https://www.southeastcomputers.com/sage-enterprise-management-infomation>
- [Sage 100cloud](https://www.southeastcomputers.com/sage-100cloud-information)
- [Acumatica](https://www.southeastcomputers.com/acumatica-information)
- [Sage 500](https://www.southeastcomputers.com/sage-500-information)

## Recent Blogs

### Get in Touch

#### Miami Location

**15165 NW 77th Ave., Suite 2009   
Miami, FL 33014

** [888-773-2161](tel:888-773-2161)

** [Info@southeastcomputers.com](mailto:info@southeastcomputers.com)

Within business hours, we'll reply in 24 hours or less

---

#### Mexico Location

**

Miraflores 221, Col. Insurgentes San Borja.  
CDMX, México 03100  
+52 55 6811 3044

 

Copyright © Southeast Computer Solutions 2018 | [Privacy Policy](https://www.southeastcomputers.com/privacy-policy)

- [Facebook](https://www.facebook.com/SCSolutions)
- [Twitter](https://twitter.com/scsolutions)
- [LinkedIn](https://www.linkedin.com/company/southeast-computer-solutions)

 

![](https://www.facebook.com/tr?id=1761620344049548&ev=PageView&noscript=1)