cancel
Showing results for 
Search instead for 
Did you mean: 

RPC_E_SERVERFAULT when calling GetAsXML() on a UDT

Former Member
0 Kudos

I'm attempting to get the XML for a UDT through DI-API. Here is a sample of the code I am using.

UserTable udt = this.company.UserTables.Item(1);
udt.GetByKey("ABC");
this.company.XmlExportType = BoXmlExportTypes.xet_NodesAsProperties;
string xml = udt.GetAsXML();

The call to GetAsXML() fails with the following exception.


The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
System.Runtime.InteropServices.COMException

In my debugger I can get access to the udt. For example udt.Name and udt.UserFields.Fields.Item(1).Value return the correct values. This tells me that the data is being loaded into the UDT, however the generation of XML is failing.

I am running SAP Business One 2005 A (6.80.318) SP: 01 PL: 16. I have checked the forum for this error and tried the solution of removing my '680318' folder in my temp directory.

Any ideas?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member185703
Active Contributor
0 Kudos

...what's the answer from SAP Support?

...I tried to reproduce the error on PL18 - and I had a similar one when I tried it the first time, but later I couldn't reproduce it anymore.

Please note though that:

- you might prefer to use the table name rather than some internal ID (helpfile seems to require an update...)

- there's SaveXML(...) maybe that would work?

Anyway, the most important thing (if the error still occurrs) is to involve SAP Support.

Sorry & thx,

Frank