Stephen Smith's Blog

All things Sage 300…

SData in Sage ERP Accpac 6

with 62 comments

One of the big features in Accpac 6 is SData support. What is SData? SData is a web services protocol based on REST. What is REST? REST is a web services protocol that is very popular among Internet companies. There are basically two main competing standards for web services. One is SOAP which is promoted by Microsoft, Oracle and IBM; this is a fairly heavy duty protocol which requires a fair bit of infrastructure (which is provided by the companies promoting this protocol). The other is REST which was invented as a University Research project and basically uses existing Web Technologies such as HTTP and RSS to implement a web services protocol. The nice thing about REST is that it doesn’t require any extra middleware. You are basically doing everything via standard web URLs. The infrastructure that supports this is basically just the standard Internet. SData is just an extension to REST, similar to Google’s GData which is also based on REST. REST protocols are used by Google, Amazon, eBay, Yahoo and all the main Internet companies. Gartner estimates that 75% of web services in use on the Internet are REST based. REST/SData also provides a standard mechanism for performing CRUD (create, read, update, delete) on all records.

From Accpac, every Accpac View (or Business Logic Object) will be exposed via SData. This provides third party ISVs a complete, efficient Web Services interface to communicate to Accpac with. Also all Sage applications are being made SData aware, meaning that all Sage applications can manipulate SData Web Services (or feeds). For instance here is some Accpac A/R Customer and G/L Account data displayed within a Sage CRM Dashboard using SData.

From a simple wizard you can select any Accpac SData feed and once you’ve chosen a feed, you can select which columns you wish to display. Additionally Sage CRM and Accpac will be converting to use SData for our integration needs, this transition will occur over several versions of both products. In the same way you will be able to access CRM data from Accpac using SData.

All the new Sage ERP Accpac 6 screens are written entirely using SData. This means the screen can access any Accpac Views via SData, but additionally they can access any SData feeds from any product. In Accpac 5.x, the screen controls were mapped via datasource controls to views and view fields. This was great, but it limited you to only connecting our standard controls to fields in Views developed in our SDK. Now that the controls are mapped to a standards based SData fields, it means they will be able to be connected easily to much more data than just Accapc data. Look for other Sage products to start providing SData interfaces in their coming versions.

Sage is publishing SData as a publicly available standard. You can read all about it at:

Written by smist08

November 24, 2009 at 3:29 pm

Posted in SData, Software Architecture

Tagged with , , , ,

62 Responses

Subscribe to comments with RSS.

  1. […] to Stephen’s blog posts (read the full post here) SDATA is a major new feature of Accpac 6.0: One of the big features in Accpac 6 is SData support. […]

  2. […] as JavaScript or it can run on the server side as an SData service ( or In VB all the UI code was within the VB OCX control and this talked directly to the Accpac Views […]

  3. […] 6 Web UIs communicate with the Server using SData ( and which is a REST based Web Services protocol. On the Server we run a […]

  4. Hey Stephen, I’ve been poking around the Sage SData site and couldn’t find a road map for the future of SData implementation in the various Sage products. Any chance Sage put out some anticipated dates for SData support in their applications? Thanks for any info.


    September 13, 2010 at 4:09 pm

    • I’ll see if I’m allowed to publish it. All Sage products undergo a regular roadmap review, where one of the required questions is where their SData implementation is.


      September 13, 2010 at 10:10 pm

  5. […] SData services that process the various SData Web Service requests are programs written in Java ( To run this Java program we require a Java Application Server, which is a program that receives […]

  6. […] These are APIs that are built into the core Accpac System Manager that allow external programs to connect to Accpac and use the Accpac Business Logic. These APIs include the Accpac COM API (also used by VBA) and the .Net Interface. In the forthcoming Accpac 6.0 there will also be a Java Native Interface (JNI, and the SData RESTful web services interface ( […]

  7. […] SData in Sage ERP Accpac 6 More on SData and Sage ERP Accpac 6 Stateful SData On the Sage GCRM Contract […]

  8. Is SData available on out-of-the-box on all Accpac 6.x installations or it requires an additional module purchase?

    Nicolas Roberge

    January 4, 2011 at 2:26 pm

    • Out of the box. Just make sure you install the Portal component from the installation program since this includes the SData server.


      January 4, 2011 at 5:05 pm

  9. […] SData which is a Restful Web Service interface. All our communications with the server go through SData which is based on HTTP (or HTTPS). This means it won’t be affected by firewalls or cause security […]

  10. Hi, I installed Accpac 6.0a in a Windows Server, with Portal component included. But when I test the SData, it alway asks login name and password. I have no idea what login name/password. I tried all possible login names/passwords but none work.

    For example, there is no problem to get http://localhost/SDataServlet/sdata/sageERP/accpac, but it require login name and password to get http://localhost/SDataServlet/sdata/sageERP/accpac/TESTCO/customers.

    Any help will be appreciated!


    March 14, 2011 at 4:00 am

    • Its looking for an Accpac userid and password. In IIS make sure anonymous security is the only one enabled, otherwise it won’t work.


      March 14, 2011 at 4:27 am

    • It sounds like IIS is rejecting the requests for some reason. Check the IIS logs to see if there is some clue as to why. I don’t think the requests are going through to SDataServlet, but you should check those logs to make sure.


      March 14, 2011 at 3:41 pm

      • Hi Stephen,
        Sorry I’m following this issue.
        I make anonymous authentication the only one enabled. It works for http://localhost/SDataServlet/sdata/sageerp/accpac, and the admin/admin(the default ACCPAC username/password) for http://localhost/SDataServlet/sdata/sageerp/accpac/DEODAT/Customers seems working, but after the authentication it gives me “This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.”
        Does this mean the request have gone through SDataServlet?


        March 16, 2011 at 11:24 pm

      • Most likely its getting to the SDataServlet, but look at the SDataServlet log. The blog posting on Diagnosing problem in 6.0 has detail on how to get more detailed logging.


        March 17, 2011 at 2:33 am

  11. Yes, Stephen. It all works fine. Thanks for your help, appreciate it! The problem is that the Accpac was not intalled properly. No user groups were created for a particular user. The users data were damaged for some reason.

    It’s all good now, hello SData!


    March 17, 2011 at 2:49 am

  12. How do i open a view from within my client side code?
    i.e cusView = getResourceContext().openView(“AR0024”);


    March 17, 2011 at 11:07 am

    • You don’t. This would be server side code. You would make an SData request from the client and then you could have a class that extends the standard SData handler where you can add code of this nature to customize the SData feed.


      March 17, 2011 at 2:27 pm

      • Thanks for the quick response,
        My experience in V6.1 development is very limited.
        Within my server side code ( i created a function called test. I then tried to call the function i created from the client side( in the following way: WkshpOEOrderResourceKind.class.newInstance().test();
        it picks up my function(test) but when i place my cursor over the line of code it gives me an error: “Unhandled Exception of type Illegal Access Exception”


        March 18, 2011 at 7:38 am

      • An easy way to call the client is to use a datasource which you can define in your declarative layout. Then get that datasource in your code via something like:

        AccpacDataSourceProxy dsOrder = (AccpacDataSourceProxy)mainContext.getDataSource(UIConstants.DataSourceIDs.OEORDERS);

        Then if you call the actions in this datasource it will result in SData calls that will trigger your code on the server.


        March 18, 2011 at 3:51 pm

  13. Hello again,

    we are undergoing a project talking to SData. It seems that all the fields avaible for Accpac desktop app are not exposed to the SData. Are there any plan in the future to make all fields available to SData?



    March 21, 2011 at 12:13 am

    • For example,
      the customer SData schema has following elements/fields:

      There seems no element for Contact Name, Contact Telephone … which can be found on the 2nd tab of A/R Customers for the ACCPAC desktop.

      Or do I miss anything for SData?


      March 21, 2011 at 1:36 am

    • We don’t expose all the fields to keep the size of the payloads down. However you can add any fields that you like to the existing feeds or add your own feed. This is just a matter of editing or providing some XML. Have a look at the articles on customizing quotes to orders like since these have some info on adding fields that aren’t there to begin with.


      March 21, 2011 at 3:36 am

  14. Hi,

    Would Accpac SData support CRUD methods for ALL objects? Any plan of that for future releases?


    April 1, 2011 at 3:56 am

    • We will be. With version 6.1 we will have CRUD SData feeds defined for everything in SM, TX, BK, GL, AR, AP, IC, OE and PO. If we haven’t defined a feed, you can always do it yourself by providing the XML.


      April 1, 2011 at 3:38 pm

  15. Hi
    Can I create Segment Codes in v6.0 using ICSEGV(IC0620)?

    I made a icsegv sdata. I received response code 201.
    But I can’t find a segment code in in [Segment Codes].
    Is there any problem or Can I make a segment code using sdata?



    April 18, 2011 at 12:50 am

    • addition.
      I want to make a new Item. Before make a new item, I have to make a segment code.

      I changed Validate value form true -> false at the moment in [I/C Options -> Items]



      April 18, 2011 at 12:55 am

  16. […] each other and external applications including mobile devices. At this session you will learn how SData is used in the Accpac 6.1 framework and see how it is implemented with other applications such as […]

  17. in my sdataservlet logs I get [com.sage.orion.sdata.servlet.SDataServlet:1050] – orgOpen domain org any ideas, sdata and the portal don’t work


    April 27, 2011 at 11:19 pm

    • Usually this means Accpac\runtime is missing from the system PATH. It has to be here so the Tomcat program (running as a service can find it).

      If the Accpac programs are on a different computer then you need to change the Tomcat service to use a user id with network rights (local system won’t work). Sometimes its easier to install the programs locally.

      If you have multiple version of Accpac installed on one computer it might be finding the wrong runtime directory.


      April 27, 2011 at 11:22 pm

  18. Hi

    I installed SQL Server 2008, Sage ERP Accpac in local PC. I want to test in my local PC(window 7).
    I can see data set

    But if typing below as http://localhost/SDataServlet/sdata/sageERP/accpac/testco, error occurred(ERROR [com.sage.orion.sdata.servlet.SDataServlet:1050] – The user is not valid or the password is not correct

    I tried all id, but This error occurred.
    How can I resolve this problem(windows 7)?


    April 28, 2011 at 12:09 am

    • Make sure you enter the userid and password in all upper case. Also make sure in IIS that anonymous is the only authentication method enabled (ie no Windows Authentication, etc).


      April 28, 2011 at 2:50 am

  19. Hi
    Thanks for your before question.

    When internal server error(500), Can I get error message ?

    I want to handle exception.
    I can handle general error using error code.
    But When Internal server error(500), I want to handle this detail error message.

    1.500 error occurred.
    2.I checked SDataServlet.yyyy-mm-dd.log.
    3 I found a error message as below message.
    2011-05-02 13:25:05,328 ERROR [com.sage.orion.sdata.servlet.accpac.ViewResourceKind:1008] – Invalid input. Unit of measure cannot be blank.
    2011-05-02 13:25:05,328 ERROR [com.sage.orion.sdata.servlet.SDataServlet:1050] –

    4.Error message handling.
    : I want to get this error message for assist of user client correct usage

    Can I get this error message(Invalid input. Unit of measure cannot be blank.) in client side



    May 2, 2011 at 3:53 am

  20. I have installed SQL Server 2008 and Sage ERP Accpac in local PC(Windows 7 – 32 bit).

    I’m trying to access sData for integrating with westore application.

    I want to see dataset by using below url

    But when I’m trying with above url by entering username and password of windows user in that machine then occurred (ERROR [com.sage.orion.sdata.servlet.SDataServlet:1050] – The user is not valid or the password is not correct).

    In this blog smist08 has posted reply mentioned that anonymous user only enabled and remaing disable , I have done that but still occuring same error.

    How to configure user for sData could please explain ..I’m new to this product.

    Is it required any configuration in IIS or Tomcat ?.

    Thanks & Regards


    June 15, 2011 at 5:35 am

    • That URL works for me and returns the list of companies. Not sure if this one requires authentication or not, it didn’t ask me when I tried, so I suspect it doesn’t. If you are asked for a userid/password then its the Accpac one it wants (by default ADMIN/ADMIN).


      June 15, 2011 at 1:50 pm

  21. […] Web Services API used by many of our applications. I’ve blogged about SData a few times already: SData in Sage ERP Accpac 6, More on SData and Sage ERP Accpac 6 and Stateful SData. Calling something a RESTful Web Services […]

  22. […] static content like bitmap images or HTML files then IIS just provides these. If the request is an SData request then it is passed onto […]

  23. Hi,

    We’ve been receiving conflicting information from other accpac consultants who have been telling us that sData is not fully implemented across Accpac 6.0, and recommended we use “Web Services” since sData is still an “emerging technology”. Given this blog post was written almost two years ago, I am confused as to how developed sData is and whether or not it is actually available for Accpac ERP 6.0.


    September 26, 2011 at 2:24 pm

    • The SData technology is there, but we are rolling out the individual feeds as we roll out the Web UIs for various modules. So there are SData feeds to support Quotes to Orders and the other features in 6.0A. There is also a framework in place where developers can develop their own feeds, but until we develop the feeds for an application, it would be some work to setup all the required services and such.


      September 27, 2011 at 2:50 am

  24. Hi Steve,

    Thanks for your response. Am I correct in stating that there is currently no existent feed in place for viewing Item Prices? If not, how would I go about creating one? I am a fairly experienced developer, but online documentation for doing this is fragmented and vague.


    October 4, 2011 at 2:49 pm

    • There already is. It is used in Quote to Orders for the finder. You can easily find what Q2O does by running Fiddler to see what SData calls it makes.


      October 4, 2011 at 11:43 pm

      • Hi Steve – I know it’s been a while so please forgive that. I am curious – it appears that the Quote to Orders screen is only available in a Sage CRM environment (integrated with Accpac). We only own a copy of Accpac – is it then impossible to view the web interface for any native Accpac information?


        February 21, 2012 at 1:48 pm

      • These screens only run from within CRM. You can run the Portal, data snapshots and inquiry tool with only Accpac.


        February 21, 2012 at 6:26 pm

  25. […] the same role that the Accpac COM API had in the VB world. I’ve blogged on SData  a few times: here, here, here and here. Basically we want to limit ourselves to at most one server call per user […]

  26. Hi I want to get the data as single request items and item measure units and optional fields .

    How to map child tables by using view resource kind . If any otherway exist please let me know .

    Currently i’m doing integration by using Sdata, I want to get the dats as a single xml , this includes child table info like that is it possible in Sdata ?

    If I want to right our own service how to do that ?

    SData site not providing sample examples for how to use best way.

    • Have a look at: C:\Program Files (x86)\Common Files\Sage\Sage Accpac\Tomcat6\portal\sageERP\oe61
      a\resourceMap\OEOrderViewMapping.xml. It has the setup for the Order Entry views that Quote to Order uses.


      November 16, 2011 at 1:24 am

  27. hi smith,

    I am new to SDATA…I am working with accpac 6.0 UI ..i want to insert a customer details into sql server 2008through accpac 6.0 UI .how to do this using sdata Service,please help me,,,

    please give a help in this situation.

    I am looking for useful suggession and snippet code for my clear understanding



    February 6, 2012 at 7:05 pm

  28. […] more background information on SData, see the SData Website or some of my previous blog posts: SData in Sage ERP Accpac 6, More on SData and Sage ERP Accpac 6, Stateful SData, On the Sage GCRM Contract, Fun with SData, A […]

  29. Hi Steve,
    I am receiving the following error message:
    2012-05-02 11:58:30,311 ERROR [com.sage.orion.sdata.servlet.SDataServlet:1050] – The session E1E3363A-88AD-48D6-80A4-2044E9DD5303 is no longer valid.
    I also receive the 500 Internal server error in CRM for the Interactive Dashboard, any CRM Accpac screens, and the Sage Accpac Administration icon.
    Please advise. Thank you

    D Sulman

    May 2, 2012 at 4:31 pm

    • Is this something that just started happening? Have you tried re-booting the server. Did a new Java update get installed? If this did just start happening then what changed on this server? First make sure both the Sage ERP Accpac and CRM Tomcat servers are starting in the control panel – admin services – services, if not check the Windows event log. If they are starting, check the Tomcat logs (in the logs folder under the Tomcat folders), to see if they tell you anything.


      May 2, 2012 at 5:01 pm

      • I am not sure when this started happening, but this was running for a long time now. I have rebooted (nothing). I uninstalled a Java update, and then installed Java 6 Update 26, Both tomcat services are running. The tomcat logs don’t seem to display any errors?

        D Sulman

        May 2, 2012 at 5:11 pm

      • A Full Re-install and then restore of CRM database worked. I don’t know what exactly occurred, but it is all working fine now. Thanx again…

        D Sulman

        May 2, 2012 at 5:50 pm

  30. Hi Steve,

    We are running Accpac 6.0A and have the Portal operational but the CRM is not set up yet.

    We can query this successfully: http://APSRVR/SDataServlet/sdata/sageERP/accpac/SAMLTD/

    But using the below query does not work and only displays Apache Tomcat Internal Server Error 500:

    Any ideas? I have looked in the SDataservlet logs and it shows an error but no description of the error.

    Aaron B

    June 16, 2012 at 5:17 pm

    • Weird, its working now! :S

      Aaron B

      June 16, 2012 at 5:37 pm

      • Steve, great blog articles – extremely helpful. Do you happen to know where to find information on how to use the different SData methods (ie. findercustomer, invoiceinquiry, etc)?

        Aaron B

        June 16, 2012 at 6:18 pm

      • Generally they all work the same. Check out for more info. Also have a look at the video section of this blog, in that all the videos are to do with SData.


        June 16, 2012 at 9:25 pm

  31. Hi Stephen, i was wondering if the following statements are correct as I am getting conflicting answers from developers and consultants etc.

    1. SData fully support CRUD for all Accpac views within Sage ERP 300 (Accpac version 6)
    2. i.e. for example, I can use Sdata to create/edit Customer, Item, Price List, Order, Invoice etc or there are modules that are still work in progress?

    Tommy K

    June 1, 2013 at 6:07 am

    • For version 6, the pre-defined ones are all to do with the Quotes to Order feature, so you have things like customers, orders, account sets, etc. You can define additional SData feeds by creating XML definition files for them on the server. However this wouldn’t get you all the attendant services a full API requires.


      June 3, 2013 at 7:43 pm

      • Version 6.1 has been released. Any new pre-defined services (ie. inventory)? When will this be a full API?


        June 23, 2013 at 2:32 am

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: