cancel
Showing results for 
Search instead for 
Did you mean: 

Find Sales Order Item Basic Data by Elements query fails

Former Member
0 Kudos

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):

<b>"701(SFB)"</b>

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:

<i>----


QUOTE -


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

SelectionByID – Document number range

INCLUSION_EXCLUSION_CODE

INTERVAL_BOUNDARY_TYPE_CODE

LOWER_BOUNDARY_ID

Value

UPPER_BOUNDARY_ID Value

Value

-


UNQUOTE -


</i>

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";

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

How do you test with a SOAP Client - I am trying to use same dataset as provided?

I did with WSDL Test - SAP, SOAP Client and got the following error:

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">

<soap-env:Body>

<nr1:SalesOrderERPBasicDataByElementsResponse_sync xmlns:nr1="http://sap.com/xi/APPL/Global2">

<Log>

<MaximumLogItemSeverityCode>1</MaximumLogItemSeverityCode>

<Item>

<TypeID>701(SFB)</TypeID>

<SeverityCode>1</SeverityCode>

<Note>Conversion failed: Invalid input format</Note>

</Item>

<Item>

<TypeID>701(SFB)</TypeID>

<SeverityCode>1</SeverityCode>

<Note>Conversion failed: Invalid input format</Note>

</Item>

<Item>

<TypeID>701(SFB)</TypeID>

<SeverityCode>1</SeverityCode>

<Note>Conversion failed: Invalid input format</Note>

</Item>

<Item>

<TypeID>701(SFB)</TypeID>

<SeverityCode>1</SeverityCode>

<Note>Conversion failed: Invalid input format</Note>

</Item>

<Item>

<TypeID>701(SFB)</TypeID>

<SeverityCode>1</SeverityCode>

<Note>Conversion failed: Invalid input format</Note>

</Item>

</Log>

</nr1:SalesOrderERPBasicDataByElementsResponse_sync>

</soap-env:Body>

</soap-env:Envelope>

Thanks..

Vikas

Former Member
0 Kudos

I finally found that GDT type 1 is for single, and "I" for include and issued the qury -- it works perfectly well!!

querydata.SelectionByID = new SalesOrderERPItemBasicDataByElementsQueryMessage_syncSalesOrderERPItemBasicDataSelectionByElementsSelectionByID[1];//Single element array is good enough 
            querydata.SelectionByID[0] = new SalesOrderERPItemBasicDataByElementsQueryMessage_syncSalesOrderERPItemBasicDataSelectionByElementsSelectionByID();
            querydata.SelectionByID[0].InclusionExclusionCode = "I";//include
            querydata.SelectionByID[0].IntervalBoundaryTypeCode = "1";//single valued
            querydata.SelectionByID[0].LowerBoundaryID = new SalesOrderID();
            querydata.SelectionByID[0].LowerBoundaryID.Value = "6718";