Skip to Content
Former Member
Oct 01, 2007 at 03:44 PM

Find Sales Order Item Basic Data by Elements query fails


I am trying to consume Find Sales Order Item Basic Data by Elements in .NET 3.0.

Every thing appears to be working fine -- I could query by PO number, Creation time, SalesOrganisationID etc.

However, the most basic query is mysteriously failing. I just want to query by Sales order number, and have given a valid sales order number 6718 that exists in SAP.

It fails giving the following errors:

(in Log.LogItem.Note variable): 

<b>"Conversion failed: Invalid input format"</b>

(in Log.LogItem.TypeID variable):


Code is pretty simple, and I am just trying to query Saler Order number 6718. Of course there is nothing wrong with its format.

From the ESOA site, all I could get was:



The following values are optional selection criteria for restricting the search result:

SelectionByID – Document number range










I could not even have any documentation on what to put in InclusionExclusionCode, and IntervalBoundaryTypeCode. They apper to be some Global Data Types for which I couldn't find any documentation. By sifting through Wiki, I just guessed a couple of values praying that it may work. I am a bit new to ESOA, but have expertise in .NET 3.0. Would someone guide me where to find the documentation for that, where are the error codes listed, so that I make the queries with little better preparation.

            querydata.SelectionByID = new SalesOrderERPItemBasicDataByElementsQueryMessage_syncSalesOrderERPItemBasicDataSelectionByElementsSelectionByID[1];//Single element array is good enough 
            querydata.SelectionByID[0] = new SalesOrderERPItemBasicDataByElementsQueryMessage_syncSalesOrderERPItemBasicDataSelectionByElementsSelectionByID();
            querydata.SelectionByID[0].InclusionExclusionCode = "E";
            querydata.SelectionByID[0].IntervalBoundaryTypeCode = "6";
            querydata.SelectionByID[0].LowerBoundaryID = new SalesOrderID();
            querydata.SelectionByID[0].LowerBoundaryID.Value = "6718";
            querydata.SelectionByID[0].UpperBoundaryID = new SalesOrderID();
            querydata.SelectionByID[0].UpperBoundaryID.Value = "6718";