cancel
Showing results for 
Search instead for 
Did you mean: 

Error Recordset.GetAsXml() for Stored Procedure

Former Member
0 Kudos

Dear Experts,

I have a stored procedure which we want to get in an xml structure, via the SAP B1 SDK.

The stored procedure runs well ( it is a legal Tax report prepared for Hungary prapared by SAP).

This SAP note: 1814330 explains the legal report, and contains all the necessary stored procedures.

When the stored procedure finishes we get the following error:

Exception from HRESULT: 0xE06D7363

during the RecordSet.GetAsXml().

I have found a similar threath: http://scn.sap.com/thread/44791

But it is very old, SAP must have corrected this bug.

Can you please give me some hints, what can be done? Or where to look around to find solution?

Do I have to create a message to SAP Support?

Many thanks,

Kind regards,

Ottó

Accepted Solutions (0)

Answers (1)

Answers (1)

Johan_H
Active Contributor
0 Kudos

Hi Ottó,

From that old thread, I would guess that they were running version 6.5 at that time.

As you say, SAP should have fixed that bug. However, in those days SAP only fixed the most urgent bugs,so it is possible that that error was not ever corrected.

It is also not uncommon that an old bug reappears in later versions,  under different circumstances.

If the first solution (complicated query) suggested in the old thread applies to your situation, you may want to try that. Otherwise I recommend that you log a support ticket with SAP support.

Regards,

Johan

Former Member
0 Kudos

Hi Johan,

thanks for your reply.

It is strange, because for the stored procedure which was prepared by SAP will give us the error if we call the Recordset.GetAsXml()

Code provided by our developer team:

var rs = (Recordset)company.GetBusinessObject(BoObjectTypes.BoRecordset);
try
{
rs.Command.Name = "PrepareTaxReportData";
  rs.Command.Parameters.Item("@PeriodStartStr").Value = dateFrom.ToString("yyyy'-'MM'-'dd HH:mm:ss", CultureInfo.InvariantCulture);
rs.Command.Parameters.Item("@PeriodEndStr").Value = dateTo.ToString("yyyy'-'MM'-'dd HH:mm:ss", CultureInfo.InvariantCulture);
  rs.Command.Parameters.Item("@VatLimit").Value = 2000000;
rs.Command.Execute();

var r = rs.GetAsXML(); <---- Exception from HRESULT: 0xE06D7363

} finally { Marshal.ReleaseComObject(rs); }

for other Stored Procedures it works fine. I think something is wrong with the SP.

Kind regards,

Ottó

AdKerremans
Active Contributor
0 Kudos

Hi,

Do you have column names with spaces in it.

This is not allowed for the getasxml() method.

Regards

Ad